; LLVM IR from AdarshGaur/Competitive-Programming :: Atcoder/AtCoder Beginner Contest 202 (D - aab aba baa)

; 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"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] }

@dp = external dso_local global [31 x [31 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %12 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %13 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %14 = getelementptr i8, ptr %13, i64 -24
  %15 = load i64, ptr %14, align 8
  %16 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %15
  %17 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %16, ptr noundef null)
  %18 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %19 = getelementptr i8, ptr %18, i64 -24
  %20 = load i64, ptr %19, align 8
  %21 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %20
  %22 = call noundef i64 @_ZNSt8ios_base9precisionEl(ptr noundef nonnull align 8 dereferenceable(216) %21, i64 noundef 20)
  store i64 0, ptr @dp, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  store i64 1, ptr %2, align 8, !tbaa !8
  br label %23

23:                                               ; preds = %33, %0
  %24 = load i64, ptr %2, align 8, !tbaa !8
  %25 = icmp slt i64 %24, 31
  br i1 %25, label %27, label %26

26:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %36

27:                                               ; preds = %23
  %28 = load i64, ptr %2, align 8, !tbaa !8
  %29 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %28
  %30 = getelementptr inbounds [31 x i64], ptr %29, i64 0, i64 0
  store i64 1, ptr %30, align 8, !tbaa !8
  %31 = load i64, ptr %2, align 8, !tbaa !8
  %32 = getelementptr inbounds [31 x i64], ptr @dp, i64 0, i64 %31
  store i64 1, ptr %32, align 8, !tbaa !8
  br label %33

33:                                               ; preds = %27
  %34 = load i64, ptr %2, align 8, !tbaa !8
  %35 = add nsw i64 %34, 1
  store i64 %35, ptr %2, align 8, !tbaa !8
  br label %23, !llvm.loop !11

36:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store i64 1, ptr %3, align 8, !tbaa !8
  br label %37

37:                                               ; preds = %68, %36
  %38 = load i64, ptr %3, align 8, !tbaa !8
  %39 = icmp slt i64 %38, 31
  br i1 %39, label %41, label %40

40:                                               ; preds = %37
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  br label %71

41:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store i64 1, ptr %5, align 8, !tbaa !8
  br label %42

42:                                               ; preds = %64, %41
  %43 = load i64, ptr %5, align 8, !tbaa !8
  %44 = icmp slt i64 %43, 31
  br i1 %44, label %46, label %45

45:                                               ; preds = %42
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %67

46:                                               ; preds = %42
  %47 = load i64, ptr %3, align 8, !tbaa !8
  %48 = sub nsw i64 %47, 1
  %49 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %48
  %50 = load i64, ptr %5, align 8, !tbaa !8
  %51 = getelementptr inbounds [31 x i64], ptr %49, i64 0, i64 %50
  %52 = load i64, ptr %51, align 8, !tbaa !8
  %53 = load i64, ptr %3, align 8, !tbaa !8
  %54 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %53
  %55 = load i64, ptr %5, align 8, !tbaa !8
  %56 = sub nsw i64 %55, 1
  %57 = getelementptr inbounds [31 x i64], ptr %54, i64 0, i64 %56
  %58 = load i64, ptr %57, align 8, !tbaa !8
  %59 = add nsw i64 %52, %58
  %60 = load i64, ptr %3, align 8, !tbaa !8
  %61 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %60
  %62 = load i64, ptr %5, align 8, !tbaa !8
  %63 = getelementptr inbounds [31 x i64], ptr %61, i64 0, i64 %62
  store i64 %59, ptr %63, align 8, !tbaa !8
  br label %64

64:                                               ; preds = %46
  %65 = load i64, ptr %5, align 8, !tbaa !8
  %66 = add nsw i64 %65, 1
  store i64 %66, ptr %5, align 8, !tbaa !8
  br label %42, !llvm.loop !13

67:                                               ; preds = %45
  br label %68

68:                                               ; preds = %67
  %69 = load i64, ptr %3, align 8, !tbaa !8
  %70 = add nsw i64 %69, 1
  store i64 %70, ptr %3, align 8, !tbaa !8
  br label %37, !llvm.loop !14

71:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %72 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %73 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %72, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %73, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #6
  %75 = load i64, ptr %6, align 8, !tbaa !8
  %76 = load i64, ptr %7, align 8, !tbaa !8
  %77 = load i64, ptr %8, align 8, !tbaa !8
  call void @_Z5solveB5cxx11lll(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %9, i64 noundef %75, i64 noundef %76, i64 noundef %77)
  %78 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %79 unwind label %83

79:                                               ; preds = %71
  %80 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %78, ptr noundef @.str.2)
          to label %81 unwind label %83

81:                                               ; preds = %79
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %82 = load i32, ptr %1, align 4
  ret i32 %82

83:                                               ; preds = %79, %71
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %10, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %87

87:                                               ; preds = %83
  %88 = load ptr, ptr %10, align 8
  %89 = load i32, ptr %11, align 4
  %90 = insertvalue { ptr, i32 } poison, ptr %88, 0
  %91 = insertvalue { ptr, i32 } %90, i32 %89, 1
  resume { ptr, i32 } %91
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt8ios_base9precisionEl(ptr noundef nonnull align 8 dereferenceable(216), i64 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #5

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"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] }

@dp = external dso_local local_unnamed_addr global [31 x [31 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
.preheader.preheader:
  %0 = alloca i64, align 8
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %5 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %6 = getelementptr i8, ptr %5, i64 -24
  %7 = load i64, ptr %6, align 8
  %8 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %7
  %9 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %8, ptr noundef null)
  %10 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %11 = getelementptr i8, ptr %10, i64 -24
  %12 = load i64, ptr %11, align 8
  %13 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %12
  %14 = tail call noundef i64 @_ZNSt8ios_base9precisionEl(ptr noundef nonnull align 8 dereferenceable(216) %13, i64 noundef 20)
  store i64 0, ptr @dp, align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 248), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 8), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 496), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 16), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 744), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 24), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 992), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 32), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 1240), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 40), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 1488), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 48), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 1736), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 56), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 1984), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 64), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 2232), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 72), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 2480), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 80), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 2728), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 88), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 2976), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 96), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 3224), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 104), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 3472), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 112), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 3720), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 120), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 3968), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 128), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 4216), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 136), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 4464), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 144), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 4712), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 152), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 4960), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 160), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 5208), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 168), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 5456), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 176), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 5704), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 184), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 5952), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 192), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 6200), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 200), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 6448), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 208), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 6696), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 216), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 6944), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 224), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 7192), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 232), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 7440), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 240), align 16, !tbaa !8
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %.01721 = phi i64 [ %136, %.preheader ], [ 1, %.preheader.preheader ]
  %.phi.trans.insert = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 0
  %.pre = load i64, ptr %.phi.trans.insert, align 8, !tbaa !8
  %15 = add nsw i64 %.01721, -1
  %16 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 1
  %17 = load i64, ptr %16, align 8, !tbaa !8
  %18 = add nsw i64 %.pre, %17
  %19 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 1
  store i64 %18, ptr %19, align 8, !tbaa !8
  %20 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 2
  %21 = load i64, ptr %20, align 8, !tbaa !8
  %22 = add nsw i64 %18, %21
  %23 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 2
  store i64 %22, ptr %23, align 8, !tbaa !8
  %24 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 3
  %25 = load i64, ptr %24, align 8, !tbaa !8
  %26 = add nsw i64 %22, %25
  %27 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 3
  store i64 %26, ptr %27, align 8, !tbaa !8
  %28 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 4
  %29 = load i64, ptr %28, align 8, !tbaa !8
  %30 = add nsw i64 %26, %29
  %31 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 4
  store i64 %30, ptr %31, align 8, !tbaa !8
  %32 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 5
  %33 = load i64, ptr %32, align 8, !tbaa !8
  %34 = add nsw i64 %30, %33
  %35 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 5
  store i64 %34, ptr %35, align 8, !tbaa !8
  %36 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 6
  %37 = load i64, ptr %36, align 8, !tbaa !8
  %38 = add nsw i64 %34, %37
  %39 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 6
  store i64 %38, ptr %39, align 8, !tbaa !8
  %40 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 7
  %41 = load i64, ptr %40, align 8, !tbaa !8
  %42 = add nsw i64 %38, %41
  %43 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 7
  store i64 %42, ptr %43, align 8, !tbaa !8
  %44 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 8
  %45 = load i64, ptr %44, align 8, !tbaa !8
  %46 = add nsw i64 %42, %45
  %47 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 8
  store i64 %46, ptr %47, align 8, !tbaa !8
  %48 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 9
  %49 = load i64, ptr %48, align 8, !tbaa !8
  %50 = add nsw i64 %46, %49
  %51 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 9
  store i64 %50, ptr %51, align 8, !tbaa !8
  %52 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 10
  %53 = load i64, ptr %52, align 8, !tbaa !8
  %54 = add nsw i64 %50, %53
  %55 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 10
  store i64 %54, ptr %55, align 8, !tbaa !8
  %56 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 11
  %57 = load i64, ptr %56, align 8, !tbaa !8
  %58 = add nsw i64 %54, %57
  %59 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 11
  store i64 %58, ptr %59, align 8, !tbaa !8
  %60 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 12
  %61 = load i64, ptr %60, align 8, !tbaa !8
  %62 = add nsw i64 %58, %61
  %63 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 12
  store i64 %62, ptr %63, align 8, !tbaa !8
  %64 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 13
  %65 = load i64, ptr %64, align 8, !tbaa !8
  %66 = add nsw i64 %62, %65
  %67 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 13
  store i64 %66, ptr %67, align 8, !tbaa !8
  %68 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 14
  %69 = load i64, ptr %68, align 8, !tbaa !8
  %70 = add nsw i64 %66, %69
  %71 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 14
  store i64 %70, ptr %71, align 8, !tbaa !8
  %72 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 15
  %73 = load i64, ptr %72, align 8, !tbaa !8
  %74 = add nsw i64 %70, %73
  %75 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 15
  store i64 %74, ptr %75, align 8, !tbaa !8
  %76 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 16
  %77 = load i64, ptr %76, align 8, !tbaa !8
  %78 = add nsw i64 %74, %77
  %79 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 16
  store i64 %78, ptr %79, align 8, !tbaa !8
  %80 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 17
  %81 = load i64, ptr %80, align 8, !tbaa !8
  %82 = add nsw i64 %78, %81
  %83 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 17
  store i64 %82, ptr %83, align 8, !tbaa !8
  %84 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 18
  %85 = load i64, ptr %84, align 8, !tbaa !8
  %86 = add nsw i64 %82, %85
  %87 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 18
  store i64 %86, ptr %87, align 8, !tbaa !8
  %88 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 19
  %89 = load i64, ptr %88, align 8, !tbaa !8
  %90 = add nsw i64 %86, %89
  %91 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 19
  store i64 %90, ptr %91, align 8, !tbaa !8
  %92 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 20
  %93 = load i64, ptr %92, align 8, !tbaa !8
  %94 = add nsw i64 %90, %93
  %95 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 20
  store i64 %94, ptr %95, align 8, !tbaa !8
  %96 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 21
  %97 = load i64, ptr %96, align 8, !tbaa !8
  %98 = add nsw i64 %94, %97
  %99 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 21
  store i64 %98, ptr %99, align 8, !tbaa !8
  %100 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 22
  %101 = load i64, ptr %100, align 8, !tbaa !8
  %102 = add nsw i64 %98, %101
  %103 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 22
  store i64 %102, ptr %103, align 8, !tbaa !8
  %104 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 23
  %105 = load i64, ptr %104, align 8, !tbaa !8
  %106 = add nsw i64 %102, %105
  %107 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 23
  store i64 %106, ptr %107, align 8, !tbaa !8
  %108 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 24
  %109 = load i64, ptr %108, align 8, !tbaa !8
  %110 = add nsw i64 %106, %109
  %111 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 24
  store i64 %110, ptr %111, align 8, !tbaa !8
  %112 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 25
  %113 = load i64, ptr %112, align 8, !tbaa !8
  %114 = add nsw i64 %110, %113
  %115 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 25
  store i64 %114, ptr %115, align 8, !tbaa !8
  %116 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 26
  %117 = load i64, ptr %116, align 8, !tbaa !8
  %118 = add nsw i64 %114, %117
  %119 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 26
  store i64 %118, ptr %119, align 8, !tbaa !8
  %120 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 27
  %121 = load i64, ptr %120, align 8, !tbaa !8
  %122 = add nsw i64 %118, %121
  %123 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 27
  store i64 %122, ptr %123, align 8, !tbaa !8
  %124 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 28
  %125 = load i64, ptr %124, align 8, !tbaa !8
  %126 = add nsw i64 %122, %125
  %127 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 28
  store i64 %126, ptr %127, align 8, !tbaa !8
  %128 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 29
  %129 = load i64, ptr %128, align 8, !tbaa !8
  %130 = add nsw i64 %126, %129
  %131 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 29
  store i64 %130, ptr %131, align 8, !tbaa !8
  %132 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %15, i64 30
  %133 = load i64, ptr %132, align 8, !tbaa !8
  %134 = add nsw i64 %130, %133
  %135 = getelementptr inbounds [31 x [31 x i64]], ptr @dp, i64 0, i64 %.01721, i64 30
  store i64 %134, ptr %135, align 8, !tbaa !8
  %136 = add nuw nsw i64 %.01721, 1
  %exitcond22.not = icmp eq i64 %136, 31
  br i1 %exitcond22.not, label %137, label %.preheader, !llvm.loop !11

137:                                              ; preds = %.preheader
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %0) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %138 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %0)
  %139 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %138, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %140 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %139, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #6
  %141 = load i64, ptr %0, align 8, !tbaa !8
  %142 = load i64, ptr %1, align 8, !tbaa !8
  %143 = load i64, ptr %2, align 8, !tbaa !8
  call void @_Z5solveB5cxx11lll(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %3, i64 noundef %141, i64 noundef %142, i64 noundef %143)
  %144 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %145 unwind label %148

145:                                              ; preds = %137
  %146 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %144, ptr noundef nonnull @.str.2)
          to label %147 unwind label %148

147:                                              ; preds = %145
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %0) #6
  ret i32 0

148:                                              ; preds = %145, %137
  %149 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %0) #6
  resume { ptr, i32 } %149
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt8ios_base9precisionEl(ptr noundef nonnull align 8 dereferenceable(216), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

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


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass