; LLVM IR from tangjz/acm-icpc :: lydsy (1048)

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

@a = external dso_local global i32, align 4
@b = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@mat = external dso_local global [11 x [11 x double]], align 16
@x = external dso_local global double, align 8
@f = external dso_local global [11 x [11 x [11 x [11 x [11 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 [7 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_Z3dfsiiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %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 i32, align 4
  store i32 0, ptr %1, align 4
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @a, ptr noundef @b, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %11

11:                                               ; preds = %69, %0
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = load i32, ptr @a, align 4, !tbaa !5
  %14 = icmp sle i32 %12, %13
  br i1 %14, label %16, label %15

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

16:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %65, %16
  %18 = load i32, ptr %4, align 4, !tbaa !5
  %19 = load i32, ptr @b, align 4, !tbaa !5
  %20 = icmp sle i32 %18, %19
  br i1 %20, label %22, label %21

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

22:                                               ; preds = %17
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [11 x [11 x double]], ptr @mat, i64 0, i64 %24
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [11 x double], ptr %25, i64 0, i64 %27
  %29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %28)
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = sub nsw i32 %30, 1
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [11 x [11 x double]], ptr @mat, i64 0, i64 %32
  %34 = load i32, ptr %4, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [11 x double], ptr %33, i64 0, i64 %35
  %37 = load double, ptr %36, align 8, !tbaa !9
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [11 x [11 x double]], ptr @mat, i64 0, i64 %39
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = sub nsw i32 %41, 1
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [11 x double], ptr %40, i64 0, i64 %43
  %45 = load double, ptr %44, align 8, !tbaa !9
  %46 = fadd double %37, %45
  %47 = load i32, ptr %2, align 4, !tbaa !5
  %48 = sub nsw i32 %47, 1
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [11 x [11 x double]], ptr @mat, i64 0, i64 %49
  %51 = load i32, ptr %4, align 4, !tbaa !5
  %52 = sub nsw i32 %51, 1
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [11 x double], ptr %50, i64 0, i64 %53
  %55 = load double, ptr %54, align 8, !tbaa !9
  %56 = fsub double %46, %55
  %57 = load i32, ptr %2, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [11 x [11 x double]], ptr @mat, i64 0, i64 %58
  %60 = load i32, ptr %4, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [11 x double], ptr %59, i64 0, i64 %61
  %63 = load double, ptr %62, align 8, !tbaa !9
  %64 = fadd double %63, %56
  store double %64, ptr %62, align 8, !tbaa !9
  br label %65

65:                                               ; preds = %22
  %66 = load i32, ptr %4, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %4, align 4, !tbaa !5
  br label %17, !llvm.loop !11

68:                                               ; preds = %21
  br label %69

69:                                               ; preds = %68
  %70 = load i32, ptr %2, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %2, align 4, !tbaa !5
  br label %11, !llvm.loop !13

72:                                               ; preds = %15
  %73 = load i32, ptr @a, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [11 x [11 x double]], ptr @mat, i64 0, i64 %74
  %76 = load i32, ptr @b, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [11 x double], ptr %75, i64 0, i64 %77
  %79 = load double, ptr %78, align 8, !tbaa !9
  %80 = load i32, ptr @n, align 4, !tbaa !5
  %81 = sitofp i32 %80 to double
  %82 = fdiv double %79, %81
  store double %82, ptr @x, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %144, %72
  %84 = load i32, ptr %5, align 4, !tbaa !5
  %85 = load i32, ptr @a, align 4, !tbaa !5
  %86 = icmp sle i32 %84, %85
  br i1 %86, label %88, label %87

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

88:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %140, %88
  %90 = load i32, ptr %6, align 4, !tbaa !5
  %91 = load i32, ptr @b, align 4, !tbaa !5
  %92 = icmp sle i32 %90, %91
  br i1 %92, label %94, label %93

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

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

95:                                               ; preds = %136, %94
  %96 = load i32, ptr %7, align 4, !tbaa !5
  %97 = load i32, ptr @a, align 4, !tbaa !5
  %98 = icmp sle i32 %96, %97
  br i1 %98, label %100, label %99

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

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

101:                                              ; preds = %132, %100
  %102 = load i32, ptr %8, align 4, !tbaa !5
  %103 = load i32, ptr @b, align 4, !tbaa !5
  %104 = icmp sle i32 %102, %103
  br i1 %104, label %106, label %105

105:                                              ; preds = %101
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %135

106:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %107

107:                                              ; preds = %128, %106
  %108 = load i32, ptr %9, align 4, !tbaa !5
  %109 = load i32, ptr @n, align 4, !tbaa !5
  %110 = icmp slt i32 %108, %109
  br i1 %110, label %112, label %111

111:                                              ; preds = %107
  store i32 20, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %131

112:                                              ; preds = %107
  %113 = load i32, ptr %5, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [11 x [11 x [11 x [11 x [11 x double]]]]], ptr @f, i64 0, i64 %114
  %116 = load i32, ptr %6, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [11 x [11 x [11 x [11 x double]]]], ptr %115, i64 0, i64 %117
  %119 = load i32, ptr %7, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [11 x [11 x [11 x double]]], ptr %118, i64 0, i64 %120
  %122 = load i32, ptr %8, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [11 x [11 x double]], ptr %121, i64 0, i64 %123
  %125 = load i32, ptr %9, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [11 x double], ptr %124, i64 0, i64 %126
  store double 1.000000e+09, ptr %127, align 8, !tbaa !9
  br label %128

128:                                              ; preds = %112
  %129 = load i32, ptr %9, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %9, align 4, !tbaa !5
  br label %107, !llvm.loop !14

131:                                              ; preds = %111
  br label %132

132:                                              ; preds = %131
  %133 = load i32, ptr %8, align 4, !tbaa !5
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %8, align 4, !tbaa !5
  br label %101, !llvm.loop !15

135:                                              ; preds = %105
  br label %136

136:                                              ; preds = %135
  %137 = load i32, ptr %7, align 4, !tbaa !5
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %7, align 4, !tbaa !5
  br label %95, !llvm.loop !16

139:                                              ; preds = %99
  br label %140

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

143:                                              ; preds = %93
  br label %144

144:                                              ; preds = %143
  %145 = load i32, ptr %5, align 4, !tbaa !5
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %5, align 4, !tbaa !5
  br label %83, !llvm.loop !18

147:                                              ; preds = %87
  %148 = load i32, ptr @a, align 4, !tbaa !5
  %149 = load i32, ptr @b, align 4, !tbaa !5
  %150 = load i32, ptr @n, align 4, !tbaa !5
  %151 = sub nsw i32 %150, 1
  %152 = call noundef double @_Z3dfsiiiii(i32 noundef 1, i32 noundef 1, i32 noundef %148, i32 noundef %149, i32 noundef %151)
  %153 = load i32, ptr @a, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [11 x [11 x [11 x double]]], ptr getelementptr inbounds ([11 x [11 x [11 x [11 x double]]]], ptr getelementptr inbounds ([11 x [11 x [11 x [11 x [11 x double]]]]], ptr @f, i64 0, i64 1), i64 0, i64 1), i64 0, i64 %154
  %156 = load i32, ptr @b, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [11 x [11 x double]], ptr %155, i64 0, i64 %157
  %159 = load i32, ptr @n, align 4, !tbaa !5
  %160 = sub nsw i32 %159, 1
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [11 x double], ptr %158, i64 0, i64 %161
  %163 = load double, ptr %162, align 8, !tbaa !9
  %164 = load i32, ptr @n, align 4, !tbaa !5
  %165 = sitofp i32 %164 to double
  %166 = fdiv double %163, %165
  %167 = call double @sqrt(double noundef %166) #5
  %168 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, double noundef %167)
  ret i32 0
}

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

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #4

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "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 = { 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 #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"

@a = external dso_local global i32, align 4
@b = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@mat = external dso_local global [11 x [11 x double]], align 16
@x = external dso_local local_unnamed_addr global double, align 8
@f = external dso_local local_unnamed_addr global [11 x [11 x [11 x [11 x [11 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 [7 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_Z3dfsiiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @a, ptr noundef nonnull @b, ptr noundef nonnull @n)
  %2 = load i32, ptr @a, align 4, !tbaa !5
  %.not48 = icmp slt i32 %2, 1
  %.pre113 = load i32, ptr @b, align 4, !tbaa !5
  %3 = icmp slt i32 %.pre113, 1
  %or.cond = select i1 %.not48, i1 true, i1 %3
  br i1 %or.cond, label %._crit_edge50, label %.preheader45

.preheader45:                                     ; preds = %0, %._crit_edge
  %4 = phi i32 [ %22, %._crit_edge ], [ %2, %0 ]
  %5 = phi i32 [ %23, %._crit_edge ], [ %.pre113, %0 ]
  %indvars.iv87 = phi i64 [ %indvars.iv.next88, %._crit_edge ], [ 1, %0 ]
  %.not4146 = icmp slt i32 %5, 1
  br i1 %.not4146, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader45
  %6 = add nsw i64 %indvars.iv87, -1
  br label %25

._crit_edge50:                                    ; preds = %._crit_edge, %0
  %7 = phi i32 [ %.pre113, %0 ], [ %23, %._crit_edge ]
  %.lcssa = phi i32 [ %2, %0 ], [ %22, %._crit_edge ]
  %8 = sext i32 %.lcssa to i64
  %9 = sext i32 %7 to i64
  %10 = getelementptr inbounds [11 x [11 x double]], ptr @mat, i64 0, i64 %8, i64 %9
  %11 = load double, ptr %10, align 8, !tbaa !9
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %13 = sitofp i32 %12 to double
  %14 = fdiv double %11, %13
  store double %14, ptr @x, align 8, !tbaa !9
  %.not3772 = icmp slt i32 %.lcssa, 0
  br i1 %.not3772, label %._crit_edge74, label %.preheader44.lr.ph

.preheader44.lr.ph:                               ; preds = %._crit_edge50
  %.not3863 = icmp slt i32 %7, 0
  %15 = icmp slt i32 %12, 1
  %brmerge = select i1 %.not3863, i1 true, i1 %15
  br i1 %brmerge, label %._crit_edge74, label %.preheader44.us78.preheader

.preheader44.us78.preheader:                      ; preds = %.preheader44.lr.ph
  %16 = add nuw i32 %7, 1
  %17 = add nuw i32 %.lcssa, 1
  %wide.trip.count111 = zext i32 %17 to i64
  %wide.trip.count106 = zext i32 %16 to i64
  %wide.trip.count = zext nneg i32 %12 to i64
  %min.iters.check = icmp ult i32 %12, 4
  %n.vec = and i64 %wide.trip.count, 2147483644
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br label %.preheader44.us78

.preheader44.us78:                                ; preds = %.preheader44.us78.preheader, %._crit_edge65.split.split.split.us.us
  %indvars.iv108 = phi i64 [ 0, %.preheader44.us78.preheader ], [ %indvars.iv.next109, %._crit_edge65.split.split.split.us.us ]
  br label %.preheader43.us69.us

.preheader43.us69.us:                             ; preds = %._crit_edge59.split.split.us.us.us, %.preheader44.us78
  %indvars.iv103 = phi i64 [ %indvars.iv.next104, %._crit_edge59.split.split.us.us.us ], [ 0, %.preheader44.us78 ]
  br label %.preheader42.us60.us.us

.preheader42.us60.us.us:                          ; preds = %._crit_edge56.split.us.us.us.us, %.preheader43.us69.us
  %indvars.iv98 = phi i64 [ %indvars.iv.next99, %._crit_edge56.split.us.us.us.us ], [ 0, %.preheader43.us69.us ]
  br label %.preheader.us.us.us.us

.preheader.us.us.us.us:                           ; preds = %._crit_edge53.us.us.us.us, %.preheader42.us60.us.us
  %indvars.iv93 = phi i64 [ %indvars.iv.next94, %._crit_edge53.us.us.us.us ], [ 0, %.preheader42.us60.us.us ]
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %.preheader.us.us.us.us, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.preheader.us.us.us.us ]
  %18 = getelementptr inbounds [11 x [11 x [11 x [11 x [11 x double]]]]], ptr @f, i64 0, i64 %indvars.iv108, i64 %indvars.iv103, i64 %indvars.iv98, i64 %indvars.iv93, i64 %index
  %19 = getelementptr inbounds i8, ptr %18, i64 16
  store <2 x double> <double 1.000000e+09, double 1.000000e+09>, ptr %18, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+09, double 1.000000e+09>, ptr %19, align 8, !tbaa !9
  %index.next = add nuw i64 %index, 4
  %20 = icmp eq i64 %index.next, %n.vec
  br i1 %20, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge53.us.us.us.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader.us.us.us.us
  %indvars.iv90.ph = phi i64 [ 0, %.preheader.us.us.us.us ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv90 = phi i64 [ %indvars.iv.next91, %scalar.ph ], [ %indvars.iv90.ph, %scalar.ph.preheader ]
  %21 = getelementptr inbounds [11 x [11 x [11 x [11 x [11 x double]]]]], ptr @f, i64 0, i64 %indvars.iv108, i64 %indvars.iv103, i64 %indvars.iv98, i64 %indvars.iv93, i64 %indvars.iv90
  store double 1.000000e+09, ptr %21, align 8, !tbaa !9
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next91, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge53.us.us.us.us, label %scalar.ph, !llvm.loop !15

._crit_edge53.us.us.us.us:                        ; preds = %scalar.ph, %middle.block
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %exitcond97.not = icmp eq i64 %indvars.iv.next94, %wide.trip.count106
  br i1 %exitcond97.not, label %._crit_edge56.split.us.us.us.us, label %.preheader.us.us.us.us, !llvm.loop !16

._crit_edge56.split.us.us.us.us:                  ; preds = %._crit_edge53.us.us.us.us
  %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1
  %exitcond102.not = icmp eq i64 %indvars.iv.next99, %wide.trip.count111
  br i1 %exitcond102.not, label %._crit_edge59.split.split.us.us.us, label %.preheader42.us60.us.us, !llvm.loop !17

._crit_edge59.split.split.us.us.us:               ; preds = %._crit_edge56.split.us.us.us.us
  %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1
  %exitcond107.not = icmp eq i64 %indvars.iv.next104, %wide.trip.count106
  br i1 %exitcond107.not, label %._crit_edge65.split.split.split.us.us, label %.preheader43.us69.us, !llvm.loop !18

._crit_edge65.split.split.split.us.us:            ; preds = %._crit_edge59.split.split.us.us.us
  %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1
  %exitcond112.not = icmp eq i64 %indvars.iv.next109, %wide.trip.count111
  br i1 %exitcond112.not, label %._crit_edge74, label %.preheader44.us78, !llvm.loop !19

._crit_edge.loopexit:                             ; preds = %25
  %.pre = load i32, ptr @a, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader45
  %22 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %4, %.preheader45 ]
  %23 = phi i32 [ %39, %._crit_edge.loopexit ], [ %5, %.preheader45 ]
  %indvars.iv.next88 = add nuw nsw i64 %indvars.iv87, 1
  %24 = sext i32 %22 to i64
  %.not.not = icmp slt i64 %indvars.iv87, %24
  br i1 %.not.not, label %.preheader45, label %._crit_edge50, !llvm.loop !20

25:                                               ; preds = %.lr.ph, %25
  %indvars.iv = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next, %25 ]
  %26 = getelementptr inbounds [11 x [11 x double]], ptr @mat, i64 0, i64 %indvars.iv87, i64 %indvars.iv
  %27 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %26)
  %28 = getelementptr inbounds [11 x [11 x double]], ptr @mat, i64 0, i64 %6, i64 %indvars.iv
  %29 = load double, ptr %28, align 8, !tbaa !9
  %30 = add nsw i64 %indvars.iv, -1
  %31 = getelementptr inbounds [11 x [11 x double]], ptr @mat, i64 0, i64 %indvars.iv87, i64 %30
  %32 = load double, ptr %31, align 8, !tbaa !9
  %33 = fadd double %29, %32
  %34 = getelementptr inbounds [11 x [11 x double]], ptr @mat, i64 0, i64 %6, i64 %30
  %35 = load double, ptr %34, align 8, !tbaa !9
  %36 = fsub double %33, %35
  %37 = load double, ptr %26, align 8, !tbaa !9
  %38 = fadd double %37, %36
  store double %38, ptr %26, align 8, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %39 = load i32, ptr @b, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %.not41.not = icmp slt i64 %indvars.iv, %40
  br i1 %.not41.not, label %25, label %._crit_edge.loopexit, !llvm.loop !22

._crit_edge74:                                    ; preds = %._crit_edge65.split.split.split.us.us, %.preheader44.lr.ph, %._crit_edge50
  %41 = add nsw i32 %12, -1
  %42 = tail call noundef double @_Z3dfsiiiii(i32 noundef 1, i32 noundef 1, i32 noundef %.lcssa, i32 noundef %7, i32 noundef %41)
  %43 = load i32, ptr @a, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = load i32, ptr @b, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = load i32, ptr @n, align 4, !tbaa !5
  %48 = add nsw i32 %47, -1
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [11 x [11 x [11 x double]]], ptr getelementptr inbounds (i8, ptr @f, i64 127776), i64 0, i64 %44, i64 %46, i64 %49
  %51 = load double, ptr %50, align 8, !tbaa !9
  %52 = sitofp i32 %47 to double
  %53 = fdiv double %51, %52
  %54 = tail call double @sqrt(double noundef %53) #4
  %55 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %54)
  ret i32 0
}

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #3

attributes #0 = { 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 #1 = { 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 #2 = { 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 #3 = { mustprogress nofree nounwind willreturn memory(write) "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 = { 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, !14}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !12, !14, !13}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12, !21}
!21 = !{!"llvm.loop.unswitch.partial.disable"}
!22 = distinct !{!22, !12}


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