; LLVM IR from manishbisht/Competitive-Programming :: Hiring Challenges/Google/Software Engineering Intern - Tokyo Summer 2017 (main)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::_Setprecision" = type { i32 }

@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca x86_fp80, align 16
  %8 = alloca x86_fp80, align 16
  %9 = alloca [105 x x86_fp80], align 16
  %10 = alloca %"struct.std::_Setprecision", align 4
  store i32 0, ptr %1, align 4
  %11 = load ptr, ptr @stdin, align 8, !tbaa !5
  %12 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.1, ptr noundef %11)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 1680, ptr %9) #7
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  store i64 0, ptr %4, align 8, !tbaa !9
  br label %14

14:                                               ; preds = %117, %0
  %15 = load i64, ptr %4, align 8, !tbaa !9
  %16 = load i64, ptr %2, align 8, !tbaa !9
  %17 = icmp slt i64 %15, %16
  br i1 %17, label %18, label %120

18:                                               ; preds = %14
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  %20 = load i64, ptr %4, align 8, !tbaa !9
  %21 = add nsw i64 %20, 1
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %19, i64 noundef %21)
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef @.str.3)
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
  store x86_fp80 0xK00000000000000000000, ptr %7, align 16, !tbaa !11
  store i64 0, ptr %5, align 8, !tbaa !9
  br label %25

25:                                               ; preds = %38, %18
  %26 = load i64, ptr %5, align 8, !tbaa !9
  %27 = load i64, ptr %3, align 8, !tbaa !9
  %28 = icmp slt i64 %26, %27
  br i1 %28, label %29, label %41

29:                                               ; preds = %25
  %30 = load i64, ptr %5, align 8, !tbaa !9
  %31 = getelementptr inbounds [105 x x86_fp80], ptr %9, i64 0, i64 %30
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 16 dereferenceable(16) %31)
  %33 = load x86_fp80, ptr %7, align 16, !tbaa !11
  %34 = load i64, ptr %5, align 8, !tbaa !9
  %35 = getelementptr inbounds [105 x x86_fp80], ptr %9, i64 0, i64 %34
  %36 = load x86_fp80, ptr %35, align 16, !tbaa !11
  %37 = fadd x86_fp80 %33, %36
  store x86_fp80 %37, ptr %7, align 16, !tbaa !11
  br label %38

38:                                               ; preds = %29
  %39 = load i64, ptr %5, align 8, !tbaa !9
  %40 = add nsw i64 %39, 1
  store i64 %40, ptr %5, align 8, !tbaa !9
  br label %25, !llvm.loop !13

41:                                               ; preds = %25
  %42 = load x86_fp80, ptr %7, align 16, !tbaa !11
  %43 = load i64, ptr %3, align 8, !tbaa !9
  %44 = sitofp i64 %43 to x86_fp80
  %45 = fdiv x86_fp80 %42, %44
  store x86_fp80 %45, ptr %7, align 16, !tbaa !11
  store x86_fp80 0xK00000000000000000000, ptr %8, align 16, !tbaa !11
  store i64 0, ptr %5, align 8, !tbaa !9
  br label %46

46:                                               ; preds = %63, %41
  %47 = load i64, ptr %5, align 8, !tbaa !9
  %48 = load i64, ptr %3, align 8, !tbaa !9
  %49 = icmp slt i64 %47, %48
  br i1 %49, label %50, label %66

50:                                               ; preds = %46
  %51 = load i64, ptr %5, align 8, !tbaa !9
  %52 = getelementptr inbounds [105 x x86_fp80], ptr %9, i64 0, i64 %51
  %53 = load x86_fp80, ptr %52, align 16, !tbaa !11
  %54 = load x86_fp80, ptr %7, align 16, !tbaa !11
  %55 = fsub x86_fp80 %53, %54
  %56 = fptosi x86_fp80 %55 to i64
  store i64 %56, ptr %6, align 8, !tbaa !9
  %57 = load x86_fp80, ptr %8, align 16, !tbaa !11
  %58 = load i64, ptr %6, align 8, !tbaa !9
  %59 = load i64, ptr %6, align 8, !tbaa !9
  %60 = mul nsw i64 %58, %59
  %61 = sitofp i64 %60 to x86_fp80
  %62 = fadd x86_fp80 %57, %61
  store x86_fp80 %62, ptr %8, align 16, !tbaa !11
  br label %63

63:                                               ; preds = %50
  %64 = load i64, ptr %5, align 8, !tbaa !9
  %65 = add nsw i64 %64, 1
  store i64 %65, ptr %5, align 8, !tbaa !9
  br label %46, !llvm.loop !15

66:                                               ; preds = %46
  %67 = load x86_fp80, ptr %8, align 16, !tbaa !11
  %68 = load i64, ptr %3, align 8, !tbaa !9
  %69 = sitofp i64 %68 to x86_fp80
  %70 = fdiv x86_fp80 %67, %69
  store x86_fp80 %70, ptr %8, align 16, !tbaa !11
  %71 = load x86_fp80, ptr %8, align 16, !tbaa !11
  %72 = fptosi x86_fp80 %71 to i64
  store i64 %72, ptr %6, align 8, !tbaa !9
  %73 = load i64, ptr %6, align 8, !tbaa !9
  %74 = icmp eq i64 %73, 0
  br i1 %74, label %75, label %87

75:                                               ; preds = %66
  store i64 0, ptr %5, align 8, !tbaa !9
  br label %76

76:                                               ; preds = %83, %75
  %77 = load i64, ptr %5, align 8, !tbaa !9
  %78 = load i64, ptr %3, align 8, !tbaa !9
  %79 = icmp slt i64 %77, %78
  br i1 %79, label %80, label %86

80:                                               ; preds = %76
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef 5.000000e+01)
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef @.str.4)
  br label %83

83:                                               ; preds = %80
  %84 = load i64, ptr %5, align 8, !tbaa !9
  %85 = add nsw i64 %84, 1
  store i64 %85, ptr %5, align 8, !tbaa !9
  br label %76, !llvm.loop !16

86:                                               ; preds = %76
  br label %115

87:                                               ; preds = %66
  %88 = load x86_fp80, ptr %8, align 16, !tbaa !11
  %89 = call noundef x86_fp80 @_ZSt4sqrte(x86_fp80 noundef %88)
  store x86_fp80 %89, ptr %8, align 16, !tbaa !11
  store i64 0, ptr %5, align 8, !tbaa !9
  br label %90

90:                                               ; preds = %111, %87
  %91 = load i64, ptr %5, align 8, !tbaa !9
  %92 = load i64, ptr %3, align 8, !tbaa !9
  %93 = icmp slt i64 %91, %92
  br i1 %93, label %94, label %114

94:                                               ; preds = %90
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt5fixedRSt8ios_base)
  %96 = call i32 @_ZSt12setprecisioni(i32 noundef 13)
  %97 = getelementptr inbounds %"struct.std::_Setprecision", ptr %10, i32 0, i32 0
  store i32 %96, ptr %97, align 4
  %98 = getelementptr inbounds %"struct.std::_Setprecision", ptr %10, i32 0, i32 0
  %99 = load i32, ptr %98, align 4
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) %95, i32 %99)
  %101 = load i64, ptr %5, align 8, !tbaa !9
  %102 = getelementptr inbounds [105 x x86_fp80], ptr %9, i64 0, i64 %101
  %103 = load x86_fp80, ptr %102, align 16, !tbaa !11
  %104 = load x86_fp80, ptr %7, align 16, !tbaa !11
  %105 = fsub x86_fp80 %103, %104
  %106 = load x86_fp80, ptr %8, align 16, !tbaa !11
  %107 = fdiv x86_fp80 %105, %106
  %108 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 0xK4002A000000000000000, x86_fp80 %107, x86_fp80 0xK4004C800000000000000)
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEe(ptr noundef nonnull align 8 dereferenceable(8) %100, x86_fp80 noundef %108)
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %109, ptr noundef @.str.4)
  br label %111

111:                                              ; preds = %94
  %112 = load i64, ptr %5, align 8, !tbaa !9
  %113 = add nsw i64 %112, 1
  store i64 %113, ptr %5, align 8, !tbaa !9
  br label %90, !llvm.loop !17

114:                                              ; preds = %90
  br label %115

115:                                              ; preds = %114, %86
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %117

117:                                              ; preds = %115
  %118 = load i64, ptr %4, align 8, !tbaa !9
  %119 = add nsw i64 %118, 1
  store i64 %119, ptr %4, align 8, !tbaa !9
  br label %14, !llvm.loop !18

120:                                              ; preds = %14
  call void @llvm.lifetime.end.p0(i64 1680, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  ret i32 0
}

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #1

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

; 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)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef x86_fp80 @_ZSt4sqrte(x86_fp80 noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8), i32) #4

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEe(ptr noundef nonnull align 8 dereferenceable(8), x86_fp80 noundef) #3 align 2

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 = { 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 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !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 = !{!12, !12, i64 0}
!12 = !{!"long double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}


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

@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca [105 x x86_fp80], align 16
  %4 = load ptr, ptr @stdin, align 8, !tbaa !5
  %5 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 1680, ptr nonnull %3) #7
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %7 = load i64, ptr %1, align 8, !tbaa !9
  %8 = icmp sgt i64 %7, 0
  br i1 %8, label %.lr.ph48, label %._crit_edge49

.lr.ph48:                                         ; preds = %0, %.loopexit
  %.046 = phi i64 [ %10, %.loopexit ], [ 0, %0 ]
  %9 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  %10 = add nuw nsw i64 %.046, 1
  %11 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %9, i64 noundef %10)
  %12 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull @.str.3)
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %14 = load i64, ptr %2, align 8, !tbaa !9
  %15 = icmp sgt i64 %14, 0
  br i1 %15, label %.lr.ph, label %._crit_edge39.thread

.lr.ph:                                           ; preds = %.lr.ph48, %.lr.ph
  %.02733 = phi i64 [ %20, %.lr.ph ], [ 0, %.lr.ph48 ]
  %.02832 = phi x86_fp80 [ %19, %.lr.ph ], [ 0xK00000000000000000000, %.lr.ph48 ]
  %16 = getelementptr inbounds [105 x x86_fp80], ptr %3, i64 0, i64 %.02733
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 16 dereferenceable(16) %16)
  %18 = load x86_fp80, ptr %16, align 16, !tbaa !11
  %19 = fadd x86_fp80 %.02832, %18
  %20 = add nuw nsw i64 %.02733, 1
  %21 = load i64, ptr %2, align 8, !tbaa !9
  %22 = icmp slt i64 %20, %21
  br i1 %22, label %.lr.ph, label %._crit_edge, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph
  %23 = sitofp i64 %21 to x86_fp80
  %24 = fdiv x86_fp80 %19, %23
  %25 = icmp sgt i64 %21, 0
  br i1 %25, label %.lr.ph38.preheader, label %._crit_edge39

.lr.ph38.preheader:                               ; preds = %._crit_edge
  %xtraiter = and i64 %21, 1
  %26 = icmp eq i64 %21, 1
  br i1 %26, label %._crit_edge39.loopexit.unr-lcssa, label %.lr.ph38.preheader.new

.lr.ph38.preheader.new:                           ; preds = %.lr.ph38.preheader
  %unroll_iter = and i64 %21, 9223372036854775806
  br label %.lr.ph38

.lr.ph38:                                         ; preds = %.lr.ph38, %.lr.ph38.preheader.new
  %.02636 = phi x86_fp80 [ 0xK00000000000000000000, %.lr.ph38.preheader.new ], [ %41, %.lr.ph38 ]
  %.135 = phi i64 [ 0, %.lr.ph38.preheader.new ], [ %42, %.lr.ph38 ]
  %niter = phi i64 [ 0, %.lr.ph38.preheader.new ], [ %niter.next.1, %.lr.ph38 ]
  %27 = getelementptr inbounds [105 x x86_fp80], ptr %3, i64 0, i64 %.135
  %28 = load x86_fp80, ptr %27, align 16, !tbaa !11
  %29 = fsub x86_fp80 %28, %24
  %30 = fptosi x86_fp80 %29 to i64
  %31 = mul nsw i64 %30, %30
  %32 = uitofp nneg i64 %31 to x86_fp80
  %33 = fadd x86_fp80 %.02636, %32
  %34 = or disjoint i64 %.135, 1
  %35 = getelementptr inbounds [105 x x86_fp80], ptr %3, i64 0, i64 %34
  %36 = load x86_fp80, ptr %35, align 16, !tbaa !11
  %37 = fsub x86_fp80 %36, %24
  %38 = fptosi x86_fp80 %37 to i64
  %39 = mul nsw i64 %38, %38
  %40 = uitofp nneg i64 %39 to x86_fp80
  %41 = fadd x86_fp80 %33, %40
  %42 = add nuw nsw i64 %.135, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge39.loopexit.unr-lcssa, label %.lr.ph38, !llvm.loop !15

._crit_edge39.loopexit.unr-lcssa:                 ; preds = %.lr.ph38, %.lr.ph38.preheader
  %.lcssa64.ph = phi x86_fp80 [ poison, %.lr.ph38.preheader ], [ %41, %.lr.ph38 ]
  %.02636.unr = phi x86_fp80 [ 0xK00000000000000000000, %.lr.ph38.preheader ], [ %41, %.lr.ph38 ]
  %.135.unr = phi i64 [ 0, %.lr.ph38.preheader ], [ %42, %.lr.ph38 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge39, label %.lr.ph38.epil

.lr.ph38.epil:                                    ; preds = %._crit_edge39.loopexit.unr-lcssa
  %43 = getelementptr inbounds [105 x x86_fp80], ptr %3, i64 0, i64 %.135.unr
  %44 = load x86_fp80, ptr %43, align 16, !tbaa !11
  %45 = fsub x86_fp80 %44, %24
  %46 = fptosi x86_fp80 %45 to i64
  %47 = mul nsw i64 %46, %46
  %48 = uitofp nneg i64 %47 to x86_fp80
  %49 = fadd x86_fp80 %.02636.unr, %48
  br label %._crit_edge39

._crit_edge39:                                    ; preds = %.lr.ph38.epil, %._crit_edge39.loopexit.unr-lcssa, %._crit_edge
  %.026.lcssa = phi x86_fp80 [ 0xK00000000000000000000, %._crit_edge ], [ %.lcssa64.ph, %._crit_edge39.loopexit.unr-lcssa ], [ %49, %.lr.ph38.epil ]
  %50 = fdiv x86_fp80 %.026.lcssa, %23
  %51 = fptosi x86_fp80 %50 to i64
  %52 = icmp eq i64 %51, 0
  br i1 %52, label %.preheader, label %63

._crit_edge39.thread:                             ; preds = %.lr.ph48
  %53 = sitofp i64 %14 to x86_fp80
  %54 = fdiv x86_fp80 0xK00000000000000000000, %53
  %55 = fdiv x86_fp80 0xK00000000000000000000, %53
  %56 = fptosi x86_fp80 %55 to i64
  %57 = icmp eq i64 %56, 0
  br i1 %57, label %.loopexit, label %63

.preheader:                                       ; preds = %._crit_edge39
  br i1 %25, label %.lr.ph45, label %.loopexit

.lr.ph45:                                         ; preds = %.preheader, %.lr.ph45
  %.244 = phi i64 [ %60, %.lr.ph45 ], [ 0, %.preheader ]
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef 5.000000e+01)
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull @.str.4)
  %60 = add nuw nsw i64 %.244, 1
  %61 = load i64, ptr %2, align 8, !tbaa !9
  %62 = icmp slt i64 %60, %61
  br i1 %62, label %.lr.ph45, label %.loopexit, !llvm.loop !16

63:                                               ; preds = %._crit_edge39.thread, %._crit_edge39
  %64 = phi x86_fp80 [ %55, %._crit_edge39.thread ], [ %50, %._crit_edge39 ]
  %65 = phi x86_fp80 [ %54, %._crit_edge39.thread ], [ %24, %._crit_edge39 ]
  %66 = call noundef x86_fp80 @_ZSt4sqrte(x86_fp80 noundef %64)
  %67 = load i64, ptr %2, align 8, !tbaa !9
  %68 = icmp sgt i64 %67, 0
  br i1 %68, label %.lr.ph43, label %.loopexit

.lr.ph43:                                         ; preds = %63, %.lr.ph43
  %.341 = phi i64 [ %79, %.lr.ph43 ], [ 0, %63 ]
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt5fixedRSt8ios_base)
  %70 = call i32 @_ZSt12setprecisioni(i32 noundef 13)
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) %69, i32 %70)
  %72 = getelementptr inbounds [105 x x86_fp80], ptr %3, i64 0, i64 %.341
  %73 = load x86_fp80, ptr %72, align 16, !tbaa !11
  %74 = fsub x86_fp80 %73, %65
  %75 = fdiv x86_fp80 %74, %66
  %76 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %75, x86_fp80 0xK4002A000000000000000, x86_fp80 0xK4004C800000000000000)
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEe(ptr noundef nonnull align 8 dereferenceable(8) %71, x86_fp80 noundef %76)
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef nonnull @.str.4)
  %79 = add nuw nsw i64 %.341, 1
  %80 = load i64, ptr %2, align 8, !tbaa !9
  %81 = icmp slt i64 %79, %80
  br i1 %81, label %.lr.ph43, label %.loopexit, !llvm.loop !17

.loopexit:                                        ; preds = %.lr.ph43, %.lr.ph45, %._crit_edge39.thread, %63, %.preheader
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %83 = load i64, ptr %1, align 8, !tbaa !9
  %84 = icmp slt i64 %10, %83
  br i1 %84, label %.lr.ph48, label %._crit_edge49, !llvm.loop !18

._crit_edge49:                                    ; preds = %.loopexit, %0
  call void @llvm.lifetime.end.p0(i64 1680, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret i32 0
}

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

; 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 #3 align 2

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

; 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 #3 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef x86_fp80 @_ZSt4sqrte(x86_fp80 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8), i32) local_unnamed_addr #4

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

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

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

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

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

; 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.end.p0(i64 immarg, ptr nocapture) #2

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #6 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !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 = !{!12, !12, i64 0}
!12 = !{!"long double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}


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