; LLVM IR from Tunghohin/Competitive_Coding :: Nowcoder (28263_B)

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

@dp = external dso_local global [1010 x [1010 x double]], align 16
@_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 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 %"struct.std::_Setprecision", align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %10 = load i32, ptr %2, align 4, !tbaa !5
  %11 = sext i32 %10 to i64
  %12 = getelementptr inbounds [1010 x [1010 x double]], ptr @dp, i64 0, i64 %11
  %13 = load i32, ptr %3, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [1010 x double], ptr %12, i64 0, i64 %14
  store double 0.000000e+00, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  %16 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %16, ptr %4, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %139, %0
  %18 = load i32, ptr %4, align 4, !tbaa !5
  %19 = icmp sge i32 %18, 0
  br i1 %19, label %21, label %20

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

21:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %22 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %22, ptr %6, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %135, %21
  %24 = load i32, ptr %6, align 4, !tbaa !5
  %25 = icmp sge i32 %24, 0
  br i1 %25, label %27, label %26

26:                                               ; preds = %23
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %138

27:                                               ; preds = %23
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = icmp eq i32 %28, %29
  br i1 %30, label %31, label %36

31:                                               ; preds = %27
  %32 = load i32, ptr %6, align 4, !tbaa !5
  %33 = load i32, ptr %3, align 4, !tbaa !5
  %34 = icmp eq i32 %32, %33
  br i1 %34, label %35, label %36

35:                                               ; preds = %31
  br label %135

36:                                               ; preds = %31, %27
  %37 = load i32, ptr %4, align 4, !tbaa !5
  %38 = sitofp i32 %37 to double
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = sitofp i32 %39 to double
  %41 = fdiv double %38, %40
  %42 = load i32, ptr %6, align 4, !tbaa !5
  %43 = sitofp i32 %42 to double
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = sitofp i32 %44 to double
  %46 = fdiv double %43, %45
  %47 = load i32, ptr %4, align 4, !tbaa !5
  %48 = sitofp i32 %47 to double
  %49 = load i32, ptr %2, align 4, !tbaa !5
  %50 = sitofp i32 %49 to double
  %51 = fdiv double %48, %50
  %52 = load i32, ptr %6, align 4, !tbaa !5
  %53 = sitofp i32 %52 to double
  %54 = load i32, ptr %3, align 4, !tbaa !5
  %55 = sitofp i32 %54 to double
  %56 = fdiv double %53, %55
  %57 = fsub double 1.000000e+00, %56
  %58 = fmul double %51, %57
  %59 = load i32, ptr %4, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [1010 x [1010 x double]], ptr @dp, i64 0, i64 %60
  %62 = load i32, ptr %6, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [1010 x double], ptr %61, i64 0, i64 %64
  %66 = load double, ptr %65, align 8, !tbaa !9
  %67 = fadd double %66, 1.000000e+00
  %68 = fmul double %58, %67
  %69 = call double @llvm.fmuladd.f64(double %41, double %46, double %68)
  %70 = load i32, ptr %6, align 4, !tbaa !5
  %71 = sitofp i32 %70 to double
  %72 = load i32, ptr %3, align 4, !tbaa !5
  %73 = sitofp i32 %72 to double
  %74 = fdiv double %71, %73
  %75 = load i32, ptr %4, align 4, !tbaa !5
  %76 = sitofp i32 %75 to double
  %77 = load i32, ptr %2, align 4, !tbaa !5
  %78 = sitofp i32 %77 to double
  %79 = fdiv double %76, %78
  %80 = fsub double 1.000000e+00, %79
  %81 = fmul double %74, %80
  %82 = load i32, ptr %4, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [1010 x [1010 x double]], ptr @dp, i64 0, i64 %84
  %86 = load i32, ptr %6, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [1010 x double], ptr %85, i64 0, i64 %87
  %89 = load double, ptr %88, align 8, !tbaa !9
  %90 = fadd double %89, 1.000000e+00
  %91 = call double @llvm.fmuladd.f64(double %81, double %90, double %69)
  %92 = load i32, ptr %6, align 4, !tbaa !5
  %93 = sitofp i32 %92 to double
  %94 = load i32, ptr %3, align 4, !tbaa !5
  %95 = sitofp i32 %94 to double
  %96 = fdiv double %93, %95
  %97 = fsub double 1.000000e+00, %96
  %98 = load i32, ptr %4, align 4, !tbaa !5
  %99 = sitofp i32 %98 to double
  %100 = load i32, ptr %2, align 4, !tbaa !5
  %101 = sitofp i32 %100 to double
  %102 = fdiv double %99, %101
  %103 = fsub double 1.000000e+00, %102
  %104 = fmul double %97, %103
  %105 = load i32, ptr %4, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [1010 x [1010 x double]], ptr @dp, i64 0, i64 %107
  %109 = load i32, ptr %6, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [1010 x double], ptr %108, i64 0, i64 %111
  %113 = load double, ptr %112, align 8, !tbaa !9
  %114 = fadd double %113, 1.000000e+00
  %115 = call double @llvm.fmuladd.f64(double %104, double %114, double %91)
  %116 = load i32, ptr %4, align 4, !tbaa !5
  %117 = sitofp i32 %116 to double
  %118 = load i32, ptr %2, align 4, !tbaa !5
  %119 = sitofp i32 %118 to double
  %120 = fdiv double %117, %119
  %121 = load i32, ptr %6, align 4, !tbaa !5
  %122 = sitofp i32 %121 to double
  %123 = load i32, ptr %3, align 4, !tbaa !5
  %124 = sitofp i32 %123 to double
  %125 = fdiv double %122, %124
  %126 = fneg double %120
  %127 = call double @llvm.fmuladd.f64(double %126, double %125, double 1.000000e+00)
  %128 = fdiv double %115, %127
  %129 = load i32, ptr %4, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [1010 x [1010 x double]], ptr @dp, i64 0, i64 %130
  %132 = load i32, ptr %6, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [1010 x double], ptr %131, i64 0, i64 %133
  store double %128, ptr %134, align 8, !tbaa !9
  br label %135

135:                                              ; preds = %36, %35
  %136 = load i32, ptr %6, align 4, !tbaa !5
  %137 = add nsw i32 %136, -1
  store i32 %137, ptr %6, align 4, !tbaa !5
  br label %23, !llvm.loop !11

138:                                              ; preds = %26
  br label %139

139:                                              ; preds = %138
  %140 = load i32, ptr %4, align 4, !tbaa !5
  %141 = add nsw i32 %140, -1
  store i32 %141, ptr %4, align 4, !tbaa !5
  br label %17, !llvm.loop !13

142:                                              ; preds = %20
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt5fixedRSt8ios_base)
  %144 = call i32 @_ZSt12setprecisioni(i32 noundef 4)
  %145 = getelementptr inbounds %"struct.std::_Setprecision", ptr %7, i32 0, i32 0
  store i32 %144, ptr %145, align 4
  %146 = getelementptr inbounds %"struct.std::_Setprecision", ptr %7, i32 0, i32 0
  %147 = load i32, ptr %146, align 4
  %148 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) %143, i32 %147)
  %149 = load double, ptr @dp, align 16, !tbaa !9
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %148, double noundef %149)
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %150, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %152 = load i32, ptr %1, align 4
  ret i32 %152
}

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

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

; 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) #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) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt5fixedRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #4

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) #5 align 2

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !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" }

@dp = external dso_local local_unnamed_addr global [1010 x [1010 x double]], align 16
@_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 = alloca i32, align 4
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %3 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %4 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %5 = load i32, ptr %1, align 4, !tbaa !5
  %6 = sext i32 %5 to i64
  %7 = load i32, ptr %2, align 4
  %8 = sext i32 %7 to i64
  %9 = getelementptr inbounds [1010 x [1010 x double]], ptr @dp, i64 0, i64 %6, i64 %8
  store double 0.000000e+00, ptr %9, align 8, !tbaa !9
  %10 = icmp sgt i32 %5, -1
  br i1 %10, label %.preheader.lr.ph, label %._crit_edge29

.preheader.lr.ph:                                 ; preds = %0
  %11 = icmp sgt i32 %7, -1
  %12 = uitofp nneg i32 %5 to double
  %13 = sitofp i32 %7 to double
  br i1 %11, label %.preheader.us.preheader, label %._crit_edge29

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %14 = zext nneg i32 %7 to i64
  %15 = zext nneg i32 %5 to i64
  %.not = icmp eq i32 %7, 0
  %16 = mul nuw nsw i64 %15, 8080
  %17 = shl nuw nsw i64 %14, 3
  %18 = mul nuw nsw i64 %15, 8080
  %19 = shl nuw nsw i64 %14, 3
  %20 = getelementptr i8, ptr @dp, i64 %18
  %21 = getelementptr i8, ptr %20, i64 %19
  %22 = getelementptr i8, ptr @dp, i64 %16
  %23 = getelementptr i8, ptr %22, i64 %17
  %24 = getelementptr i8, ptr %23, i64 8
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us
  %indvar = phi i64 [ 0, %.preheader.us.preheader ], [ %indvar.next, %._crit_edge.us ]
  %indvars.iv40 = phi i64 [ %15, %.preheader.us.preheader ], [ %indvars.iv.next41, %._crit_edge.us ]
  %25 = mul nsw i64 %indvar, -8080
  %scevgep45 = getelementptr i8, ptr %21, i64 %25
  %26 = icmp eq i64 %indvars.iv40, %15
  %27 = trunc nuw nsw i64 %indvars.iv40 to i32
  %28 = uitofp nneg i32 %27 to double
  %29 = fdiv double %28, %12
  %30 = fsub double 1.000000e+00, %29
  %31 = add nuw nsw i64 %indvars.iv40, 1
  %32 = fneg double %29
  %.fr.us = freeze i1 %26
  br i1 %.fr.us, label %.lr.ph.split.us32.preheader, label %.lr.ph.split.us.us.preheader

.lr.ph.split.us.us.preheader:                     ; preds = %.preheader.us
  %33 = mul nsw i64 %indvar, -8080
  %scevgep = getelementptr i8, ptr %24, i64 %33
  %load_initial = load double, ptr %scevgep, align 8
  br label %.lr.ph.split.us.us

.lr.ph.split.us32.preheader:                      ; preds = %.preheader.us
  br i1 %.not, label %._crit_edge.us, label %.lr.ph.split.us32.peel.next.preheader

.lr.ph.split.us32.peel.next.preheader:            ; preds = %.lr.ph.split.us32.preheader
  %load_initial46 = load double, ptr %scevgep45, align 8
  br label %.lr.ph.split.us32.peel.next

.lr.ph.split.us32.peel.next:                      ; preds = %.lr.ph.split.us32.peel.next.preheader, %.lr.ph.split.us32.peel.next
  %store_forwarded47 = phi double [ %load_initial46, %.lr.ph.split.us32.peel.next.preheader ], [ %53, %.lr.ph.split.us32.peel.next ]
  %indvars.iv36.in = phi i64 [ %14, %.lr.ph.split.us32.peel.next.preheader ], [ %indvars.iv36, %.lr.ph.split.us32.peel.next ]
  %indvars.iv36 = add nsw i64 %indvars.iv36.in, -1
  %34 = trunc nuw nsw i64 %indvars.iv36 to i32
  %35 = uitofp nneg i32 %34 to double
  %36 = fdiv double %35, %13
  %37 = fsub double 1.000000e+00, %36
  %38 = fmul double %29, %37
  %39 = fadd double %store_forwarded47, 1.000000e+00
  %40 = fmul double %38, %39
  %41 = call double @llvm.fmuladd.f64(double %29, double %36, double %40)
  %42 = fmul double %30, %36
  %43 = getelementptr inbounds [1010 x [1010 x double]], ptr @dp, i64 0, i64 %31, i64 %indvars.iv36
  %44 = load double, ptr %43, align 8, !tbaa !9
  %45 = fadd double %44, 1.000000e+00
  %46 = call double @llvm.fmuladd.f64(double %42, double %45, double %41)
  %47 = fmul double %30, %37
  %48 = getelementptr inbounds [1010 x [1010 x double]], ptr @dp, i64 0, i64 %31, i64 %indvars.iv36.in
  %49 = load double, ptr %48, align 8, !tbaa !9
  %50 = fadd double %49, 1.000000e+00
  %51 = call double @llvm.fmuladd.f64(double %47, double %50, double %46)
  %52 = call double @llvm.fmuladd.f64(double %32, double %36, double 1.000000e+00)
  %53 = fdiv double %51, %52
  %54 = getelementptr inbounds [1010 x [1010 x double]], ptr @dp, i64 0, i64 %indvars.iv40, i64 %indvars.iv36
  store double %53, ptr %54, align 8, !tbaa !9
  %55 = icmp sgt i64 %indvars.iv36.in, 1
  br i1 %55, label %.lr.ph.split.us32.peel.next, label %._crit_edge.us, !llvm.loop !11

._crit_edge.us:                                   ; preds = %.lr.ph.split.us.us, %.lr.ph.split.us32.peel.next, %.lr.ph.split.us32.preheader
  %indvars.iv.next41 = add nsw i64 %indvars.iv40, -1
  %56 = icmp sgt i64 %indvars.iv40, 0
  %indvar.next = add i64 %indvar, 1
  br i1 %56, label %.preheader.us, label %._crit_edge29, !llvm.loop !14

.lr.ph.split.us.us:                               ; preds = %.lr.ph.split.us.us.preheader, %.lr.ph.split.us.us
  %store_forwarded = phi double [ %load_initial, %.lr.ph.split.us.us.preheader ], [ %77, %.lr.ph.split.us.us ]
  %indvars.iv = phi i64 [ %14, %.lr.ph.split.us.us.preheader ], [ %indvars.iv.next, %.lr.ph.split.us.us ]
  %57 = trunc nuw nsw i64 %indvars.iv to i32
  %58 = uitofp nneg i32 %57 to double
  %59 = fdiv double %58, %13
  %60 = fsub double 1.000000e+00, %59
  %61 = fmul double %29, %60
  %62 = add nuw nsw i64 %indvars.iv, 1
  %63 = fadd double %store_forwarded, 1.000000e+00
  %64 = fmul double %61, %63
  %65 = call double @llvm.fmuladd.f64(double %29, double %59, double %64)
  %66 = fmul double %30, %59
  %67 = getelementptr inbounds [1010 x [1010 x double]], ptr @dp, i64 0, i64 %31, i64 %indvars.iv
  %68 = load double, ptr %67, align 8, !tbaa !9
  %69 = fadd double %68, 1.000000e+00
  %70 = call double @llvm.fmuladd.f64(double %66, double %69, double %65)
  %71 = fmul double %30, %60
  %72 = getelementptr inbounds [1010 x [1010 x double]], ptr @dp, i64 0, i64 %31, i64 %62
  %73 = load double, ptr %72, align 8, !tbaa !9
  %74 = fadd double %73, 1.000000e+00
  %75 = call double @llvm.fmuladd.f64(double %71, double %74, double %70)
  %76 = call double @llvm.fmuladd.f64(double %32, double %59, double 1.000000e+00)
  %77 = fdiv double %75, %76
  %78 = getelementptr inbounds [1010 x [1010 x double]], ptr @dp, i64 0, i64 %indvars.iv40, i64 %indvars.iv
  store double %77, ptr %78, align 8, !tbaa !9
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %79 = icmp sgt i64 %indvars.iv, 0
  br i1 %79, label %.lr.ph.split.us.us, label %._crit_edge.us, !llvm.loop !15

._crit_edge29:                                    ; preds = %._crit_edge.us, %.preheader.lr.ph, %0
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt5fixedRSt8ios_base)
  %81 = call i32 @_ZSt12setprecisioni(i32 noundef 4)
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) %80, i32 %81)
  %83 = load double, ptr @dp, align 16, !tbaa !9
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %82, double noundef %83)
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %84, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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 #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

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

; 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 #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 #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt5fixedRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #4

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

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

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12, !13}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.peeled.count", i32 1}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopFullUnrollPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass