; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/114 Division 1/Problem B (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"

@n = external dso_local global i32, align 4
@l = external dso_local global i32, align 4
@K = external dso_local global i32, align 4
@a = external dso_local global [201 x i32], align 16
@dp = external dso_local global [202 x [202 x double]], align 16
@p = external dso_local global [201 x double], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1

; 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
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @l, ptr noundef @K)
  %13 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @n, ptr noundef nonnull align 4 dereferenceable(4) @K)
  %14 = load i32, ptr %13, align 4, !tbaa !5
  store i32 %14, ptr @K, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %30, %0
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = load i32, ptr @n, align 4, !tbaa !5
  %18 = icmp slt i32 %16, %17
  br i1 %18, label %20, label %19

19:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %33

20:                                               ; preds = %15
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [201 x double], ptr @p, i64 0, i64 %22
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %23)
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [201 x double], ptr @p, i64 0, i64 %26
  %28 = load double, ptr %27, align 8, !tbaa !9
  %29 = fdiv double %28, 1.000000e+02
  store double %29, ptr %27, align 8, !tbaa !9
  br label %30

30:                                               ; preds = %20
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %2, align 4, !tbaa !5
  br label %15, !llvm.loop !11

33:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %49, %33
  %35 = load i32, ptr %3, align 4, !tbaa !5
  %36 = load i32, ptr @n, align 4, !tbaa !5
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %52

39:                                               ; preds = %34
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [201 x i32], ptr @a, i64 0, i64 %41
  %43 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %42)
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [201 x i32], ptr @a, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %46, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %39
  %50 = load i32, ptr %3, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %3, align 4, !tbaa !5
  br label %34, !llvm.loop !13

52:                                               ; preds = %38
  %53 = load i32, ptr @K, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [202 x double], ptr @dp, i64 0, i64 %54
  store double 1.000000e+00, ptr %55, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %123, %52
  %57 = load i32, ptr %4, align 4, !tbaa !5
  %58 = load i32, ptr @n, align 4, !tbaa !5
  %59 = icmp slt i32 %57, %58
  br i1 %59, label %61, label %60

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

61:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %62 = load i32, ptr @n, align 4, !tbaa !5
  %63 = sub nsw i32 %62, 1
  store i32 %63, ptr %6, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %119, %61
  %65 = load i32, ptr %6, align 4, !tbaa !5
  %66 = icmp sge i32 %65, 0
  br i1 %66, label %68, label %67

67:                                               ; preds = %64
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %122

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

69:                                               ; preds = %115, %68
  %70 = load i32, ptr %7, align 4, !tbaa !5
  %71 = load i32, ptr @n, align 4, !tbaa !5
  %72 = icmp sle i32 %70, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %69
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %118

74:                                               ; preds = %69
  %75 = load i32, ptr %6, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [202 x [202 x double]], ptr @dp, i64 0, i64 %76
  %78 = load i32, ptr %7, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [202 x double], ptr %77, i64 0, i64 %79
  %81 = load double, ptr %80, align 8, !tbaa !9
  %82 = load i32, ptr %4, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [201 x double], ptr @p, i64 0, i64 %83
  %85 = load double, ptr %84, align 8, !tbaa !9
  %86 = load i32, ptr %6, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [202 x [202 x double]], ptr @dp, i64 0, i64 %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %90 = load i32, ptr %7, align 4, !tbaa !5
  %91 = load i32, ptr %4, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [201 x i32], ptr @a, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = add nsw i32 %90, %94
  store i32 %95, ptr %8, align 4, !tbaa !5
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [202 x double], ptr %89, i64 0, i64 %98
  %100 = load double, ptr %99, align 8, !tbaa !9
  %101 = call double @llvm.fmuladd.f64(double %81, double %85, double %100)
  store double %101, ptr %99, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  %102 = load i32, ptr %4, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [201 x double], ptr @p, i64 0, i64 %103
  %105 = load double, ptr %104, align 8, !tbaa !9
  %106 = fsub double 1.000000e+00, %105
  %107 = load i32, ptr %6, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [202 x [202 x double]], ptr @dp, i64 0, i64 %108
  %110 = load i32, ptr %7, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [202 x double], ptr %109, i64 0, i64 %111
  %113 = load double, ptr %112, align 8, !tbaa !9
  %114 = fmul double %113, %106
  store double %114, ptr %112, align 8, !tbaa !9
  br label %115

115:                                              ; preds = %74
  %116 = load i32, ptr %7, align 4, !tbaa !5
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %7, align 4, !tbaa !5
  br label %69, !llvm.loop !14

118:                                              ; preds = %73
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %6, align 4, !tbaa !5
  %121 = add nsw i32 %120, -1
  store i32 %121, ptr %6, align 4, !tbaa !5
  br label %64, !llvm.loop !15

122:                                              ; preds = %67
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %4, align 4, !tbaa !5
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %4, align 4, !tbaa !5
  br label %56, !llvm.loop !16

126:                                              ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store double 0.000000e+00, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %127 = load i32, ptr @l, align 4, !tbaa !5
  store i32 %127, ptr %10, align 4, !tbaa !5
  br label %128

128:                                              ; preds = %154, %126
  %129 = load i32, ptr %10, align 4, !tbaa !5
  %130 = load i32, ptr @n, align 4, !tbaa !5
  %131 = icmp sle i32 %129, %130
  br i1 %131, label %133, label %132

132:                                              ; preds = %128
  store i32 17, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %157

133:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %134 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %134, ptr %11, align 4, !tbaa !5
  br label %135

135:                                              ; preds = %150, %133
  %136 = load i32, ptr %11, align 4, !tbaa !5
  %137 = load i32, ptr @n, align 4, !tbaa !5
  %138 = icmp sle i32 %136, %137
  br i1 %138, label %140, label %139

139:                                              ; preds = %135
  store i32 20, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %153

140:                                              ; preds = %135
  %141 = load i32, ptr %10, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [202 x [202 x double]], ptr @dp, i64 0, i64 %142
  %144 = load i32, ptr %11, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [202 x double], ptr %143, i64 0, i64 %145
  %147 = load double, ptr %146, align 8, !tbaa !9
  %148 = load double, ptr %9, align 8, !tbaa !9
  %149 = fadd double %148, %147
  store double %149, ptr %9, align 8, !tbaa !9
  br label %150

150:                                              ; preds = %140
  %151 = load i32, ptr %11, align 4, !tbaa !5
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %11, align 4, !tbaa !5
  br label %135, !llvm.loop !17

153:                                              ; preds = %139
  br label %154

154:                                              ; preds = %153
  %155 = load i32, ptr %10, align 4, !tbaa !5
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %10, align 4, !tbaa !5
  br label %128, !llvm.loop !18

157:                                              ; preds = %132
  %158 = load double, ptr %9, align 8, !tbaa !9
  %159 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, double noundef %158)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  %160 = load i32, ptr %1, align 4
  ret i32 %160
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

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

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

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

declare i32 @printf(ptr noundef, ...) #1

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 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"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}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !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"

@n = external dso_local global i32, align 4
@l = external dso_local global i32, align 4
@K = external dso_local global i32, align 4
@a = external dso_local global [201 x i32], align 16
@dp = external dso_local local_unnamed_addr global [202 x [202 x double]], align 16
@p = external dso_local global [201 x double], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @l, ptr noundef nonnull @K)
  %3 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @n, ptr noundef nonnull align 4 dereferenceable(4) @K)
  %4 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %4, ptr @K, align 4, !tbaa !5
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph, label %._crit_edge.thread

.preheader44:                                     ; preds = %.lr.ph
  %7 = icmp sgt i32 %12, 0
  br i1 %7, label %.lr.ph47, label %._crit_edge.thread

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %8 = getelementptr inbounds [201 x double], ptr @p, i64 0, i64 %indvars.iv
  %9 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %8)
  %10 = load double, ptr %8, align 8, !tbaa !9
  %11 = fdiv double %10, 1.000000e+02
  store double %11, ptr %8, align 8, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = icmp slt i64 %indvars.iv.next, %13
  br i1 %14, label %.lr.ph, label %.preheader44, !llvm.loop !11

._crit_edge.thread:                               ; preds = %.preheader44, %0
  %.ph = phi i32 [ %12, %.preheader44 ], [ %5, %0 ]
  %15 = load i32, ptr @K, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [202 x double], ptr @dp, i64 0, i64 %16
  store double 1.000000e+00, ptr %17, align 8, !tbaa !9
  br label %._crit_edge56

._crit_edge:                                      ; preds = %.lr.ph47
  %18 = load i32, ptr @K, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [202 x double], ptr @dp, i64 0, i64 %19
  store double 1.000000e+00, ptr %20, align 8, !tbaa !9
  %21 = icmp sgt i32 %26, 0
  br i1 %21, label %.preheader43, label %._crit_edge56

.lr.ph47:                                         ; preds = %.preheader44, %.lr.ph47
  %indvars.iv68 = phi i64 [ %indvars.iv.next69, %.lr.ph47 ], [ 0, %.preheader44 ]
  %22 = getelementptr inbounds [201 x i32], ptr @a, i64 0, i64 %indvars.iv68
  %23 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %22)
  %24 = load i32, ptr %22, align 4, !tbaa !5
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %22, align 4, !tbaa !5
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %26 = load i32, ptr @n, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = icmp slt i64 %indvars.iv.next69, %27
  br i1 %28, label %.lr.ph47, label %._crit_edge, !llvm.loop !13

.preheader43:                                     ; preds = %._crit_edge, %._crit_edge54
  %29 = phi i32 [ %49, %._crit_edge54 ], [ %26, %._crit_edge ]
  %indvars.iv81 = phi i64 [ %indvars.iv.next82, %._crit_edge54 ], [ 0, %._crit_edge ]
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %.preheader42.preheader, label %._crit_edge54

.preheader42.preheader:                           ; preds = %.preheader43
  %31 = getelementptr inbounds [201 x double], ptr @p, i64 0, i64 %indvars.iv81
  %32 = getelementptr inbounds [201 x i32], ptr @a, i64 0, i64 %indvars.iv81
  %.03551 = add nsw i32 %29, -1
  %33 = zext nneg i32 %.03551 to i64
  %34 = zext nneg i32 %29 to i64
  br label %.preheader42

._crit_edge56:                                    ; preds = %._crit_edge54, %._crit_edge.thread, %._crit_edge
  %.lcssa = phi i32 [ %26, %._crit_edge ], [ %.ph, %._crit_edge.thread ], [ %49, %._crit_edge54 ]
  %35 = load i32, ptr @l, align 4, !tbaa !5
  %.not59 = icmp sgt i32 %35, %.lcssa
  br i1 %.not59, label %._crit_edge62, label %.preheader.preheader

.preheader.preheader:                             ; preds = %._crit_edge56
  %36 = sext i32 %35 to i64
  %37 = sext i32 %.lcssa to i64
  %38 = add i32 %.lcssa, 1
  %39 = sub i32 %38, %35
  %xtraiter = and i32 %39, 1
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader.prol.loopexit, label %.preheader.prol

.preheader.prol:                                  ; preds = %.preheader.preheader, %.preheader.prol
  %indvars.iv86.prol = phi i64 [ %indvars.iv.next87.prol, %.preheader.prol ], [ %36, %.preheader.preheader ]
  %.157.prol = phi double [ %42, %.preheader.prol ], [ 0.000000e+00, %.preheader.preheader ]
  %40 = getelementptr inbounds [202 x [202 x double]], ptr @dp, i64 0, i64 %36, i64 %indvars.iv86.prol
  %41 = load double, ptr %40, align 8, !tbaa !9
  %42 = fadd double %.157.prol, %41
  %indvars.iv.next87.prol = add nsw i64 %indvars.iv86.prol, 1
  %.not40.not.prol = icmp slt i64 %indvars.iv86.prol, %37
  br i1 %.not40.not.prol, label %.preheader.prol, label %.preheader.prol.loopexit.unr-lcssa, !llvm.loop !14

.preheader.prol.loopexit.unr-lcssa:               ; preds = %.preheader.prol
  %indvars.iv.next85.prol = add nsw i64 %36, 1
  br label %.preheader.prol.loopexit

.preheader.prol.loopexit:                         ; preds = %.preheader.prol.loopexit.unr-lcssa, %.preheader.preheader
  %.lcssa102.lcssa.unr = phi double [ poison, %.preheader.preheader ], [ %42, %.preheader.prol.loopexit.unr-lcssa ]
  %indvars.iv84.unr = phi i64 [ %36, %.preheader.preheader ], [ %indvars.iv.next85.prol, %.preheader.prol.loopexit.unr-lcssa ]
  %.03360.unr = phi double [ 0.000000e+00, %.preheader.preheader ], [ %42, %.preheader.prol.loopexit.unr-lcssa ]
  %43 = icmp eq i32 %.lcssa, %35
  br i1 %43, label %._crit_edge62, label %.preheader

.loopexit:                                        ; preds = %52, %.preheader42
  %44 = phi i32 [ %47, %.preheader42 ], [ %69, %52 ]
  %45 = phi i32 [ %48, %.preheader42 ], [ %69, %52 ]
  %indvars.iv.next75 = add nsw i64 %indvars.iv74, -1
  %46 = icmp sgt i64 %indvars.iv74, 0
  %indvars.iv.next77 = add nsw i64 %indvars.iv76, -1
  br i1 %46, label %.preheader42, label %._crit_edge54, !llvm.loop !15

.preheader42:                                     ; preds = %.preheader42.preheader, %.loopexit
  %47 = phi i32 [ %29, %.preheader42.preheader ], [ %44, %.loopexit ]
  %48 = phi i32 [ %29, %.preheader42.preheader ], [ %45, %.loopexit ]
  %indvars.iv76 = phi i64 [ %34, %.preheader42.preheader ], [ %indvars.iv.next77, %.loopexit ]
  %indvars.iv74 = phi i64 [ %33, %.preheader42.preheader ], [ %indvars.iv.next75, %.loopexit ]
  %.not4148 = icmp slt i32 %48, 0
  br i1 %.not4148, label %.loopexit, label %.lr.ph50

.lr.ph50:                                         ; preds = %.preheader42
  %.pre = load double, ptr %31, align 8, !tbaa !9
  br label %52

._crit_edge54:                                    ; preds = %.loopexit, %.preheader43
  %49 = phi i32 [ %29, %.preheader43 ], [ %44, %.loopexit ]
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %50 = sext i32 %49 to i64
  %51 = icmp slt i64 %indvars.iv.next82, %50
  br i1 %51, label %.preheader43, label %._crit_edge56, !llvm.loop !17

52:                                               ; preds = %.lr.ph50, %52
  %53 = phi double [ %.pre, %.lr.ph50 ], [ %65, %52 ]
  %indvars.iv71 = phi i64 [ 0, %.lr.ph50 ], [ %indvars.iv.next72, %52 ]
  %54 = getelementptr inbounds [202 x [202 x double]], ptr @dp, i64 0, i64 %indvars.iv74, i64 %indvars.iv71
  %55 = load double, ptr %54, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %56 = load i32, ptr %32, align 4, !tbaa !5
  %57 = trunc nuw nsw i64 %indvars.iv71 to i32
  %58 = add nsw i32 %56, %57
  store i32 %58, ptr %1, align 4, !tbaa !5
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [202 x [202 x double]], ptr @dp, i64 0, i64 %indvars.iv76, i64 %61
  %63 = load double, ptr %62, align 8, !tbaa !9
  %64 = call double @llvm.fmuladd.f64(double %55, double %53, double %63)
  store double %64, ptr %62, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  %65 = load double, ptr %31, align 8, !tbaa !9
  %66 = fsub double 1.000000e+00, %65
  %67 = load double, ptr %54, align 8, !tbaa !9
  %68 = fmul double %67, %66
  store double %68, ptr %54, align 8, !tbaa !9
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %69 = load i32, ptr @n, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %.not41.not = icmp slt i64 %indvars.iv71, %70
  br i1 %.not41.not, label %52, label %.loopexit, !llvm.loop !18

.preheader:                                       ; preds = %.preheader.prol.loopexit, %76
  %indvars.iv84 = phi i64 [ %indvars.iv.next85.1, %76 ], [ %indvars.iv84.unr, %.preheader.prol.loopexit ]
  %.03360 = phi double [ %75, %76 ], [ %.03360.unr, %.preheader.prol.loopexit ]
  br label %77

._crit_edge62:                                    ; preds = %.preheader.prol.loopexit, %76, %._crit_edge56
  %.033.lcssa = phi double [ 0.000000e+00, %._crit_edge56 ], [ %.lcssa102.lcssa.unr, %.preheader.prol.loopexit ], [ %75, %76 ]
  %71 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, double noundef %.033.lcssa)
  ret i32 0

.preheader.1:                                     ; preds = %77
  %indvars.iv.next85 = add nsw i64 %indvars.iv84, 1
  br label %72

72:                                               ; preds = %72, %.preheader.1
  %indvars.iv86.1 = phi i64 [ %indvars.iv.next85, %.preheader.1 ], [ %indvars.iv.next87.1, %72 ]
  %.157.1 = phi double [ %80, %.preheader.1 ], [ %75, %72 ]
  %73 = getelementptr inbounds [202 x [202 x double]], ptr @dp, i64 0, i64 %indvars.iv.next85, i64 %indvars.iv86.1
  %74 = load double, ptr %73, align 8, !tbaa !9
  %75 = fadd double %.157.1, %74
  %indvars.iv.next87.1 = add nsw i64 %indvars.iv86.1, 1
  %.not40.not.1 = icmp slt i64 %indvars.iv86.1, %37
  br i1 %.not40.not.1, label %72, label %76, !llvm.loop !14

76:                                               ; preds = %72
  %indvars.iv.next85.1 = add nsw i64 %indvars.iv84, 2
  %lftr.wideiv.1 = trunc i64 %indvars.iv.next85.1 to i32
  %exitcond.not.1 = icmp eq i32 %38, %lftr.wideiv.1
  br i1 %exitcond.not.1, label %._crit_edge62, label %.preheader, !llvm.loop !19

77:                                               ; preds = %.preheader, %77
  %indvars.iv86 = phi i64 [ %indvars.iv84, %.preheader ], [ %indvars.iv.next87, %77 ]
  %.157 = phi double [ %.03360, %.preheader ], [ %80, %77 ]
  %78 = getelementptr inbounds [202 x [202 x double]], ptr @dp, i64 0, i64 %indvars.iv84, i64 %indvars.iv86
  %79 = load double, ptr %78, align 8, !tbaa !9
  %80 = fadd double %.157, %79
  %indvars.iv.next87 = add nsw i64 %indvars.iv86, 1
  %.not40.not = icmp slt i64 %indvars.iv86, %37
  br i1 %.not40.not, label %77, label %.preheader.1, !llvm.loop !14
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

attributes #0 = { mustprogress norecurse 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 #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 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"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}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12, !16}
!16 = !{!"llvm.loop.unswitch.partial.disable"}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass