; LLVM IR from eyangch/competitive-programming :: GoogleKickstart/2022H (magical_well_of_lilies)

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %10 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %11 = getelementptr i8, ptr %10, i64 -24
  %12 = load i64, ptr %11, align 8
  %13 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %12
  %14 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %13, ptr noundef null)
  %15 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  store i64 1, ptr %2, align 8, !tbaa !8
  br label %17

17:                                               ; preds = %102, %0
  %18 = load i64, ptr %2, align 8, !tbaa !8
  %19 = load i64, ptr @T, align 8, !tbaa !8
  %20 = icmp sle i64 %18, %19
  br i1 %20, label %22, label %21

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

22:                                               ; preds = %17
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %24 = load i64, ptr %2, align 8, !tbaa !8
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %23, i64 noundef %24)
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef @.str.1)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @L)
  store i64 1, ptr getelementptr inbounds ([100001 x i64], ptr @dp, i64 0, i64 1), align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  store i64 2, ptr %4, align 8, !tbaa !8
  br label %28

28:                                               ; preds = %93, %22
  %29 = load i64, ptr %4, align 8, !tbaa !8
  %30 = load i64, ptr @L, align 8, !tbaa !8
  %31 = icmp sle i64 %29, %30
  br i1 %31, label %33, label %32

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

33:                                               ; preds = %28
  %34 = load i64, ptr %4, align 8, !tbaa !8
  %35 = sub nsw i64 %34, 1
  %36 = getelementptr inbounds [100001 x i64], ptr @dp, i64 0, i64 %35
  %37 = load i64, ptr %36, align 8, !tbaa !8
  %38 = add nsw i64 %37, 1
  %39 = load i64, ptr %4, align 8, !tbaa !8
  %40 = getelementptr inbounds [100001 x i64], ptr @dp, i64 0, i64 %39
  store i64 %38, ptr %40, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  store i64 2, ptr %5, align 8, !tbaa !8
  br label %41

41:                                               ; preds = %89, %33
  %42 = load i64, ptr %5, align 8, !tbaa !8
  %43 = load i64, ptr %5, align 8, !tbaa !8
  %44 = mul nsw i64 %42, %43
  %45 = load i64, ptr %4, align 8, !tbaa !8
  %46 = icmp sle i64 %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %41
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %92

48:                                               ; preds = %41
  %49 = load i64, ptr %4, align 8, !tbaa !8
  %50 = load i64, ptr %5, align 8, !tbaa !8
  %51 = srem i64 %49, %50
  %52 = icmp ne i64 %51, 0
  br i1 %52, label %53, label %54

53:                                               ; preds = %48
  br label %89

54:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %55 = load i64, ptr %5, align 8, !tbaa !8
  %56 = sub nsw i64 %55, 1
  %57 = mul nsw i64 2, %56
  %58 = add nsw i64 4, %57
  store i64 %58, ptr %6, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %59 = load i64, ptr %4, align 8, !tbaa !8
  %60 = load i64, ptr %5, align 8, !tbaa !8
  %61 = sdiv i64 %59, %60
  %62 = sub nsw i64 %61, 1
  %63 = mul nsw i64 2, %62
  %64 = add nsw i64 4, %63
  store i64 %64, ptr %7, align 8, !tbaa !8
  %65 = load i64, ptr %4, align 8, !tbaa !8
  %66 = getelementptr inbounds [100001 x i64], ptr @dp, i64 0, i64 %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %67 = load i64, ptr %4, align 8, !tbaa !8
  %68 = load i64, ptr %5, align 8, !tbaa !8
  %69 = sdiv i64 %67, %68
  %70 = getelementptr inbounds [100001 x i64], ptr @dp, i64 0, i64 %69
  %71 = load i64, ptr %70, align 8, !tbaa !8
  %72 = load i64, ptr %6, align 8, !tbaa !8
  %73 = add nsw i64 %71, %72
  store i64 %73, ptr %8, align 8, !tbaa !8
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %66, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %75 = load i64, ptr %74, align 8, !tbaa !8
  %76 = load i64, ptr %4, align 8, !tbaa !8
  %77 = getelementptr inbounds [100001 x i64], ptr @dp, i64 0, i64 %76
  store i64 %75, ptr %77, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  %78 = load i64, ptr %4, align 8, !tbaa !8
  %79 = getelementptr inbounds [100001 x i64], ptr @dp, i64 0, i64 %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %80 = load i64, ptr %5, align 8, !tbaa !8
  %81 = getelementptr inbounds [100001 x i64], ptr @dp, i64 0, i64 %80
  %82 = load i64, ptr %81, align 8, !tbaa !8
  %83 = load i64, ptr %7, align 8, !tbaa !8
  %84 = add nsw i64 %82, %83
  store i64 %84, ptr %9, align 8, !tbaa !8
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %79, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %86 = load i64, ptr %85, align 8, !tbaa !8
  %87 = load i64, ptr %4, align 8, !tbaa !8
  %88 = getelementptr inbounds [100001 x i64], ptr @dp, i64 0, i64 %87
  store i64 %86, ptr %88, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %89

89:                                               ; preds = %54, %53
  %90 = load i64, ptr %5, align 8, !tbaa !8
  %91 = add nsw i64 %90, 1
  store i64 %91, ptr %5, align 8, !tbaa !8
  br label %41, !llvm.loop !11

92:                                               ; preds = %47
  br label %93

93:                                               ; preds = %92
  %94 = load i64, ptr %4, align 8, !tbaa !8
  %95 = add nsw i64 %94, 1
  store i64 %95, ptr %4, align 8, !tbaa !8
  br label %28, !llvm.loop !13

96:                                               ; preds = %32
  %97 = load i64, ptr @L, align 8, !tbaa !8
  %98 = getelementptr inbounds [100001 x i64], ptr @dp, i64 0, i64 %97
  %99 = load i64, ptr %98, align 8, !tbaa !8
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %99)
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %100, i8 noundef signext 10)
  br label %102

102:                                              ; preds = %96
  %103 = load i64, ptr %2, align 8, !tbaa !8
  %104 = add nsw i64 %103, 1
  store i64 %104, ptr %2, align 8, !tbaa !8
  br label %17, !llvm.loop !14

105:                                              ; preds = %21
  %106 = load i32, ptr %1, align 4
  ret i32 %106
}

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

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

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

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

; 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: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %4 = getelementptr i8, ptr %3, i64 -24
  %5 = load i64, ptr %4, align 8
  %6 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %5
  %7 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %6, ptr noundef null)
  %8 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %9 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  %10 = load i64, ptr @T, align 8, !tbaa !8
  %.not39 = icmp slt i64 %10, 1
  br i1 %.not39, label %._crit_edge43, label %.lr.ph42

._crit_edge43:                                    ; preds = %._crit_edge38, %0
  ret i32 0

.lr.ph42:                                         ; preds = %0, %._crit_edge38
  %.040 = phi i64 [ %20, %._crit_edge38 ], [ 1, %0 ]
  %11 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %12 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %11, i64 noundef %.040)
  %13 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull @.str.1)
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @L)
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 8), align 8, !tbaa !8
  %15 = load i64, ptr @L, align 8, !tbaa !8
  %.not2934 = icmp slt i64 %15, 2
  br i1 %.not2934, label %._crit_edge38, label %.lr.ph37

._crit_edge38:                                    ; preds = %._crit_edge, %.lr.ph42
  %.lcssa = phi i64 [ %15, %.lr.ph42 ], [ %26, %._crit_edge ]
  %16 = getelementptr inbounds [100001 x i64], ptr @dp, i64 0, i64 %.lcssa
  %17 = load i64, ptr %16, align 8, !tbaa !8
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %17)
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %18, i8 noundef signext 10)
  %20 = add nuw nsw i64 %.040, 1
  %21 = load i64, ptr @T, align 8, !tbaa !8
  %.not.not = icmp slt i64 %.040, %21
  br i1 %.not.not, label %.lr.ph42, label %._crit_edge43, !llvm.loop !11

.lr.ph37:                                         ; preds = %.lr.ph42, %._crit_edge
  %22 = phi i64 [ %26, %._crit_edge ], [ %15, %.lr.ph42 ]
  %23 = phi i64 [ %27, %._crit_edge ], [ 1, %.lr.ph42 ]
  %.02735 = phi i64 [ %28, %._crit_edge ], [ 2, %.lr.ph42 ]
  %24 = add nsw i64 %23, 1
  %25 = getelementptr inbounds [100001 x i64], ptr @dp, i64 0, i64 %.02735
  store i64 %24, ptr %25, align 8, !tbaa !8
  %.not3032 = icmp ult i64 %.02735, 4
  br i1 %.not3032, label %._crit_edge, label %.lr.ph

._crit_edge.loopexit:                             ; preds = %47
  %.pre = load i64, ptr @L, align 8, !tbaa !8
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph37
  %26 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ %22, %.lr.ph37 ]
  %27 = phi i64 [ %48, %._crit_edge.loopexit ], [ %24, %.lr.ph37 ]
  %28 = add nuw nsw i64 %.02735, 1
  %.not29.not = icmp slt i64 %.02735, %26
  br i1 %.not29.not, label %.lr.ph37, label %._crit_edge38, !llvm.loop !13

.lr.ph:                                           ; preds = %.lr.ph37, %47
  %29 = phi i64 [ %48, %47 ], [ %24, %.lr.ph37 ]
  %.02633 = phi i64 [ %49, %47 ], [ 2, %.lr.ph37 ]
  %30 = urem i64 %.02735, %.02633
  %31 = udiv i64 %.02735, %.02633
  %.not31 = icmp eq i64 %30, 0
  br i1 %.not31, label %32, label %47

32:                                               ; preds = %.lr.ph
  %33 = shl nuw i64 %.02633, 1
  %34 = add i64 %33, 2
  %35 = shl nuw i64 %31, 1
  %36 = add i64 %35, 2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  %37 = getelementptr inbounds [100001 x i64], ptr @dp, i64 0, i64 %31
  %38 = load i64, ptr %37, align 8, !tbaa !8
  %39 = add nsw i64 %34, %38
  store i64 %39, ptr %1, align 8, !tbaa !8
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %41 = load i64, ptr %40, align 8, !tbaa !8
  store i64 %41, ptr %25, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %42 = getelementptr inbounds [100001 x i64], ptr @dp, i64 0, i64 %.02633
  %43 = load i64, ptr %42, align 8, !tbaa !8
  %44 = add nsw i64 %36, %43
  store i64 %44, ptr %2, align 8, !tbaa !8
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %46 = load i64, ptr %45, align 8, !tbaa !8
  store i64 %46, ptr %25, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  br label %47

47:                                               ; preds = %.lr.ph, %32
  %48 = phi i64 [ %29, %.lr.ph ], [ %46, %32 ]
  %49 = add nuw nsw i64 %.02633, 1
  %50 = mul nuw nsw i64 %49, %49
  %.not30 = icmp ugt i64 %50, %.02735
  br i1 %.not30, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !14
}

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

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

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

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

; 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: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

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

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

attributes #0 = { 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 #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 = { "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 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #7 = { 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 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}


; Effective O3 passes: BDCEPass,DivRemPairsPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass