; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/125 Division 1/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 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"struct.std::_Setprecision" = type { i32 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@xp = external dso_local global x86_fp80, align 16
@yp = external dso_local global x86_fp80, align 16
@vp = external dso_local global x86_fp80, align 16
@x = external dso_local global x86_fp80, align 16
@y = external dso_local global x86_fp80, align 16
@v = external dso_local global x86_fp80, align 16
@r = external dso_local global x86_fp80, align 16
@R = external dso_local global x86_fp80, align 16
@w = external dso_local global x86_fp80, align 16
@eps = external dso_local global x86_fp80, align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef x86_fp80 @_Z4disteeee(x86_fp80 noundef, x86_fp80 noundef, x86_fp80 noundef, x86_fp80 noundef) #0

; 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 speculatable willreturn memory(none)
declare x86_fp80 @llvm.fmuladd.f80(x86_fp80, x86_fp80, x86_fp80) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef x86_fp80 @_Z14distWithCircleeeee(x86_fp80 noundef, x86_fp80 noundef, x86_fp80 noundef, x86_fp80 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 {
  %1 = alloca i32, align 4
  %2 = alloca %"struct.std::_Setprecision", align 4
  %3 = alloca x86_fp80, align 16
  %4 = alloca x86_fp80, align 16
  %5 = alloca x86_fp80, align 16
  %6 = alloca i32, align 4
  %7 = alloca x86_fp80, align 16
  %8 = alloca x86_fp80, align 16
  %9 = alloca x86_fp80, align 16
  %10 = alloca x86_fp80, align 16
  %11 = alloca %"struct.std::_Setprecision", align 4
  store i32 0, ptr %1, align 4
  %12 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %13 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %14 = getelementptr i8, ptr %13, i64 -24
  %15 = load i64, ptr %14, align 8
  %16 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %15
  %17 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %16, ptr noundef null)
  %18 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %19 = getelementptr i8, ptr %18, i64 -24
  %20 = load i64, ptr %19, align 8
  %21 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %20
  %22 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %21, ptr noundef null)
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 16 dereferenceable(16) @xp)
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 16 dereferenceable(16) @yp)
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 16 dereferenceable(16) @vp)
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 16 dereferenceable(16) @x)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 16 dereferenceable(16) @y)
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 16 dereferenceable(16) @v)
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 16 dereferenceable(16) @r)
  %30 = load x86_fp80, ptr @xp, align 16, !tbaa !8
  %31 = load x86_fp80, ptr @yp, align 16, !tbaa !8
  %32 = call noundef x86_fp80 @_Z4disteeee(x86_fp80 noundef 0xK00000000000000000000, x86_fp80 noundef 0xK00000000000000000000, x86_fp80 noundef %30, x86_fp80 noundef %31)
  store x86_fp80 %32, ptr @R, align 16, !tbaa !8
  %33 = load x86_fp80, ptr @vp, align 16, !tbaa !8
  %34 = load x86_fp80, ptr @R, align 16, !tbaa !8
  %35 = fdiv x86_fp80 %33, %34
  store x86_fp80 %35, ptr @w, align 16, !tbaa !8
  %36 = load x86_fp80, ptr @xp, align 16, !tbaa !8
  %37 = load x86_fp80, ptr @yp, align 16, !tbaa !8
  %38 = load x86_fp80, ptr @x, align 16, !tbaa !8
  %39 = load x86_fp80, ptr @y, align 16, !tbaa !8
  %40 = call noundef x86_fp80 @_Z4disteeee(x86_fp80 noundef %36, x86_fp80 noundef %37, x86_fp80 noundef %38, x86_fp80 noundef %39)
  %41 = load x86_fp80, ptr @eps, align 16, !tbaa !8
  %42 = fcmp olt x86_fp80 %40, %41
  br i1 %42, label %43, label %52

43:                                               ; preds = %0
  %44 = call i32 @_ZSt12setprecisioni(i32 noundef 11)
  %45 = getelementptr inbounds %"struct.std::_Setprecision", ptr %2, i32 0, i32 0
  store i32 %44, ptr %45, align 4
  %46 = getelementptr inbounds %"struct.std::_Setprecision", ptr %2, i32 0, i32 0
  %47 = load i32, ptr %46, align 4
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 %47)
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %48, ptr noundef @_ZSt5fixedRSt8ios_base)
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %49, i32 noundef 0)
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  br label %110

52:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 16, ptr %3) #8
  store x86_fp80 0xK00000000000000000000, ptr %3, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #8
  store x86_fp80 0xK401CEE6B280000000000, ptr %4, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  store i32 0, ptr %6, align 4, !tbaa !11
  br label %53

53:                                               ; preds = %97, %52
  %54 = load i32, ptr %6, align 4, !tbaa !11
  %55 = icmp slt i32 %54, 100
  br i1 %55, label %57, label %56

56:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %100

57:                                               ; preds = %53
  %58 = load x86_fp80, ptr %3, align 16, !tbaa !8
  %59 = load x86_fp80, ptr %4, align 16, !tbaa !8
  %60 = fadd x86_fp80 %58, %59
  %61 = fdiv x86_fp80 %60, 0xK40008000000000000000
  store x86_fp80 %61, ptr %5, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #8
  %62 = load x86_fp80, ptr @w, align 16, !tbaa !8
  %63 = load x86_fp80, ptr %5, align 16, !tbaa !8
  %64 = fmul x86_fp80 %62, %63
  store x86_fp80 %64, ptr %7, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #8
  %65 = load x86_fp80, ptr @xp, align 16, !tbaa !8
  %66 = load x86_fp80, ptr %7, align 16, !tbaa !8
  %67 = call noundef x86_fp80 @_ZSt3cose(x86_fp80 noundef %66)
  %68 = load x86_fp80, ptr @yp, align 16, !tbaa !8
  %69 = load x86_fp80, ptr %7, align 16, !tbaa !8
  %70 = call noundef x86_fp80 @_ZSt3sine(x86_fp80 noundef %69)
  %71 = fmul x86_fp80 %68, %70
  %72 = fneg x86_fp80 %71
  %73 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %65, x86_fp80 %67, x86_fp80 %72)
  store x86_fp80 %73, ptr %8, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #8
  %74 = load x86_fp80, ptr @yp, align 16, !tbaa !8
  %75 = load x86_fp80, ptr %7, align 16, !tbaa !8
  %76 = call noundef x86_fp80 @_ZSt3cose(x86_fp80 noundef %75)
  %77 = load x86_fp80, ptr @xp, align 16, !tbaa !8
  %78 = load x86_fp80, ptr %7, align 16, !tbaa !8
  %79 = call noundef x86_fp80 @_ZSt3sine(x86_fp80 noundef %78)
  %80 = fmul x86_fp80 %77, %79
  %81 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %74, x86_fp80 %76, x86_fp80 %80)
  store x86_fp80 %81, ptr %9, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #8
  %82 = load x86_fp80, ptr @x, align 16, !tbaa !8
  %83 = load x86_fp80, ptr @y, align 16, !tbaa !8
  %84 = load x86_fp80, ptr %8, align 16, !tbaa !8
  %85 = load x86_fp80, ptr %9, align 16, !tbaa !8
  %86 = call noundef x86_fp80 @_Z14distWithCircleeeee(x86_fp80 noundef %82, x86_fp80 noundef %83, x86_fp80 noundef %84, x86_fp80 noundef %85)
  store x86_fp80 %86, ptr %10, align 16, !tbaa !8
  %87 = load x86_fp80, ptr %10, align 16, !tbaa !8
  %88 = load x86_fp80, ptr @v, align 16, !tbaa !8
  %89 = load x86_fp80, ptr %5, align 16, !tbaa !8
  %90 = fmul x86_fp80 %88, %89
  %91 = fcmp ole x86_fp80 %87, %90
  br i1 %91, label %92, label %94

92:                                               ; preds = %57
  %93 = load x86_fp80, ptr %5, align 16, !tbaa !8
  store x86_fp80 %93, ptr %4, align 16, !tbaa !8
  br label %96

94:                                               ; preds = %57
  %95 = load x86_fp80, ptr %5, align 16, !tbaa !8
  store x86_fp80 %95, ptr %3, align 16, !tbaa !8
  br label %96

96:                                               ; preds = %94, %92
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #8
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %6, align 4, !tbaa !11
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %6, align 4, !tbaa !11
  br label %53, !llvm.loop !13

100:                                              ; preds = %56
  %101 = call i32 @_ZSt12setprecisioni(i32 noundef 11)
  %102 = getelementptr inbounds %"struct.std::_Setprecision", ptr %11, i32 0, i32 0
  store i32 %101, ptr %102, align 4
  %103 = getelementptr inbounds %"struct.std::_Setprecision", ptr %11, i32 0, i32 0
  %104 = load i32, ptr %103, align 4
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 %104)
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %105, ptr noundef @_ZSt5fixedRSt8ios_base)
  %107 = load x86_fp80, ptr %3, align 16, !tbaa !8
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEe(ptr noundef nonnull align 8 dereferenceable(8) %106, x86_fp80 noundef %107)
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %108, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #8
  br label %110

110:                                              ; preds = %100, %43
  %111 = load i32, ptr %1, align 4
  ret i32 %111
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #5

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #6 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)) #0 align 2

; 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) #1

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

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

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

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

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

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

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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #5 = { "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 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 #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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long double", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; 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 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@xp = external dso_local global x86_fp80, align 16
@yp = external dso_local global x86_fp80, align 16
@vp = external dso_local global x86_fp80, align 16
@x = external dso_local global x86_fp80, align 16
@y = external dso_local global x86_fp80, align 16
@v = external dso_local global x86_fp80, align 16
@r = external dso_local global x86_fp80, align 16
@R = external dso_local local_unnamed_addr global x86_fp80, align 16
@w = external dso_local local_unnamed_addr global x86_fp80, align 16
@eps = external dso_local local_unnamed_addr global x86_fp80, align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8

; 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 #0 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)) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef x86_fp80 @_Z4disteeee(x86_fp80 noundef, x86_fp80 noundef, x86_fp80 noundef, x86_fp80 noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef x86_fp80 @_Z14distWithCircleeeee(x86_fp80 noundef, x86_fp80 noundef, x86_fp80 noundef, x86_fp80 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %2 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %3 = getelementptr i8, ptr %2, i64 -24
  %4 = load i64, ptr %3, align 8
  %5 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %4
  %6 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %5, ptr noundef null)
  %7 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %9
  %11 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  %12 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 16 dereferenceable(16) @xp)
  %13 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 16 dereferenceable(16) @yp)
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 16 dereferenceable(16) @vp)
  %15 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 16 dereferenceable(16) @x)
  %16 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 16 dereferenceable(16) @y)
  %17 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 16 dereferenceable(16) @v)
  %18 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 16 dereferenceable(16) @r)
  %19 = load x86_fp80, ptr @xp, align 16, !tbaa !8
  %20 = load x86_fp80, ptr @yp, align 16, !tbaa !8
  %21 = tail call noundef x86_fp80 @_Z4disteeee(x86_fp80 noundef 0xK00000000000000000000, x86_fp80 noundef 0xK00000000000000000000, x86_fp80 noundef %19, x86_fp80 noundef %20)
  store x86_fp80 %21, ptr @R, align 16, !tbaa !8
  %22 = load x86_fp80, ptr @vp, align 16, !tbaa !8
  %23 = fdiv x86_fp80 %22, %21
  store x86_fp80 %23, ptr @w, align 16, !tbaa !8
  %24 = load x86_fp80, ptr @xp, align 16, !tbaa !8
  %25 = load x86_fp80, ptr @yp, align 16, !tbaa !8
  %26 = load x86_fp80, ptr @x, align 16, !tbaa !8
  %27 = load x86_fp80, ptr @y, align 16, !tbaa !8
  %28 = tail call noundef x86_fp80 @_Z4disteeee(x86_fp80 noundef %24, x86_fp80 noundef %25, x86_fp80 noundef %26, x86_fp80 noundef %27)
  %29 = load x86_fp80, ptr @eps, align 16, !tbaa !8
  %30 = fcmp olt x86_fp80 %28, %29
  br i1 %30, label %31, label %.preheader

31:                                               ; preds = %0
  %32 = tail call i32 @_ZSt12setprecisioni(i32 noundef 11)
  %33 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 %32)
  %34 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull @_ZSt5fixedRSt8ios_base)
  %35 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %34, i32 noundef 0)
  br label %65

36:                                               ; preds = %.preheader
  %37 = tail call i32 @_ZSt12setprecisioni(i32 noundef 11)
  %38 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 %37)
  %39 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull @_ZSt5fixedRSt8ios_base)
  %40 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEe(ptr noundef nonnull align 8 dereferenceable(8) %39, x86_fp80 noundef %..020)
  br label %65

.preheader:                                       ; preds = %0, %.preheader
  %.02026 = phi x86_fp80 [ %..020, %.preheader ], [ 0xK00000000000000000000, %0 ]
  %.02125 = phi x86_fp80 [ %.021., %.preheader ], [ 0xK401CEE6B280000000000, %0 ]
  %.02324 = phi i32 [ %64, %.preheader ], [ 0, %0 ]
  %41 = fadd x86_fp80 %.02125, %.02026
  %42 = fmul x86_fp80 %41, 0xK3FFE8000000000000000
  %43 = load x86_fp80, ptr @w, align 16, !tbaa !8
  %44 = fmul x86_fp80 %42, %43
  %45 = load x86_fp80, ptr @xp, align 16, !tbaa !8
  %46 = tail call noundef x86_fp80 @_ZSt3cose(x86_fp80 noundef %44)
  %47 = load x86_fp80, ptr @yp, align 16, !tbaa !8
  %48 = tail call noundef x86_fp80 @_ZSt3sine(x86_fp80 noundef %44)
  %49 = fneg x86_fp80 %47
  %50 = fmul x86_fp80 %48, %49
  %51 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %45, x86_fp80 %46, x86_fp80 %50)
  %52 = load x86_fp80, ptr @yp, align 16, !tbaa !8
  %53 = tail call noundef x86_fp80 @_ZSt3cose(x86_fp80 noundef %44)
  %54 = load x86_fp80, ptr @xp, align 16, !tbaa !8
  %55 = tail call noundef x86_fp80 @_ZSt3sine(x86_fp80 noundef %44)
  %56 = fmul x86_fp80 %54, %55
  %57 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %52, x86_fp80 %53, x86_fp80 %56)
  %58 = load x86_fp80, ptr @x, align 16, !tbaa !8
  %59 = load x86_fp80, ptr @y, align 16, !tbaa !8
  %60 = tail call noundef x86_fp80 @_Z14distWithCircleeeee(x86_fp80 noundef %58, x86_fp80 noundef %59, x86_fp80 noundef %51, x86_fp80 noundef %57)
  %61 = load x86_fp80, ptr @v, align 16, !tbaa !8
  %62 = fmul x86_fp80 %42, %61
  %63 = fcmp ugt x86_fp80 %60, %62
  %.021. = select i1 %63, x86_fp80 %.02125, x86_fp80 %42
  %..020 = select i1 %63, x86_fp80 %42, x86_fp80 %.02026
  %64 = add nuw nsw i32 %.02324, 1
  %exitcond.not = icmp eq i32 %64, 100
  br i1 %exitcond.not, label %36, label %.preheader, !llvm.loop !11

65:                                               ; preds = %36, %31
  %.sink = phi ptr [ %40, %36 ], [ %35, %31 ]
  %66 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %.sink, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #5 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 #0 align 2

; 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 #1

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

; 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 #0 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)) #1

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

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

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

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

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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #4 = { "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 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 = { 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" }

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


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