; LLVM IR from Aryansh-S/USACO :: algo_ds/DP/atcoder (i-coins)

; 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" }
%"struct.std::_Setprecision" = type { i32 }

@n = external dso_local global i32, align 4
@p = external dso_local global [3005 x x86_fp80], align 16
@ans = external dso_local global x86_fp80, align 16
@dp = external dso_local global [3005 x [3005 x x86_fp80]], align 16
@.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
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca %"struct.std::_Setprecision", align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %7 = call noalias ptr @fopen(ptr noundef @.str, ptr noundef @.str.2)
  %8 = icmp ne ptr %7, null
  br i1 %8, label %9, label %14

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

14:                                               ; preds = %9, %0
  %15 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !9
  %16 = getelementptr i8, ptr %15, i64 -24
  %17 = load i64, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %17
  %19 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %18, ptr noundef null)
  %20 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @_Z2reIRiJEEvOT_DpOT0_(ptr noundef nonnull align 4 dereferenceable(4) @n)
  %21 = load i32, ptr @n, align 4, !tbaa !11
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds x86_fp80, ptr @p, i64 %22
  call void @_Z2inIPeEvT_S1_(ptr noundef @p, ptr noundef %23)
  store x86_fp80 0xK3FFF8000000000000000, ptr @dp, align 16, !tbaa !13
  %24 = call i32 @_ZSt12setprecisioni(i32 noundef 9)
  %25 = getelementptr inbounds %"struct.std::_Setprecision", ptr %2, i32 0, i32 0
  store i32 %24, ptr %25, align 4
  %26 = getelementptr inbounds %"struct.std::_Setprecision", ptr %2, i32 0, i32 0
  %27 = load i32, ptr %26, align 4
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 %27)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 0, ptr %3, align 4, !tbaa !11
  br label %29

29:                                               ; preds = %99, %14
  %30 = load i32, ptr %3, align 4, !tbaa !11
  %31 = load i32, ptr @n, align 4, !tbaa !11
  %32 = add nsw i32 %31, 1
  %33 = icmp slt i32 %30, %32
  br i1 %33, label %35, label %34

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

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

36:                                               ; preds = %95, %35
  %37 = load i32, ptr %5, align 4, !tbaa !11
  %38 = load i32, ptr @n, align 4, !tbaa !11
  %39 = add nsw i32 %38, 1
  %40 = icmp slt i32 %37, %39
  br i1 %40, label %42, label %41

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

42:                                               ; preds = %36
  %43 = load i32, ptr %3, align 4, !tbaa !11
  %44 = load i32, ptr %5, align 4, !tbaa !11
  %45 = add nsw i32 %43, %44
  %46 = load i32, ptr @n, align 4, !tbaa !11
  %47 = icmp sle i32 %45, %46
  br i1 %47, label %48, label %94

48:                                               ; preds = %42
  %49 = load i32, ptr %3, align 4, !tbaa !11
  %50 = load i32, ptr %5, align 4, !tbaa !11
  %51 = add nsw i32 %49, %50
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [3005 x x86_fp80], ptr @p, i64 0, i64 %52
  %54 = load x86_fp80, ptr %53, align 16, !tbaa !13
  %55 = load i32, ptr %3, align 4, !tbaa !11
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [3005 x [3005 x x86_fp80]], ptr @dp, i64 0, i64 %56
  %58 = load i32, ptr %5, align 4, !tbaa !11
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [3005 x x86_fp80], ptr %57, i64 0, i64 %59
  %61 = load x86_fp80, ptr %60, align 16, !tbaa !13
  %62 = load i32, ptr %3, align 4, !tbaa !11
  %63 = add nsw i32 %62, 1
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [3005 x [3005 x x86_fp80]], ptr @dp, i64 0, i64 %64
  %66 = load i32, ptr %5, align 4, !tbaa !11
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [3005 x x86_fp80], ptr %65, i64 0, i64 %67
  %69 = load x86_fp80, ptr %68, align 16, !tbaa !13
  %70 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %54, x86_fp80 %61, x86_fp80 %69)
  store x86_fp80 %70, ptr %68, align 16, !tbaa !13
  %71 = load i32, ptr %3, align 4, !tbaa !11
  %72 = load i32, ptr %5, align 4, !tbaa !11
  %73 = add nsw i32 %71, %72
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [3005 x x86_fp80], ptr @p, i64 0, i64 %74
  %76 = load x86_fp80, ptr %75, align 16, !tbaa !13
  %77 = fsub x86_fp80 0xK3FFF8000000000000000, %76
  %78 = load i32, ptr %3, align 4, !tbaa !11
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [3005 x [3005 x x86_fp80]], ptr @dp, i64 0, i64 %79
  %81 = load i32, ptr %5, align 4, !tbaa !11
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [3005 x x86_fp80], ptr %80, i64 0, i64 %82
  %84 = load x86_fp80, ptr %83, align 16, !tbaa !13
  %85 = load i32, ptr %3, align 4, !tbaa !11
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [3005 x [3005 x x86_fp80]], ptr @dp, i64 0, i64 %86
  %88 = load i32, ptr %5, align 4, !tbaa !11
  %89 = add nsw i32 %88, 1
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [3005 x x86_fp80], ptr %87, i64 0, i64 %90
  %92 = load x86_fp80, ptr %91, align 16, !tbaa !13
  %93 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %77, x86_fp80 %84, x86_fp80 %92)
  store x86_fp80 %93, ptr %91, align 16, !tbaa !13
  br label %94

94:                                               ; preds = %48, %42
  br label %95

95:                                               ; preds = %94
  %96 = load i32, ptr %5, align 4, !tbaa !11
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %5, align 4, !tbaa !11
  br label %36, !llvm.loop !15

98:                                               ; preds = %41
  br label %99

99:                                               ; preds = %98
  %100 = load i32, ptr %3, align 4, !tbaa !11
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %3, align 4, !tbaa !11
  br label %29, !llvm.loop !17

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

103:                                              ; preds = %128, %102
  %104 = load i32, ptr %6, align 4, !tbaa !11
  %105 = load i32, ptr @n, align 4, !tbaa !11
  %106 = add nsw i32 %105, 1
  %107 = icmp slt i32 %104, %106
  br i1 %107, label %109, label %108

108:                                              ; preds = %103
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %131

109:                                              ; preds = %103
  %110 = load i32, ptr %6, align 4, !tbaa !11
  %111 = load i32, ptr @n, align 4, !tbaa !11
  %112 = load i32, ptr %6, align 4, !tbaa !11
  %113 = sub nsw i32 %111, %112
  %114 = icmp sgt i32 %110, %113
  br i1 %114, label %115, label %127

115:                                              ; preds = %109
  %116 = load i32, ptr %6, align 4, !tbaa !11
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [3005 x [3005 x x86_fp80]], ptr @dp, i64 0, i64 %117
  %119 = load i32, ptr @n, align 4, !tbaa !11
  %120 = load i32, ptr %6, align 4, !tbaa !11
  %121 = sub nsw i32 %119, %120
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [3005 x x86_fp80], ptr %118, i64 0, i64 %122
  %124 = load x86_fp80, ptr %123, align 16, !tbaa !13
  %125 = load x86_fp80, ptr @ans, align 16, !tbaa !13
  %126 = fadd x86_fp80 %125, %124
  store x86_fp80 %126, ptr @ans, align 16, !tbaa !13
  br label %127

127:                                              ; preds = %115, %109
  br label %128

128:                                              ; preds = %127
  %129 = load i32, ptr %6, align 4, !tbaa !11
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %6, align 4, !tbaa !11
  br label %103, !llvm.loop !18

131:                                              ; preds = %108
  call void @_Z2prIReJEEvOT_DpOT0_(ptr noundef nonnull align 16 dereferenceable(16) @ans)
  %132 = load i32, ptr %1, align 4
  ret i32 %132
}

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: mustprogress uwtable
declare dso_local void @_Z2inIPeEvT_S1_(ptr noundef, ptr noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8), i32) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i32 @_ZSt12setprecisioni(i32 noundef) #5

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare x86_fp80 @llvm.fmuladd.f80(x86_fp80, x86_fp80, x86_fp80) #7

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2prIReJEEvOT_DpOT0_(ptr noundef nonnull align 16 dereferenceable(16)) #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 = { 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 = { 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 #6 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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 = !{!14, !14, i64 0}
!14 = !{!"long double", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}


; 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
@p = external dso_local global [3005 x x86_fp80], align 16
@ans = external dso_local global x86_fp80, align 16
@dp = external dso_local local_unnamed_addr global [3005 x [3005 x x86_fp80]], align 16
@.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
@_ZSt4cout = external global %"class.std::basic_ostream", 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
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds x86_fp80, ptr @p, i64 %15
  tail call void @_Z2inIPeEvT_S1_(ptr noundef nonnull @p, ptr noundef nonnull %16)
  store x86_fp80 0xK3FFF8000000000000000, ptr @dp, align 16, !tbaa !13
  %17 = tail call i32 @_ZSt12setprecisioni(i32 noundef 9)
  %18 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 %17)
  %19 = load i32, ptr @n, align 4, !tbaa !11
  %.not2936 = icmp slt i32 %19, 0
  br i1 %.not2936, label %._crit_edge40, label %.preheader33.preheader

.preheader33.preheader:                           ; preds = %7
  %20 = zext nneg i32 %19 to i64
  %21 = add nuw i32 %19, 1
  %wide.trip.count45 = zext i32 %21 to i64
  br label %.preheader33

.preheader33:                                     ; preds = %.preheader33.preheader, %._crit_edge
  %indvars.iv42 = phi i64 [ 0, %.preheader33.preheader ], [ %indvars.iv.next43, %._crit_edge ]
  %indvars.iv.next43 = add nuw nsw i64 %indvars.iv42, 1
  br label %24

.preheader:                                       ; preds = %._crit_edge
  br i1 %.not2936, label %._crit_edge40, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader
  %ans.promoted = load x86_fp80, ptr @ans, align 16, !tbaa !13
  %22 = zext nneg i32 %19 to i64
  %xtraiter = and i64 %wide.trip.count45, 1
  %23 = icmp eq i32 %19, 0
  br i1 %23, label %._crit_edge40.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %wide.trip.count45, 4294967294
  br label %.lr.ph

._crit_edge:                                      ; preds = %39
  %exitcond46.not = icmp eq i64 %indvars.iv.next43, %wide.trip.count45
  br i1 %exitcond46.not, label %.preheader, label %.preheader33, !llvm.loop !15

24:                                               ; preds = %.preheader33, %39
  %indvars.iv = phi i64 [ 0, %.preheader33 ], [ %indvars.iv.next.pre-phi, %39 ]
  %25 = add nuw nsw i64 %indvars.iv, %indvars.iv42
  %.not32 = icmp sgt i64 %25, %20
  br i1 %.not32, label %._crit_edge52, label %26

._crit_edge52:                                    ; preds = %24
  %.pre = add nuw nsw i64 %indvars.iv, 1
  br label %39

26:                                               ; preds = %24
  %27 = getelementptr inbounds [3005 x x86_fp80], ptr @p, i64 0, i64 %25
  %28 = load x86_fp80, ptr %27, align 16, !tbaa !13
  %29 = getelementptr inbounds [3005 x [3005 x x86_fp80]], ptr @dp, i64 0, i64 %indvars.iv42, i64 %indvars.iv
  %30 = load x86_fp80, ptr %29, align 16, !tbaa !13
  %31 = getelementptr inbounds [3005 x [3005 x x86_fp80]], ptr @dp, i64 0, i64 %indvars.iv.next43, i64 %indvars.iv
  %32 = load x86_fp80, ptr %31, align 16, !tbaa !13
  %33 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %28, x86_fp80 %30, x86_fp80 %32)
  store x86_fp80 %33, ptr %31, align 16, !tbaa !13
  %34 = fsub x86_fp80 0xK3FFF8000000000000000, %28
  %35 = add nuw nsw i64 %indvars.iv, 1
  %36 = getelementptr inbounds [3005 x [3005 x x86_fp80]], ptr @dp, i64 0, i64 %indvars.iv42, i64 %35
  %37 = load x86_fp80, ptr %36, align 16, !tbaa !13
  %38 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %34, x86_fp80 %30, x86_fp80 %37)
  store x86_fp80 %38, ptr %36, align 16, !tbaa !13
  br label %39

39:                                               ; preds = %._crit_edge52, %26
  %indvars.iv.next.pre-phi = phi i64 [ %.pre, %._crit_edge52 ], [ %35, %26 ]
  %exitcond.not = icmp eq i64 %indvars.iv.next.pre-phi, %wide.trip.count45
  br i1 %exitcond.not, label %._crit_edge, label %24, !llvm.loop !17

._crit_edge40.loopexit.unr-lcssa:                 ; preds = %65, %.lr.ph.preheader
  %indvars.iv47.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next48.1, %65 ]
  %.unr = phi x86_fp80 [ %ans.promoted, %.lr.ph.preheader ], [ %66, %65 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge40, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge40.loopexit.unr-lcssa
  %indvars49.epil = trunc i64 %indvars.iv47.unr to i32
  %40 = sub nsw i32 %19, %indvars49.epil
  %41 = sext i32 %40 to i64
  %42 = icmp sgt i64 %indvars.iv47.unr, %41
  br i1 %42, label %43, label %._crit_edge40

43:                                               ; preds = %.lr.ph.epil
  %44 = sub nsw i64 %22, %indvars.iv47.unr
  %45 = getelementptr inbounds [3005 x [3005 x x86_fp80]], ptr @dp, i64 0, i64 %indvars.iv47.unr, i64 %44
  %46 = load x86_fp80, ptr %45, align 16, !tbaa !13
  %47 = fadd x86_fp80 %46, %.unr
  store x86_fp80 %47, ptr @ans, align 16, !tbaa !13
  br label %._crit_edge40

._crit_edge40:                                    ; preds = %._crit_edge40.loopexit.unr-lcssa, %43, %.lr.ph.epil, %7, %.preheader
  tail call void @_Z2prIReJEEvOT_DpOT0_(ptr noundef nonnull align 16 dereferenceable(16) @ans)
  ret i32 0

.lr.ph:                                           ; preds = %65, %.lr.ph.preheader.new
  %indvars.iv47 = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next48.1, %65 ]
  %48 = phi x86_fp80 [ %ans.promoted, %.lr.ph.preheader.new ], [ %66, %65 ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.1, %65 ]
  %indvars49 = trunc i64 %indvars.iv47 to i32
  %49 = sub nsw i32 %19, %indvars49
  %50 = sext i32 %49 to i64
  %51 = icmp sgt i64 %indvars.iv47, %50
  br i1 %51, label %52, label %.lr.ph.1

52:                                               ; preds = %.lr.ph
  %53 = sub nsw i64 %22, %indvars.iv47
  %54 = getelementptr inbounds [3005 x [3005 x x86_fp80]], ptr @dp, i64 0, i64 %indvars.iv47, i64 %53
  %55 = load x86_fp80, ptr %54, align 16, !tbaa !13
  %56 = fadd x86_fp80 %55, %48
  store x86_fp80 %56, ptr @ans, align 16, !tbaa !13
  br label %.lr.ph.1

.lr.ph.1:                                         ; preds = %.lr.ph, %52
  %57 = phi x86_fp80 [ %48, %.lr.ph ], [ %56, %52 ]
  %indvars.iv.next48 = or disjoint i64 %indvars.iv47, 1
  %indvars49.1 = trunc i64 %indvars.iv.next48 to i32
  %58 = sub nsw i32 %19, %indvars49.1
  %59 = sext i32 %58 to i64
  %.not53 = icmp slt i64 %indvars.iv47, %59
  br i1 %.not53, label %65, label %60

60:                                               ; preds = %.lr.ph.1
  %61 = sub nsw i64 %22, %indvars.iv.next48
  %62 = getelementptr inbounds [3005 x [3005 x x86_fp80]], ptr @dp, i64 0, i64 %indvars.iv.next48, i64 %61
  %63 = load x86_fp80, ptr %62, align 16, !tbaa !13
  %64 = fadd x86_fp80 %63, %57
  store x86_fp80 %64, ptr @ans, align 16, !tbaa !13
  br label %65

65:                                               ; preds = %60, %.lr.ph.1
  %66 = phi x86_fp80 [ %57, %.lr.ph.1 ], [ %64, %60 ]
  %indvars.iv.next48.1 = add nuw nsw i64 %indvars.iv47, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge40.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !18
}

; 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 uwtable
declare dso_local void @_Z2inIPeEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i32 @_ZSt12setprecisioni(i32 noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare x86_fp80 @llvm.fmuladd.f80(x86_fp80, x86_fp80, x86_fp80) #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2prIReJEEvOT_DpOT0_(ptr noundef nonnull align 16 dereferenceable(16)) 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 = { 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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 = !{!14, !14, i64 0}
!14 = !{!"long double", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}


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