; LLVM IR from ahr9n/psolving-paradigms :: 4.dynamic-programming/21.non-classical (CodeForces 265D - Good Sequences)

; 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::initializer_list" = type { ptr, i64 }

@n = external dso_local global i32, align 4
@a = external dso_local global i32, align 4
@dp = external dso_local global [200005 x i32], align 16
@d = external dso_local global [200005 x i32], 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 [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8

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

22:                                               ; preds = %111, %0
  %23 = load i32, ptr %2, align 4, !tbaa !11
  %24 = load i32, ptr @n, align 4, !tbaa !11
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %114

27:                                               ; preds = %22
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @a)
  %29 = load i32, ptr @a, align 4, !tbaa !11
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [200005 x i32], ptr @d, i64 0, i64 %30
  store i32 1, ptr %31, align 4, !tbaa !11
  %32 = load i32, ptr @a, align 4, !tbaa !11
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [200005 x i32], ptr @dp, i64 0, i64 %33
  store i32 1, ptr %34, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 2, ptr %4, align 4, !tbaa !11
  br label %35

35:                                               ; preds = %77, %27
  %36 = load i32, ptr %4, align 4, !tbaa !11
  %37 = load i32, ptr %4, align 4, !tbaa !11
  %38 = mul nsw i32 %36, %37
  %39 = load i32, ptr @a, align 4, !tbaa !11
  %40 = icmp sle i32 %38, %39
  br i1 %40, label %42, label %41

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

42:                                               ; preds = %35
  %43 = load i32, ptr @a, align 4, !tbaa !11
  %44 = load i32, ptr %4, align 4, !tbaa !11
  %45 = srem i32 %43, %44
  %46 = icmp ne i32 %45, 0
  br i1 %46, label %47, label %48

47:                                               ; preds = %42
  br label %77

48:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 12, ptr %6) #5
  %49 = load i32, ptr @a, align 4, !tbaa !11
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [200005 x i32], ptr @dp, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !11
  store i32 %52, ptr %6, align 4, !tbaa !11
  %53 = getelementptr inbounds i32, ptr %6, i64 1
  %54 = load i32, ptr %4, align 4, !tbaa !11
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [200005 x i32], ptr @d, i64 0, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !11
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %53, align 4, !tbaa !11
  %59 = getelementptr inbounds i32, ptr %6, i64 2
  %60 = load i32, ptr @a, align 4, !tbaa !11
  %61 = load i32, ptr %4, align 4, !tbaa !11
  %62 = sdiv i32 %60, %61
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [200005 x i32], ptr @d, i64 0, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !11
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %59, align 4, !tbaa !11
  %67 = getelementptr inbounds %"class.std::initializer_list", ptr %5, i32 0, i32 0
  store ptr %6, ptr %67, align 8, !tbaa !13
  %68 = getelementptr inbounds %"class.std::initializer_list", ptr %5, i32 0, i32 1
  store i64 3, ptr %68, align 8, !tbaa !16
  %69 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8
  %71 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 1
  %72 = load i64, ptr %71, align 8
  %73 = call noundef i32 @_ZSt3maxIiET_St16initializer_listIS0_E(ptr %70, i64 %72)
  %74 = load i32, ptr @a, align 4, !tbaa !11
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [200005 x i32], ptr @dp, i64 0, i64 %75
  store i32 %73, ptr %76, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 12, ptr %6) #5
  br label %77

77:                                               ; preds = %48, %47
  %78 = load i32, ptr %4, align 4, !tbaa !11
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %4, align 4, !tbaa !11
  br label %35, !llvm.loop !17

80:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 2, ptr %7, align 4, !tbaa !11
  br label %81

81:                                               ; preds = %107, %80
  %82 = load i32, ptr %7, align 4, !tbaa !11
  %83 = load i32, ptr %7, align 4, !tbaa !11
  %84 = mul nsw i32 %82, %83
  %85 = load i32, ptr @a, align 4, !tbaa !11
  %86 = icmp sle i32 %84, %85
  br i1 %86, label %88, label %87

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

88:                                               ; preds = %81
  %89 = load i32, ptr @a, align 4, !tbaa !11
  %90 = load i32, ptr %7, align 4, !tbaa !11
  %91 = srem i32 %89, %90
  %92 = icmp ne i32 %91, 0
  br i1 %92, label %93, label %94

93:                                               ; preds = %88
  br label %107

94:                                               ; preds = %88
  %95 = load i32, ptr @a, align 4, !tbaa !11
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [200005 x i32], ptr @dp, i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !11
  %99 = load i32, ptr @a, align 4, !tbaa !11
  %100 = load i32, ptr %7, align 4, !tbaa !11
  %101 = sdiv i32 %99, %100
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [200005 x i32], ptr @d, i64 0, i64 %102
  store i32 %98, ptr %103, align 4, !tbaa !11
  %104 = load i32, ptr %7, align 4, !tbaa !11
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [200005 x i32], ptr @d, i64 0, i64 %105
  store i32 %98, ptr %106, align 4, !tbaa !11
  br label %107

107:                                              ; preds = %94, %93
  %108 = load i32, ptr %7, align 4, !tbaa !11
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %7, align 4, !tbaa !11
  br label %81, !llvm.loop !19

110:                                              ; preds = %87
  br label %111

111:                                              ; preds = %110
  %112 = load i32, ptr %2, align 4, !tbaa !11
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %2, align 4, !tbaa !11
  br label %22, !llvm.loop !20

114:                                              ; preds = %26
  %115 = call noundef ptr @_ZSt11max_elementIPiET_S1_S1_(ptr noundef @dp, ptr noundef getelementptr inbounds (i32, ptr @dp, i64 200005))
  %116 = load i32, ptr %115, align 4, !tbaa !11
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %116)
  ret i32 0
}

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

; 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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #1

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZSt3maxIiET_St16initializer_listIS0_E(ptr, i64) #4

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11max_elementIPiET_S1_S1_(ptr noundef, ptr noundef) #4

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 = { "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 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = !{!14, !9, i64 0}
!14 = !{!"_ZTSSt16initializer_listIiE", !9, i64 0, !15, i64 8}
!15 = !{!"long", !10, i64 0}
!16 = !{!14, !15, i64 8}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !18}


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

@n = external dso_local global i32, align 4
@a = external dso_local global i32, align 4
@dp = external dso_local global [200005 x i32], align 16
@d = external dso_local local_unnamed_addr global [200005 x i32], 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 [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [3 x i32], align 4
  %2 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %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 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %9 = getelementptr i8, ptr %8, i64 -24
  %10 = load i64, ptr %9, align 8
  %11 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %10
  %12 = tail call noundef i64 @_ZNSt8ios_base9precisionEl(ptr noundef nonnull align 8 dereferenceable(216) %11, i64 noundef 9)
  %13 = load ptr, ptr @stdin, align 8, !tbaa !8
  %14 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %13)
  %15 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %16 = load i32, ptr @n, align 4, !tbaa !11
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph28, label %._crit_edge29

.lr.ph28:                                         ; preds = %0
  %18 = getelementptr inbounds i8, ptr %1, i64 4
  %19 = getelementptr inbounds i8, ptr %1, i64 8
  br label %23

._crit_edge29:                                    ; preds = %._crit_edge, %0
  %20 = call noundef ptr @_ZSt11max_elementIPiET_S1_S1_(ptr noundef nonnull @dp, ptr noundef nonnull getelementptr inbounds (i8, ptr @dp, i64 800020))
  %21 = load i32, ptr %20, align 4, !tbaa !11
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %21)
  ret i32 0

23:                                               ; preds = %.lr.ph28, %._crit_edge
  %.01426 = phi i32 [ 0, %.lr.ph28 ], [ %54, %._crit_edge ]
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @a)
  %25 = load i32, ptr @a, align 4, !tbaa !11
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [200005 x i32], ptr @d, i64 0, i64 %26
  store i32 1, ptr %27, align 4, !tbaa !11
  %28 = getelementptr inbounds [200005 x i32], ptr @dp, i64 0, i64 %26
  store i32 1, ptr %28, align 4, !tbaa !11
  %.not21 = icmp slt i32 %25, 4
  br i1 %.not21, label %._crit_edge, label %.lr.ph

.preheader:                                       ; preds = %50
  %.not1823 = icmp slt i32 %51, 4
  br i1 %.not1823, label %._crit_edge, label %.lr.ph25

.lr.ph25:                                         ; preds = %.preheader
  %29 = zext nneg i32 %51 to i64
  %30 = getelementptr inbounds [200005 x i32], ptr @dp, i64 0, i64 %29
  br label %57

.lr.ph:                                           ; preds = %23, %50
  %31 = phi i32 [ %51, %50 ], [ %25, %23 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %50 ], [ 2, %23 ]
  %32 = trunc nuw nsw i64 %indvars.iv to i32
  %33 = srem i32 %31, %32
  %34 = sdiv i32 %31, %32
  %.not20 = icmp eq i32 %33, 0
  br i1 %.not20, label %35, label %50

35:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %1) #5
  %36 = sext i32 %31 to i64
  %37 = getelementptr inbounds [200005 x i32], ptr @dp, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !11
  store i32 %38, ptr %1, align 4, !tbaa !11
  %39 = getelementptr inbounds [200005 x i32], ptr @d, i64 0, i64 %indvars.iv
  %40 = load i32, ptr %39, align 4, !tbaa !11
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %18, align 4, !tbaa !11
  %42 = sext i32 %34 to i64
  %43 = getelementptr inbounds [200005 x i32], ptr @d, i64 0, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !11
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %19, align 4, !tbaa !11
  %46 = call noundef i32 @_ZSt3maxIiET_St16initializer_listIS0_E(ptr nonnull %1, i64 3)
  %47 = load i32, ptr @a, align 4, !tbaa !11
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [200005 x i32], ptr @dp, i64 0, i64 %48
  store i32 %46, ptr %49, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %1) #5
  br label %50

50:                                               ; preds = %.lr.ph, %35
  %51 = phi i32 [ %31, %.lr.ph ], [ %47, %35 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %52 = mul nuw nsw i64 %indvars.iv.next, %indvars.iv.next
  %53 = trunc nuw i64 %52 to i32
  %.not = icmp slt i32 %51, %53
  br i1 %.not, label %.preheader, label %.lr.ph, !llvm.loop !13

._crit_edge:                                      ; preds = %66, %23, %.preheader
  %54 = add nuw nsw i32 %.01426, 1
  %55 = load i32, ptr @n, align 4, !tbaa !11
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %23, label %._crit_edge29, !llvm.loop !15

57:                                               ; preds = %.lr.ph25, %66
  %indvars.iv32 = phi i64 [ 2, %.lr.ph25 ], [ %indvars.iv.next33, %66 ]
  %58 = trunc nuw nsw i64 %indvars.iv32 to i32
  %59 = urem i32 %51, %58
  %60 = udiv i32 %51, %58
  %.not19 = icmp eq i32 %59, 0
  br i1 %.not19, label %61, label %66

61:                                               ; preds = %57
  %62 = load i32, ptr %30, align 4, !tbaa !11
  %63 = zext nneg i32 %60 to i64
  %64 = getelementptr inbounds [200005 x i32], ptr @d, i64 0, i64 %63
  store i32 %62, ptr %64, align 4, !tbaa !11
  %65 = getelementptr inbounds [200005 x i32], ptr @d, i64 0, i64 %indvars.iv32
  store i32 %62, ptr %65, align 4, !tbaa !11
  br label %66

66:                                               ; preds = %57, %61
  %indvars.iv.next33 = add nuw nsw i64 %indvars.iv32, 1
  %67 = mul nuw nsw i64 %indvars.iv.next33, %indvars.iv.next33
  %68 = trunc nuw i64 %67 to i32
  %.not18 = icmp slt i32 %51, %68
  br i1 %.not18, label %._crit_edge, label %57, !llvm.loop !16
}

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

; 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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZSt3maxIiET_St16initializer_listIS0_E(ptr, i64) local_unnamed_addr #4

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11max_elementIPiET_S1_S1_(ptr noundef, ptr noundef) local_unnamed_addr #4

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 = { "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 = { 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


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