; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/159 Division 2/Problem C (C)

; 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_ostream" = type { ptr, %"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 }

@n = external dso_local global i32, align 4
@x = external dso_local global double, align 8
@y = external dso_local global double, align 8
@mn = external dso_local global double, align 8
@PI = external dso_local global double, align 8
@a = external dso_local global [100000 x double], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 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 double, align 8
  %4 = alloca i32, align 4
  %5 = alloca double, align 8
  store i32 0, ptr %1, align 4
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  %7 = load double, ptr @PI, align 8, !tbaa !5
  %8 = fmul double 2.000000e+00, %7
  store double %8, ptr @mn, align 8, !tbaa !5
  %9 = load i32, ptr @n, align 4, !tbaa !9
  %10 = icmp eq i32 %9, 1
  br i1 %10, label %11, label %14

11:                                               ; preds = %0
  %12 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
  %13 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  br label %123

14:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 0, ptr %2, align 4, !tbaa !9
  br label %15

15:                                               ; preds = %76, %14
  %16 = load i32, ptr %2, align 4, !tbaa !9
  %17 = load i32, ptr @n, align 4, !tbaa !9
  %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) #8
  br label %79

20:                                               ; preds = %15
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @x, ptr noundef @y)
  %22 = load double, ptr @x, align 8, !tbaa !5
  %23 = fcmp ogt double %22, 0.000000e+00
  br i1 %23, label %24, label %45

24:                                               ; preds = %20
  %25 = load double, ptr @y, align 8, !tbaa !5
  %26 = load double, ptr @x, align 8, !tbaa !5
  %27 = fdiv double %25, %26
  %28 = call double @atan(double noundef %27) #8
  %29 = load i32, ptr %2, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %30
  store double %28, ptr %31, align 8, !tbaa !5
  %32 = load i32, ptr %2, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %33
  %35 = load double, ptr %34, align 8, !tbaa !5
  %36 = fcmp olt double %35, 0.000000e+00
  br i1 %36, label %37, label %44

37:                                               ; preds = %24
  %38 = load double, ptr @PI, align 8, !tbaa !5
  %39 = load i32, ptr %2, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %40
  %42 = load double, ptr %41, align 8, !tbaa !5
  %43 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %38, double %42)
  store double %43, ptr %41, align 8, !tbaa !5
  br label %44

44:                                               ; preds = %37, %24
  br label %75

45:                                               ; preds = %20
  %46 = load double, ptr @x, align 8, !tbaa !5
  %47 = fcmp oeq double %46, 0.000000e+00
  br i1 %47, label %48, label %64

48:                                               ; preds = %45
  %49 = load double, ptr @y, align 8, !tbaa !5
  %50 = fcmp ogt double %49, 0.000000e+00
  br i1 %50, label %51, label %57

51:                                               ; preds = %48
  %52 = load double, ptr @PI, align 8, !tbaa !5
  %53 = fdiv double %52, 2.000000e+00
  %54 = load i32, ptr %2, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %55
  store double %53, ptr %56, align 8, !tbaa !5
  br label %63

57:                                               ; preds = %48
  %58 = load double, ptr @PI, align 8, !tbaa !5
  %59 = fmul double 1.500000e+00, %58
  %60 = load i32, ptr %2, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %61
  store double %59, ptr %62, align 8, !tbaa !5
  br label %63

63:                                               ; preds = %57, %51
  br label %74

64:                                               ; preds = %45
  %65 = load double, ptr @PI, align 8, !tbaa !5
  %66 = load double, ptr @y, align 8, !tbaa !5
  %67 = load double, ptr @x, align 8, !tbaa !5
  %68 = fdiv double %66, %67
  %69 = call double @atan(double noundef %68) #8
  %70 = fadd double %65, %69
  %71 = load i32, ptr %2, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %72
  store double %70, ptr %73, align 8, !tbaa !5
  br label %74

74:                                               ; preds = %64, %63
  br label %75

75:                                               ; preds = %74, %44
  br label %76

76:                                               ; preds = %75
  %77 = load i32, ptr %2, align 4, !tbaa !9
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %2, align 4, !tbaa !9
  br label %15, !llvm.loop !11

79:                                               ; preds = %19
  %80 = load i32, ptr @n, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds double, ptr @a, i64 %81
  call void @_ZSt4sortIPdEvT_S1_(ptr noundef @a, ptr noundef %82)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  %83 = load i32, ptr @n, align 4, !tbaa !9
  %84 = sub nsw i32 %83, 1
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %85
  %87 = load double, ptr %86, align 8, !tbaa !5
  %88 = load double, ptr @a, align 16, !tbaa !5
  %89 = fsub double %87, %88
  store double %89, ptr %3, align 8, !tbaa !5
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) @mn, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %91 = load double, ptr %90, align 8, !tbaa !5
  store double %91, ptr @mn, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 1, ptr %4, align 4, !tbaa !9
  br label %92

92:                                               ; preds = %114, %79
  %93 = load i32, ptr %4, align 4, !tbaa !9
  %94 = load i32, ptr @n, align 4, !tbaa !9
  %95 = icmp slt i32 %93, %94
  br i1 %95, label %97, label %96

96:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  br label %117

97:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %98 = load double, ptr @PI, align 8, !tbaa !5
  %99 = load double, ptr @PI, align 8, !tbaa !5
  %100 = fadd double %98, %99
  %101 = load i32, ptr %4, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %102
  %104 = load double, ptr %103, align 8, !tbaa !5
  %105 = load i32, ptr %4, align 4, !tbaa !9
  %106 = sub nsw i32 %105, 1
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %107
  %109 = load double, ptr %108, align 8, !tbaa !5
  %110 = fsub double %104, %109
  %111 = fsub double %100, %110
  store double %111, ptr %5, align 8, !tbaa !5
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) @mn, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %113 = load double, ptr %112, align 8, !tbaa !5
  store double %113, ptr @mn, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %114

114:                                              ; preds = %97
  %115 = load i32, ptr %4, align 4, !tbaa !9
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %4, align 4, !tbaa !9
  br label %92, !llvm.loop !13

117:                                              ; preds = %96
  %118 = load double, ptr @mn, align 8, !tbaa !5
  %119 = fmul double %118, 1.800000e+02
  %120 = load double, ptr @PI, align 8, !tbaa !5
  %121 = fdiv double %119, %120
  %122 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, double noundef %121)
  store i32 0, ptr %1, align 4
  br label %123

123:                                              ; preds = %117, %11
  %124 = load i32, ptr %1, align 4
  ret i32 %124
}

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 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)) #3

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

; Function Attrs: nounwind
declare double @atan(double noundef) #5

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPdEvT_S1_(ptr noundef, ptr noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #7

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 = { 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 #3 = { 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 #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 #8 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !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_ostream" = type { ptr, %"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 }

@n = external dso_local global i32, align 4
@x = external dso_local global double, align 8
@y = external dso_local global double, align 8
@mn = external dso_local global double, align 8
@PI = external dso_local local_unnamed_addr global double, align 8
@a = external dso_local global [100000 x double], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca double, align 8
  %2 = alloca double, align 8
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %4 = load double, ptr @PI, align 8, !tbaa !5
  %5 = fmul double %4, 2.000000e+00
  store double %5, ptr @mn, align 8, !tbaa !5
  %6 = load i32, ptr @n, align 4, !tbaa !9
  %7 = icmp eq i32 %6, 1
  br i1 %7, label %9, label %.preheader

.preheader:                                       ; preds = %0
  %8 = icmp sgt i32 %6, 0
  br i1 %8, label %.lr.ph, label %.preheader.._crit_edge_crit_edge

.preheader.._crit_edge_crit_edge:                 ; preds = %.preheader
  %.pre = sext i32 %6 to i64
  br label %._crit_edge

9:                                                ; preds = %0
  %10 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
  %11 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %77

._crit_edge:                                      ; preds = %54, %.preheader.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.preheader.._crit_edge_crit_edge ], [ %56, %54 ]
  %12 = getelementptr inbounds double, ptr @a, i64 %.pre-phi
  tail call void @_ZSt4sortIPdEvT_S1_(ptr noundef nonnull @a, ptr noundef nonnull %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #9
  %13 = load i32, ptr @n, align 4, !tbaa !9
  %14 = add nsw i32 %13, -1
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %15
  %17 = load double, ptr %16, align 8, !tbaa !5
  %18 = load double, ptr @a, align 16, !tbaa !5
  %19 = fsub double %17, %18
  store double %19, ptr %1, align 8, !tbaa !5
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) @mn, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %21 = load double, ptr %20, align 8, !tbaa !5
  store double %21, ptr @mn, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #9
  %22 = load i32, ptr @n, align 4, !tbaa !9
  %23 = icmp sgt i32 %22, 1
  br i1 %23, label %.lr.ph21, label %._crit_edge22

.lr.ph:                                           ; preds = %.preheader, %54
  %indvars.iv = phi i64 [ %indvars.iv.next, %54 ], [ 0, %.preheader ]
  %24 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @x, ptr noundef nonnull @y)
  %25 = load double, ptr @x, align 8, !tbaa !5
  %26 = fcmp ogt double %25, 0.000000e+00
  br i1 %26, label %27, label %36

27:                                               ; preds = %.lr.ph
  %28 = load double, ptr @y, align 8, !tbaa !5
  %29 = fdiv double %28, %25
  %30 = tail call double @atan(double noundef %29) #9
  %31 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %indvars.iv
  store double %30, ptr %31, align 8, !tbaa !5
  %32 = fcmp olt double %30, 0.000000e+00
  br i1 %32, label %33, label %54

33:                                               ; preds = %27
  %34 = load double, ptr @PI, align 8, !tbaa !5
  %35 = tail call double @llvm.fmuladd.f64(double %34, double 2.000000e+00, double %30)
  store double %35, ptr %31, align 8, !tbaa !5
  br label %54

36:                                               ; preds = %.lr.ph
  %37 = fcmp oeq double %25, 0.000000e+00
  br i1 %37, label %38, label %47

38:                                               ; preds = %36
  %39 = load double, ptr @y, align 8, !tbaa !5
  %40 = fcmp ogt double %39, 0.000000e+00
  %41 = load double, ptr @PI, align 8, !tbaa !5
  %42 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %indvars.iv
  br i1 %40, label %43, label %45

43:                                               ; preds = %38
  %44 = fmul double %41, 5.000000e-01
  store double %44, ptr %42, align 8, !tbaa !5
  br label %54

45:                                               ; preds = %38
  %46 = fmul double %41, 1.500000e+00
  store double %46, ptr %42, align 8, !tbaa !5
  br label %54

47:                                               ; preds = %36
  %48 = load double, ptr @PI, align 8, !tbaa !5
  %49 = load double, ptr @y, align 8, !tbaa !5
  %50 = fdiv double %49, %25
  %51 = tail call double @atan(double noundef %50) #9
  %52 = fadd double %48, %51
  %53 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %indvars.iv
  store double %52, ptr %53, align 8, !tbaa !5
  br label %54

54:                                               ; preds = %33, %27, %43, %45, %47
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %55 = load i32, ptr @n, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = icmp slt i64 %indvars.iv.next, %56
  br i1 %57, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge22:                                    ; preds = %.lr.ph21, %._crit_edge
  %58 = phi double [ %21, %._crit_edge ], [ %73, %.lr.ph21 ]
  %59 = fmul double %58, 1.800000e+02
  %60 = load double, ptr @PI, align 8, !tbaa !5
  %61 = fdiv double %59, %60
  %62 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %61)
  br label %77

.lr.ph21:                                         ; preds = %._crit_edge, %.lr.ph21
  %indvars.iv25 = phi i64 [ %indvars.iv.next26, %.lr.ph21 ], [ 1, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #9
  %63 = load double, ptr @PI, align 8, !tbaa !5
  %64 = fadd double %63, %63
  %65 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %indvars.iv25
  %66 = load double, ptr %65, align 8, !tbaa !5
  %67 = add nsw i64 %indvars.iv25, -1
  %68 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %67
  %69 = load double, ptr %68, align 8, !tbaa !5
  %70 = fsub double %66, %69
  %71 = fsub double %64, %70
  store double %71, ptr %2, align 8, !tbaa !5
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) @mn, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %73 = load double, ptr %72, align 8, !tbaa !5
  store double %73, ptr @mn, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  %indvars.iv.next26 = add nuw nsw i64 %indvars.iv25, 1
  %74 = load i32, ptr @n, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = icmp slt i64 %indvars.iv.next26, %75
  br i1 %76, label %.lr.ph21, label %._crit_edge22, !llvm.loop !13

77:                                               ; preds = %._crit_edge22, %9
  ret i32 0
}

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #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 #3 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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPdEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #4

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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 #9 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


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