; LLVM IR from Aryansh-S/USACO :: algo_ds/DP/atcoder (c-vacation)

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

@n = external dso_local global i32, align 4
@h = external dso_local global [3 x [200005 x i32]], align 16
@dp = external dso_local global [3 x [200005 x i32]], align 16
@ans = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@_ZSt3cin = external global %"class.std::basic_istream", 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 i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %9 = call noalias ptr @fopen(ptr noundef @.str, ptr noundef @.str.2)
  %10 = icmp ne ptr %9, null
  br i1 %10, label %11, label %16

11:                                               ; preds = %0
  %12 = load ptr, ptr @stdin, align 8, !tbaa !5
  %13 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.2, ptr noundef %12)
  %14 = load ptr, ptr @stdout, align 8, !tbaa !5
  %15 = call ptr @freopen(ptr noundef @.str.3, ptr noundef @.str.4, ptr noundef %14)
  br label %16

16:                                               ; preds = %11, %0
  %17 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !9
  %18 = getelementptr i8, ptr %17, i64 -24
  %19 = load i64, ptr %18, align 8
  %20 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %19
  %21 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %20, ptr noundef null)
  %22 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @_Z2reIRiJEEvOT_DpOT0_(ptr noundef nonnull align 4 dereferenceable(4) @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !11
  br label %23

23:                                               ; preds = %45, %16
  %24 = load i32, ptr %2, align 4, !tbaa !11
  %25 = load i32, ptr @n, align 4, !tbaa !11
  %26 = add nsw i32 %25, 1
  %27 = icmp slt i32 %24, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %23
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %48

29:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !11
  br label %30

30:                                               ; preds = %41, %29
  %31 = load i32, ptr %4, align 4, !tbaa !11
  %32 = icmp slt i32 %31, 3
  br i1 %32, label %34, label %33

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

34:                                               ; preds = %30
  %35 = load i32, ptr %4, align 4, !tbaa !11
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [3 x [200005 x i32]], ptr @h, i64 0, i64 %36
  %38 = load i32, ptr %2, align 4, !tbaa !11
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [200005 x i32], ptr %37, i64 0, i64 %39
  call void @_Z2reIRiJEEvOT_DpOT0_(ptr noundef nonnull align 4 dereferenceable(4) %40)
  br label %41

41:                                               ; preds = %34
  %42 = load i32, ptr %4, align 4, !tbaa !11
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %4, align 4, !tbaa !11
  br label %30, !llvm.loop !13

44:                                               ; preds = %33
  br label %45

45:                                               ; preds = %44
  %46 = load i32, ptr %2, align 4, !tbaa !11
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %2, align 4, !tbaa !11
  br label %23, !llvm.loop !15

48:                                               ; preds = %28
  call void @llvm.memset.p0.i64(ptr align 16 @dp, i8 -63, i64 2400060, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !11
  br label %49

49:                                               ; preds = %58, %48
  %50 = load i32, ptr %5, align 4, !tbaa !11
  %51 = icmp slt i32 %50, 3
  br i1 %51, label %53, label %52

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

53:                                               ; preds = %49
  %54 = load i32, ptr %5, align 4, !tbaa !11
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [3 x [200005 x i32]], ptr @dp, i64 0, i64 %55
  %57 = getelementptr inbounds [200005 x i32], ptr %56, i64 0, i64 0
  store i32 0, ptr %57, align 4, !tbaa !11
  br label %58

58:                                               ; preds = %53
  %59 = load i32, ptr %5, align 4, !tbaa !11
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %5, align 4, !tbaa !11
  br label %49, !llvm.loop !16

61:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !11
  br label %62

62:                                               ; preds = %133, %61
  %63 = load i32, ptr %6, align 4, !tbaa !11
  %64 = load i32, ptr @n, align 4, !tbaa !11
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %62
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %136

67:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !11
  br label %68

68:                                               ; preds = %129, %67
  %69 = load i32, ptr %7, align 4, !tbaa !11
  %70 = icmp slt i32 %69, 3
  br i1 %70, label %72, label %71

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

72:                                               ; preds = %68
  %73 = load i32, ptr %7, align 4, !tbaa !11
  %74 = add nsw i32 %73, 1
  %75 = srem i32 %74, 3
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [3 x [200005 x i32]], ptr @dp, i64 0, i64 %76
  %78 = load i32, ptr %6, align 4, !tbaa !11
  %79 = add nsw i32 %78, 1
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [200005 x i32], ptr %77, i64 0, i64 %80
  %82 = load i32, ptr %7, align 4, !tbaa !11
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [3 x [200005 x i32]], ptr @dp, i64 0, i64 %83
  %85 = load i32, ptr %6, align 4, !tbaa !11
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [200005 x i32], ptr %84, i64 0, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !11
  %89 = load i32, ptr %7, align 4, !tbaa !11
  %90 = add nsw i32 %89, 1
  %91 = srem i32 %90, 3
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [3 x [200005 x i32]], ptr @h, i64 0, i64 %92
  %94 = load i32, ptr %6, align 4, !tbaa !11
  %95 = add nsw i32 %94, 1
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [200005 x i32], ptr %93, i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !11
  %99 = add nsw i32 %88, %98
  %100 = call noundef zeroext i1 @_Z5ckmaxIiEbRT_S0_(ptr noundef nonnull align 4 dereferenceable(4) %81, i32 noundef %99)
  %101 = load i32, ptr %7, align 4, !tbaa !11
  %102 = add nsw i32 %101, 2
  %103 = srem i32 %102, 3
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [3 x [200005 x i32]], ptr @dp, i64 0, i64 %104
  %106 = load i32, ptr %6, align 4, !tbaa !11
  %107 = add nsw i32 %106, 1
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [200005 x i32], ptr %105, i64 0, i64 %108
  %110 = load i32, ptr %7, align 4, !tbaa !11
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [3 x [200005 x i32]], ptr @dp, i64 0, i64 %111
  %113 = load i32, ptr %6, align 4, !tbaa !11
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [200005 x i32], ptr %112, i64 0, i64 %114
  %116 = load i32, ptr %115, align 4, !tbaa !11
  %117 = load i32, ptr %7, align 4, !tbaa !11
  %118 = add nsw i32 %117, 2
  %119 = srem i32 %118, 3
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [3 x [200005 x i32]], ptr @h, i64 0, i64 %120
  %122 = load i32, ptr %6, align 4, !tbaa !11
  %123 = add nsw i32 %122, 1
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [200005 x i32], ptr %121, i64 0, i64 %124
  %126 = load i32, ptr %125, align 4, !tbaa !11
  %127 = add nsw i32 %116, %126
  %128 = call noundef zeroext i1 @_Z5ckmaxIiEbRT_S0_(ptr noundef nonnull align 4 dereferenceable(4) %109, i32 noundef %127)
  br label %129

129:                                              ; preds = %72
  %130 = load i32, ptr %7, align 4, !tbaa !11
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %7, align 4, !tbaa !11
  br label %68, !llvm.loop !17

132:                                              ; preds = %71
  br label %133

133:                                              ; preds = %132
  %134 = load i32, ptr %6, align 4, !tbaa !11
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %6, align 4, !tbaa !11
  br label %62, !llvm.loop !18

136:                                              ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !11
  br label %137

137:                                              ; preds = %150, %136
  %138 = load i32, ptr %8, align 4, !tbaa !11
  %139 = icmp slt i32 %138, 3
  br i1 %139, label %141, label %140

140:                                              ; preds = %137
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %153

141:                                              ; preds = %137
  %142 = load i32, ptr %8, align 4, !tbaa !11
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [3 x [200005 x i32]], ptr @dp, i64 0, i64 %143
  %145 = load i32, ptr @n, align 4, !tbaa !11
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [200005 x i32], ptr %144, i64 0, i64 %146
  %148 = load i32, ptr %147, align 4, !tbaa !11
  %149 = call noundef zeroext i1 @_Z5ckmaxIiEbRT_S0_(ptr noundef nonnull align 4 dereferenceable(4) @ans, i32 noundef %148)
  br label %150

150:                                              ; preds = %141
  %151 = load i32, ptr %8, align 4, !tbaa !11
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %8, align 4, !tbaa !11
  br label %137, !llvm.loop !19

153:                                              ; preds = %140
  call void @_Z2prIRiJEEvOT_DpOT0_(ptr noundef nonnull align 4 dereferenceable(4) @ans)
  %154 = load i32, ptr %1, align 4
  ret i32 %154
}

declare noalias ptr @fopen(ptr noundef, ptr noundef) #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2reIRiJEEvOT_DpOT0_(ptr noundef nonnull align 4 dereferenceable(4)) #3

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z5ckmaxIiEbRT_S0_(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2prIRiJEEvOT_DpOT0_(ptr noundef nonnull align 4 dereferenceable(4)) #3

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 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}


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

@n = external dso_local global i32, align 4
@h = external dso_local global [3 x [200005 x i32]], align 16
@dp = external dso_local global [3 x [200005 x i32]], align 16
@ans = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call noalias ptr @fopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.2)
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %7, label %2

2:                                                ; preds = %0
  %3 = load ptr, ptr @stdin, align 8, !tbaa !5
  %4 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.2, ptr noundef %3)
  %5 = load ptr, ptr @stdout, align 8, !tbaa !5
  %6 = tail call ptr @freopen(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, ptr noundef %5)
  br label %7

7:                                                ; preds = %2, %0
  %8 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !9
  %9 = getelementptr i8, ptr %8, i64 -24
  %10 = load i64, ptr %9, align 8
  %11 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %10
  %12 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %11, ptr noundef null)
  %13 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  tail call void @_Z2reIRiJEEvOT_DpOT0_(ptr noundef nonnull align 4 dereferenceable(4) @n)
  %14 = load i32, ptr @n, align 4, !tbaa !11
  %.not3439 = icmp slt i32 %14, 1
  br i1 %.not3439, label %._crit_edge.thread, label %.preheader37

._crit_edge.thread:                               ; preds = %7
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(2400060) @dp, i8 -63, i64 2400060, i1 false)
  store i32 0, ptr @dp, align 16, !tbaa !11
  store i32 0, ptr getelementptr inbounds (i8, ptr @dp, i64 800020), align 4, !tbaa !11
  store i32 0, ptr getelementptr inbounds (i8, ptr @dp, i64 1600040), align 8, !tbaa !11
  br label %._crit_edge..preheader_crit_edge

.preheader37:                                     ; preds = %7, %.preheader37
  %indvars.iv = phi i64 [ %indvars.iv.next, %.preheader37 ], [ 1, %7 ]
  %15 = getelementptr inbounds [3 x [200005 x i32]], ptr @h, i64 0, i64 0, i64 %indvars.iv
  tail call void @_Z2reIRiJEEvOT_DpOT0_(ptr noundef nonnull align 4 dereferenceable(4) %15)
  %16 = getelementptr inbounds [3 x [200005 x i32]], ptr @h, i64 0, i64 1, i64 %indvars.iv
  tail call void @_Z2reIRiJEEvOT_DpOT0_(ptr noundef nonnull align 4 dereferenceable(4) %16)
  %17 = getelementptr inbounds [3 x [200005 x i32]], ptr @h, i64 0, i64 2, i64 %indvars.iv
  tail call void @_Z2reIRiJEEvOT_DpOT0_(ptr noundef nonnull align 4 dereferenceable(4) %17)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %18 = load i32, ptr @n, align 4, !tbaa !11
  %19 = sext i32 %18 to i64
  %.not34.not = icmp slt i64 %indvars.iv, %19
  br i1 %.not34.not, label %.preheader37, label %._crit_edge, !llvm.loop !13

._crit_edge:                                      ; preds = %.preheader37
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(2400060) @dp, i8 -63, i64 2400060, i1 false)
  store i32 0, ptr @dp, align 16, !tbaa !11
  store i32 0, ptr getelementptr inbounds (i8, ptr @dp, i64 800020), align 4, !tbaa !11
  store i32 0, ptr getelementptr inbounds (i8, ptr @dp, i64 1600040), align 8, !tbaa !11
  %20 = icmp sgt i32 %18, 0
  br i1 %20, label %.preheader35, label %._crit_edge..preheader_crit_edge

._crit_edge..preheader_crit_edge:                 ; preds = %._crit_edge.thread, %._crit_edge
  %21 = phi i32 [ %14, %._crit_edge.thread ], [ %18, %._crit_edge ]
  %.pre = sext i32 %21 to i64
  br label %.preheader

.preheader35:                                     ; preds = %._crit_edge, %.preheader35
  %indvars.iv54 = phi i64 [ %indvars.iv.next55, %.preheader35 ], [ 0, %._crit_edge ]
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %22 = getelementptr inbounds [3 x [200005 x i32]], ptr @dp, i64 0, i64 1, i64 %indvars.iv.next55
  %23 = getelementptr inbounds [3 x [200005 x i32]], ptr @dp, i64 0, i64 0, i64 %indvars.iv54
  %24 = load i32, ptr %23, align 4, !tbaa !11
  %25 = getelementptr inbounds [3 x [200005 x i32]], ptr @h, i64 0, i64 1, i64 %indvars.iv.next55
  %26 = load i32, ptr %25, align 4, !tbaa !11
  %27 = add nsw i32 %26, %24
  %28 = tail call noundef zeroext i1 @_Z5ckmaxIiEbRT_S0_(ptr noundef nonnull align 4 dereferenceable(4) %22, i32 noundef %27)
  %29 = getelementptr inbounds [3 x [200005 x i32]], ptr @dp, i64 0, i64 2, i64 %indvars.iv.next55
  %30 = load i32, ptr %23, align 4, !tbaa !11
  %31 = getelementptr inbounds [3 x [200005 x i32]], ptr @h, i64 0, i64 2, i64 %indvars.iv.next55
  %32 = load i32, ptr %31, align 4, !tbaa !11
  %33 = add nsw i32 %32, %30
  %34 = tail call noundef zeroext i1 @_Z5ckmaxIiEbRT_S0_(ptr noundef nonnull align 4 dereferenceable(4) %29, i32 noundef %33)
  %35 = getelementptr inbounds [3 x [200005 x i32]], ptr @dp, i64 0, i64 1, i64 %indvars.iv54
  %36 = load i32, ptr %35, align 4, !tbaa !11
  %37 = load i32, ptr %31, align 4, !tbaa !11
  %38 = add nsw i32 %37, %36
  %39 = tail call noundef zeroext i1 @_Z5ckmaxIiEbRT_S0_(ptr noundef nonnull align 4 dereferenceable(4) %29, i32 noundef %38)
  %40 = getelementptr inbounds [3 x [200005 x i32]], ptr @dp, i64 0, i64 0, i64 %indvars.iv.next55
  %41 = load i32, ptr %35, align 4, !tbaa !11
  %42 = getelementptr inbounds [3 x [200005 x i32]], ptr @h, i64 0, i64 0, i64 %indvars.iv.next55
  %43 = load i32, ptr %42, align 4, !tbaa !11
  %44 = add nsw i32 %43, %41
  %45 = tail call noundef zeroext i1 @_Z5ckmaxIiEbRT_S0_(ptr noundef nonnull align 4 dereferenceable(4) %40, i32 noundef %44)
  %46 = getelementptr inbounds [3 x [200005 x i32]], ptr @dp, i64 0, i64 2, i64 %indvars.iv54
  %47 = load i32, ptr %46, align 4, !tbaa !11
  %48 = load i32, ptr %42, align 4, !tbaa !11
  %49 = add nsw i32 %48, %47
  %50 = tail call noundef zeroext i1 @_Z5ckmaxIiEbRT_S0_(ptr noundef nonnull align 4 dereferenceable(4) %40, i32 noundef %49)
  %51 = load i32, ptr %46, align 4, !tbaa !11
  %52 = load i32, ptr %25, align 4, !tbaa !11
  %53 = add nsw i32 %52, %51
  %54 = tail call noundef zeroext i1 @_Z5ckmaxIiEbRT_S0_(ptr noundef nonnull align 4 dereferenceable(4) %22, i32 noundef %53)
  %55 = load i32, ptr @n, align 4, !tbaa !11
  %56 = sext i32 %55 to i64
  %57 = icmp slt i64 %indvars.iv.next55, %56
  br i1 %57, label %.preheader35, label %.preheader, !llvm.loop !15

.preheader:                                       ; preds = %.preheader35, %._crit_edge..preheader_crit_edge
  %.pre-phi = phi i64 [ %.pre, %._crit_edge..preheader_crit_edge ], [ %56, %.preheader35 ]
  %58 = getelementptr inbounds [3 x [200005 x i32]], ptr @dp, i64 0, i64 0, i64 %.pre-phi
  %59 = load i32, ptr %58, align 4, !tbaa !11
  %60 = tail call noundef zeroext i1 @_Z5ckmaxIiEbRT_S0_(ptr noundef nonnull align 4 dereferenceable(4) @ans, i32 noundef %59)
  %61 = load i32, ptr @n, align 4, !tbaa !11
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [3 x [200005 x i32]], ptr @dp, i64 0, i64 1, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !11
  %65 = tail call noundef zeroext i1 @_Z5ckmaxIiEbRT_S0_(ptr noundef nonnull align 4 dereferenceable(4) @ans, i32 noundef %64)
  %66 = load i32, ptr @n, align 4, !tbaa !11
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [3 x [200005 x i32]], ptr @dp, i64 0, i64 2, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !11
  %70 = tail call noundef zeroext i1 @_Z5ckmaxIiEbRT_S0_(ptr noundef nonnull align 4 dereferenceable(4) @ans, i32 noundef %69)
  tail call void @_Z2prIRiJEEvOT_DpOT0_(ptr noundef nonnull align 4 dereferenceable(4) @ans)
  ret i32 0
}

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2reIRiJEEvOT_DpOT0_(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z5ckmaxIiEbRT_S0_(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2prIRiJEEvOT_DpOT0_(ptr noundef nonnull align 4 dereferenceable(4)) 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 = { nofree nounwind "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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }

!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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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