; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/9 Beta Division 2/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"

%"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 i64, align 8
@v1 = external dso_local global i64, align 8
@v2 = external dso_local global i64, align 8
@p = external dso_local global i64, align 8
@xs = external dso_local global i64, align 8
@ys = external dso_local global i64, align 8
@x = external dso_local global [100 x i64], align 16
@mn = external dso_local global double, align 8
@dist = external dso_local global double, align 8
@eps = external dso_local global double, 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 i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  store i32 0, ptr %1, align 4
  %7 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @n)
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(8) @v1)
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(8) @v2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %10

10:                                               ; preds = %21, %0
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = load i64, ptr @n, align 8, !tbaa !9
  %14 = icmp slt i64 %12, %13
  br i1 %14, label %16, label %15

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

16:                                               ; preds = %10
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [100 x i64], ptr @x, i64 0, i64 %18
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %19)
  br label %21

21:                                               ; preds = %16
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = add nsw i32 %22, 1
  store i32 %23, ptr %2, align 4, !tbaa !5
  br label %10, !llvm.loop !11

24:                                               ; preds = %15
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @xs)
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 8 dereferenceable(8) @ys)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %124, %24
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = load i64, ptr @n, align 8, !tbaa !9
  %31 = icmp slt i64 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %127

33:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [100 x i64], ptr @x, i64 0, i64 %35
  %37 = load i64, ptr %36, align 8, !tbaa !9
  %38 = sitofp i64 %37 to double
  %39 = load i64, ptr @v1, align 8, !tbaa !9
  %40 = sitofp i64 %39 to double
  %41 = fdiv double %38, %40
  store double %41, ptr %4, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %42 = load i32, ptr %3, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [100 x i64], ptr @x, i64 0, i64 %43
  %45 = load i64, ptr %44, align 8, !tbaa !9
  %46 = load i64, ptr @xs, align 8, !tbaa !9
  %47 = sub nsw i64 %45, %46
  %48 = load i32, ptr %3, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [100 x i64], ptr @x, i64 0, i64 %49
  %51 = load i64, ptr %50, align 8, !tbaa !9
  %52 = load i64, ptr @xs, align 8, !tbaa !9
  %53 = sub nsw i64 %51, %52
  %54 = mul nsw i64 %47, %53
  %55 = load i64, ptr @ys, align 8, !tbaa !9
  %56 = load i64, ptr @ys, align 8, !tbaa !9
  %57 = mul nsw i64 %55, %56
  %58 = add nsw i64 %54, %57
  %59 = call noundef double @_ZSt4sqrtIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef %58)
  %60 = load i64, ptr @v2, align 8, !tbaa !9
  %61 = sitofp i64 %60 to double
  %62 = fdiv double %59, %61
  store double %62, ptr %5, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %63 = load i32, ptr %3, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [100 x i64], ptr @x, i64 0, i64 %64
  %66 = load i64, ptr %65, align 8, !tbaa !9
  %67 = load i64, ptr @xs, align 8, !tbaa !9
  %68 = sub nsw i64 %66, %67
  %69 = load i32, ptr %3, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [100 x i64], ptr @x, i64 0, i64 %70
  %72 = load i64, ptr %71, align 8, !tbaa !9
  %73 = load i64, ptr @xs, align 8, !tbaa !9
  %74 = sub nsw i64 %72, %73
  %75 = mul nsw i64 %68, %74
  %76 = load i64, ptr @ys, align 8, !tbaa !9
  %77 = load i64, ptr @ys, align 8, !tbaa !9
  %78 = mul nsw i64 %76, %77
  %79 = add nsw i64 %75, %78
  %80 = call noundef double @_ZSt4sqrtIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef %79)
  store double %80, ptr %6, align 8, !tbaa !13
  %81 = load double, ptr @mn, align 8, !tbaa !13
  %82 = fcmp oeq double %81, 0.000000e+00
  br i1 %82, label %83, label %90

83:                                               ; preds = %33
  %84 = load double, ptr %4, align 8, !tbaa !13
  %85 = load double, ptr %5, align 8, !tbaa !13
  %86 = fadd double %84, %85
  store double %86, ptr @mn, align 8, !tbaa !13
  %87 = load i32, ptr %3, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  store i64 %88, ptr @p, align 8, !tbaa !9
  %89 = load double, ptr %6, align 8, !tbaa !13
  store double %89, ptr @dist, align 8, !tbaa !13
  br label %123

90:                                               ; preds = %33
  %91 = load double, ptr %4, align 8, !tbaa !13
  %92 = load double, ptr %5, align 8, !tbaa !13
  %93 = fadd double %91, %92
  %94 = load double, ptr @mn, align 8, !tbaa !13
  %95 = fsub double %93, %94
  %96 = call double @llvm.fabs.f64(double %95)
  %97 = load double, ptr @eps, align 8, !tbaa !13
  %98 = fcmp olt double %96, %97
  br i1 %98, label %99, label %108

99:                                               ; preds = %90
  %100 = load double, ptr %6, align 8, !tbaa !13
  %101 = load double, ptr @dist, align 8, !tbaa !13
  %102 = fcmp olt double %100, %101
  br i1 %102, label %103, label %107

103:                                              ; preds = %99
  %104 = load double, ptr %6, align 8, !tbaa !13
  store double %104, ptr @dist, align 8, !tbaa !13
  %105 = load i32, ptr %3, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  store i64 %106, ptr @p, align 8, !tbaa !9
  br label %107

107:                                              ; preds = %103, %99
  br label %122

108:                                              ; preds = %90
  %109 = load double, ptr %4, align 8, !tbaa !13
  %110 = load double, ptr %5, align 8, !tbaa !13
  %111 = fadd double %109, %110
  %112 = load double, ptr @mn, align 8, !tbaa !13
  %113 = fcmp olt double %111, %112
  br i1 %113, label %114, label %121

114:                                              ; preds = %108
  %115 = load double, ptr %4, align 8, !tbaa !13
  %116 = load double, ptr %5, align 8, !tbaa !13
  %117 = fadd double %115, %116
  store double %117, ptr @mn, align 8, !tbaa !13
  %118 = load i32, ptr %3, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  store i64 %119, ptr @p, align 8, !tbaa !9
  %120 = load double, ptr %6, align 8, !tbaa !13
  store double %120, ptr @dist, align 8, !tbaa !13
  br label %121

121:                                              ; preds = %114, %108
  br label %122

122:                                              ; preds = %121, %107
  br label %123

123:                                              ; preds = %122, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %3, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %3, align 4, !tbaa !5
  br label %27, !llvm.loop !15

127:                                              ; preds = %32
  %128 = load i64, ptr @p, align 8, !tbaa !9
  %129 = add nsw i64 %128, 1
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %129)
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %130, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4sqrtIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef) #3

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !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" }

@n = external dso_local global i64, align 8
@v1 = external dso_local global i64, align 8
@v2 = external dso_local global i64, align 8
@p = external dso_local local_unnamed_addr global i64, align 8
@xs = external dso_local global i64, align 8
@ys = external dso_local global i64, align 8
@x = external dso_local global [100 x i64], align 16
@mn = external dso_local local_unnamed_addr global double, align 8
@dist = external dso_local local_unnamed_addr global double, align 8
@eps = external dso_local local_unnamed_addr global double, 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 noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @n)
  %2 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(8) @v1)
  %3 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(8) @v2)
  %4 = load i64, ptr @n, align 8, !tbaa !5
  %5 = icmp sgt i64 %4, 0
  br i1 %5, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %6 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @xs)
  %7 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(8) @ys)
  %8 = load i64, ptr @n, align 8, !tbaa !5
  %9 = icmp sgt i64 %8, 1
  br i1 %9, label %.lr.ph33, label %._crit_edge34

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %10 = getelementptr inbounds [100 x i64], ptr @x, i64 0, i64 %indvars.iv
  %11 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %12 = load i64, ptr @n, align 8, !tbaa !5
  %13 = icmp sgt i64 %12, %indvars.iv.next
  br i1 %13, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge34:                                    ; preds = %58, %._crit_edge
  %14 = load i64, ptr @p, align 8, !tbaa !5
  %15 = add nsw i64 %14, 1
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %15)
  %17 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

.lr.ph33:                                         ; preds = %._crit_edge, %58
  %indvars.iv36 = phi i64 [ %indvars.iv.next37, %58 ], [ 1, %._crit_edge ]
  %18 = getelementptr inbounds [100 x i64], ptr @x, i64 0, i64 %indvars.iv36
  %19 = load i64, ptr %18, align 8, !tbaa !5
  %20 = sitofp i64 %19 to double
  %21 = load i64, ptr @v1, align 8, !tbaa !5
  %22 = sitofp i64 %21 to double
  %23 = fdiv double %20, %22
  %24 = load i64, ptr @xs, align 8, !tbaa !5
  %25 = sub nsw i64 %19, %24
  %26 = mul nsw i64 %25, %25
  %27 = load i64, ptr @ys, align 8, !tbaa !5
  %28 = mul nsw i64 %27, %27
  %29 = add nuw nsw i64 %26, %28
  %30 = tail call noundef double @_ZSt4sqrtIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef %29)
  %31 = load i64, ptr @v2, align 8, !tbaa !5
  %32 = sitofp i64 %31 to double
  %33 = fdiv double %30, %32
  %34 = load i64, ptr %18, align 8, !tbaa !5
  %35 = load i64, ptr @xs, align 8, !tbaa !5
  %36 = sub nsw i64 %34, %35
  %37 = mul nsw i64 %36, %36
  %38 = load i64, ptr @ys, align 8, !tbaa !5
  %39 = mul nsw i64 %38, %38
  %40 = add nuw nsw i64 %37, %39
  %41 = tail call noundef double @_ZSt4sqrtIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef %40)
  %42 = load double, ptr @mn, align 8, !tbaa !11
  %43 = fcmp oeq double %42, 0.000000e+00
  %44 = fadd double %23, %33
  br i1 %43, label %45, label %46

45:                                               ; preds = %.lr.ph33
  store double %44, ptr @mn, align 8, !tbaa !11
  store i64 %indvars.iv36, ptr @p, align 8, !tbaa !5
  store double %41, ptr @dist, align 8, !tbaa !11
  br label %58

46:                                               ; preds = %.lr.ph33
  %47 = fsub double %44, %42
  %48 = tail call double @llvm.fabs.f64(double %47)
  %49 = load double, ptr @eps, align 8, !tbaa !11
  %50 = fcmp olt double %48, %49
  br i1 %50, label %51, label %55

51:                                               ; preds = %46
  %52 = load double, ptr @dist, align 8, !tbaa !11
  %53 = fcmp olt double %41, %52
  br i1 %53, label %54, label %58

54:                                               ; preds = %51
  store double %41, ptr @dist, align 8, !tbaa !11
  store i64 %indvars.iv36, ptr @p, align 8, !tbaa !5
  br label %58

55:                                               ; preds = %46
  %56 = fcmp olt double %44, %42
  br i1 %56, label %57, label %58

57:                                               ; preds = %55
  store double %44, ptr @mn, align 8, !tbaa !11
  store i64 %indvars.iv36, ptr @p, align 8, !tbaa !5
  store double %41, ptr @dist, align 8, !tbaa !11
  br label %58

58:                                               ; preds = %54, %51, %57, %55, %45
  %indvars.iv.next37 = add nuw nsw i64 %indvars.iv36, 1
  %59 = load i64, ptr @n, align 8, !tbaa !5
  %60 = icmp sgt i64 %59, %indvars.iv.next37
  br i1 %60, label %.lr.ph33, label %._crit_edge34, !llvm.loop !13
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4sqrtIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #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 = { 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 #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 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" }

!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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !10}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass