; LLVM IR from abeaumont/competitive-programming :: codeforces/1079 (d)

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

@_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 double, align 8
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca %"struct.std::_Setprecision", align 4
  store i32 0, ptr %1, align 4
  %19 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %20 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %21 = getelementptr i8, ptr %20, i64 -24
  %22 = load i64, ptr %21, align 8
  %23 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %22
  %24 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %23, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  %32 = load double, ptr %5, align 8, !tbaa !8
  %33 = load double, ptr %7, align 8, !tbaa !8
  %34 = fsub double %32, %33
  %35 = call double @llvm.fabs.f64(double %34)
  %36 = load double, ptr %8, align 8, !tbaa !8
  %37 = load double, ptr %6, align 8, !tbaa !8
  %38 = fsub double %36, %37
  %39 = call double @llvm.fabs.f64(double %38)
  %40 = fadd double %35, %39
  store double %40, ptr %9, align 8, !tbaa !8
  %41 = load double, ptr %2, align 8, !tbaa !8
  %42 = fcmp une double %41, 0.000000e+00
  br i1 %42, label %43, label %187

43:                                               ; preds = %0
  %44 = load double, ptr %3, align 8, !tbaa !8
  %45 = fcmp une double %44, 0.000000e+00
  br i1 %45, label %46, label %187

46:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  %47 = load double, ptr %4, align 8, !tbaa !8
  %48 = fneg double %47
  %49 = load double, ptr %2, align 8, !tbaa !8
  %50 = load double, ptr %5, align 8, !tbaa !8
  %51 = fneg double %49
  %52 = call double @llvm.fmuladd.f64(double %51, double %50, double %48)
  %53 = load double, ptr %3, align 8, !tbaa !8
  %54 = fdiv double %52, %53
  store double %54, ptr %10, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %55 = load double, ptr %4, align 8, !tbaa !8
  %56 = fneg double %55
  %57 = load double, ptr %3, align 8, !tbaa !8
  %58 = load double, ptr %6, align 8, !tbaa !8
  %59 = fneg double %57
  %60 = call double @llvm.fmuladd.f64(double %59, double %58, double %56)
  %61 = load double, ptr %2, align 8, !tbaa !8
  %62 = fdiv double %60, %61
  store double %62, ptr %11, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %63 = load double, ptr %4, align 8, !tbaa !8
  %64 = fneg double %63
  %65 = load double, ptr %2, align 8, !tbaa !8
  %66 = load double, ptr %7, align 8, !tbaa !8
  %67 = fneg double %65
  %68 = call double @llvm.fmuladd.f64(double %67, double %66, double %64)
  %69 = load double, ptr %3, align 8, !tbaa !8
  %70 = fdiv double %68, %69
  store double %70, ptr %12, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %71 = load double, ptr %4, align 8, !tbaa !8
  %72 = fneg double %71
  %73 = load double, ptr %3, align 8, !tbaa !8
  %74 = load double, ptr %8, align 8, !tbaa !8
  %75 = fneg double %73
  %76 = call double @llvm.fmuladd.f64(double %75, double %74, double %72)
  %77 = load double, ptr %2, align 8, !tbaa !8
  %78 = fdiv double %76, %77
  store double %78, ptr %13, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  %79 = load double, ptr %6, align 8, !tbaa !8
  %80 = load double, ptr %10, align 8, !tbaa !8
  %81 = fsub double %79, %80
  %82 = call double @llvm.fabs.f64(double %81)
  %83 = load double, ptr %8, align 8, !tbaa !8
  %84 = load double, ptr %12, align 8, !tbaa !8
  %85 = fsub double %83, %84
  %86 = call double @llvm.fabs.f64(double %85)
  %87 = fadd double %82, %86
  %88 = load double, ptr %7, align 8, !tbaa !8
  %89 = load double, ptr %5, align 8, !tbaa !8
  %90 = fsub double %88, %89
  %91 = load double, ptr %7, align 8, !tbaa !8
  %92 = load double, ptr %5, align 8, !tbaa !8
  %93 = fsub double %91, %92
  %94 = load double, ptr %12, align 8, !tbaa !8
  %95 = load double, ptr %10, align 8, !tbaa !8
  %96 = fsub double %94, %95
  %97 = load double, ptr %12, align 8, !tbaa !8
  %98 = load double, ptr %10, align 8, !tbaa !8
  %99 = fsub double %97, %98
  %100 = fmul double %96, %99
  %101 = call double @llvm.fmuladd.f64(double %90, double %93, double %100)
  %102 = call double @sqrt(double noundef %101) #9
  %103 = fadd double %87, %102
  store double %103, ptr %14, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  %104 = load double, ptr %6, align 8, !tbaa !8
  %105 = load double, ptr %10, align 8, !tbaa !8
  %106 = fsub double %104, %105
  %107 = call double @llvm.fabs.f64(double %106)
  %108 = load double, ptr %7, align 8, !tbaa !8
  %109 = load double, ptr %13, align 8, !tbaa !8
  %110 = fsub double %108, %109
  %111 = call double @llvm.fabs.f64(double %110)
  %112 = fadd double %107, %111
  %113 = load double, ptr %13, align 8, !tbaa !8
  %114 = load double, ptr %5, align 8, !tbaa !8
  %115 = fsub double %113, %114
  %116 = load double, ptr %13, align 8, !tbaa !8
  %117 = load double, ptr %5, align 8, !tbaa !8
  %118 = fsub double %116, %117
  %119 = load double, ptr %8, align 8, !tbaa !8
  %120 = load double, ptr %10, align 8, !tbaa !8
  %121 = fsub double %119, %120
  %122 = load double, ptr %8, align 8, !tbaa !8
  %123 = load double, ptr %10, align 8, !tbaa !8
  %124 = fsub double %122, %123
  %125 = fmul double %121, %124
  %126 = call double @llvm.fmuladd.f64(double %115, double %118, double %125)
  %127 = call double @sqrt(double noundef %126) #9
  %128 = fadd double %112, %127
  store double %128, ptr %15, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  %129 = load double, ptr %5, align 8, !tbaa !8
  %130 = load double, ptr %11, align 8, !tbaa !8
  %131 = fsub double %129, %130
  %132 = call double @llvm.fabs.f64(double %131)
  %133 = load double, ptr %8, align 8, !tbaa !8
  %134 = load double, ptr %12, align 8, !tbaa !8
  %135 = fsub double %133, %134
  %136 = call double @llvm.fabs.f64(double %135)
  %137 = fadd double %132, %136
  %138 = load double, ptr %7, align 8, !tbaa !8
  %139 = load double, ptr %11, align 8, !tbaa !8
  %140 = fsub double %138, %139
  %141 = load double, ptr %7, align 8, !tbaa !8
  %142 = load double, ptr %11, align 8, !tbaa !8
  %143 = fsub double %141, %142
  %144 = load double, ptr %12, align 8, !tbaa !8
  %145 = load double, ptr %6, align 8, !tbaa !8
  %146 = fsub double %144, %145
  %147 = load double, ptr %12, align 8, !tbaa !8
  %148 = load double, ptr %6, align 8, !tbaa !8
  %149 = fsub double %147, %148
  %150 = fmul double %146, %149
  %151 = call double @llvm.fmuladd.f64(double %140, double %143, double %150)
  %152 = call double @sqrt(double noundef %151) #9
  %153 = fadd double %137, %152
  store double %153, ptr %16, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  %154 = load double, ptr %5, align 8, !tbaa !8
  %155 = load double, ptr %11, align 8, !tbaa !8
  %156 = fsub double %154, %155
  %157 = call double @llvm.fabs.f64(double %156)
  %158 = load double, ptr %7, align 8, !tbaa !8
  %159 = load double, ptr %13, align 8, !tbaa !8
  %160 = fsub double %158, %159
  %161 = call double @llvm.fabs.f64(double %160)
  %162 = fadd double %157, %161
  %163 = load double, ptr %13, align 8, !tbaa !8
  %164 = load double, ptr %11, align 8, !tbaa !8
  %165 = fsub double %163, %164
  %166 = load double, ptr %13, align 8, !tbaa !8
  %167 = load double, ptr %11, align 8, !tbaa !8
  %168 = fsub double %166, %167
  %169 = load double, ptr %8, align 8, !tbaa !8
  %170 = load double, ptr %6, align 8, !tbaa !8
  %171 = fsub double %169, %170
  %172 = load double, ptr %8, align 8, !tbaa !8
  %173 = load double, ptr %6, align 8, !tbaa !8
  %174 = fsub double %172, %173
  %175 = fmul double %171, %174
  %176 = call double @llvm.fmuladd.f64(double %165, double %168, double %175)
  %177 = call double @sqrt(double noundef %176) #9
  %178 = fadd double %162, %177
  store double %178, ptr %17, align 8, !tbaa !8
  %179 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %180 = load double, ptr %179, align 8, !tbaa !8
  store double %180, ptr %9, align 8, !tbaa !8
  %181 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %15)
  %182 = load double, ptr %181, align 8, !tbaa !8
  store double %182, ptr %9, align 8, !tbaa !8
  %183 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %16)
  %184 = load double, ptr %183, align 8, !tbaa !8
  store double %184, ptr %9, align 8, !tbaa !8
  %185 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %186 = load double, ptr %185, align 8, !tbaa !8
  store double %186, ptr %9, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  br label %187

187:                                              ; preds = %46, %43, %0
  %188 = call i32 @_ZSt12setprecisioni(i32 noundef 20)
  %189 = getelementptr inbounds %"struct.std::_Setprecision", ptr %18, i32 0, i32 0
  store i32 %188, ptr %189, align 4
  %190 = getelementptr inbounds %"struct.std::_Setprecision", ptr %18, i32 0, i32 0
  %191 = load i32, ptr %190, align 4
  %192 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 %191)
  %193 = load double, ptr %9, align 8, !tbaa !8
  %194 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %192, double noundef %193)
  %195 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %194, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #9
  %196 = load i32, ptr %1, align 4
  ret i32 %196
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 align 2

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

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

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

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

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

; 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

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

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

; 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 @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) #4 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) #4 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)) #8

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 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 #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 = { 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 #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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"double", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}


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

@_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 = alloca double, align 8
  %2 = alloca double, align 8
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %14 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %15 = getelementptr i8, ptr %14, i64 -24
  %16 = load i64, ptr %15, align 8
  %17 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %16
  %18 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %17, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  %26 = load double, ptr %4, align 8, !tbaa !8
  %27 = load double, ptr %6, align 8, !tbaa !8
  %28 = fsub double %26, %27
  %29 = call double @llvm.fabs.f64(double %28)
  %30 = load double, ptr %7, align 8, !tbaa !8
  %31 = load double, ptr %5, align 8, !tbaa !8
  %32 = fsub double %30, %31
  %33 = call double @llvm.fabs.f64(double %32)
  %34 = fadd double %29, %33
  store double %34, ptr %8, align 8, !tbaa !8
  %35 = load double, ptr %1, align 8, !tbaa !8
  %36 = fcmp une double %35, 0.000000e+00
  %37 = load double, ptr %2, align 8
  %38 = fcmp une double %37, 0.000000e+00
  %or.cond = select i1 %36, i1 %38, i1 false
  br i1 %or.cond, label %39, label %105

39:                                               ; preds = %0
  %40 = load double, ptr %3, align 8, !tbaa !8
  %41 = fneg double %40
  %42 = fneg double %35
  %43 = fneg double %37
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #9
  %44 = insertelement <2 x double> poison, double %42, i64 0
  %45 = shufflevector <2 x double> %44, <2 x double> poison, <2 x i32> zeroinitializer
  %46 = insertelement <2 x double> poison, double %26, i64 0
  %47 = insertelement <2 x double> %46, double %27, i64 1
  %48 = insertelement <2 x double> poison, double %41, i64 0
  %49 = shufflevector <2 x double> %48, <2 x double> poison, <2 x i32> zeroinitializer
  %50 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %45, <2 x double> %47, <2 x double> %49)
  %51 = insertelement <2 x double> poison, double %37, i64 0
  %52 = shufflevector <2 x double> %51, <2 x double> poison, <2 x i32> zeroinitializer
  %53 = fdiv <2 x double> %50, %52
  %54 = insertelement <2 x double> poison, double %31, i64 0
  %55 = insertelement <2 x double> %54, double %30, i64 1
  %56 = fsub <2 x double> %55, %53
  %57 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %56)
  %58 = extractelement <2 x double> %57, i64 0
  %59 = extractelement <2 x double> %57, i64 1
  %60 = fadd double %58, %59
  %61 = fsub double %27, %26
  %62 = extractelement <2 x double> %53, i64 0
  %63 = extractelement <2 x double> %53, i64 1
  %64 = fsub double %63, %62
  %65 = fmul double %64, %64
  %66 = call double @llvm.fmuladd.f64(double %61, double %61, double %65)
  %sqrt28 = call double @llvm.sqrt.f64(double %66)
  %67 = fadd double %60, %sqrt28
  store double %67, ptr %9, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #9
  %68 = fsub double %30, %62
  %69 = fmul double %68, %68
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #9
  %70 = insertelement <2 x double> poison, double %43, i64 0
  %71 = shufflevector <2 x double> %70, <2 x double> poison, <2 x i32> zeroinitializer
  %72 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %71, <2 x double> %55, <2 x double> %49)
  %73 = insertelement <2 x double> poison, double %35, i64 0
  %74 = shufflevector <2 x double> %73, <2 x double> poison, <2 x i32> zeroinitializer
  %75 = fdiv <2 x double> %72, %74
  %76 = fsub <2 x double> %47, %75
  %77 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %76)
  %78 = extractelement <2 x double> %77, i64 1
  %79 = fadd double %58, %78
  %80 = extractelement <2 x double> %75, i64 1
  %81 = fsub double %80, %26
  %82 = call double @llvm.fmuladd.f64(double %81, double %81, double %69)
  %sqrt27 = call double @llvm.sqrt.f64(double %82)
  %83 = fadd double %79, %sqrt27
  store double %83, ptr %10, align 8, !tbaa !8
  %84 = extractelement <2 x double> %77, i64 0
  %85 = fadd double %84, %59
  %86 = extractelement <2 x double> %75, i64 0
  %87 = fsub double %27, %86
  %88 = fsub double %63, %31
  %89 = fmul double %88, %88
  %90 = call double @llvm.fmuladd.f64(double %87, double %87, double %89)
  %sqrt26 = call double @llvm.sqrt.f64(double %90)
  %91 = fadd double %85, %sqrt26
  store double %91, ptr %11, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #9
  %92 = fadd double %84, %78
  %93 = fsub double %80, %86
  %94 = fmul double %32, %32
  %95 = call double @llvm.fmuladd.f64(double %93, double %93, double %94)
  %sqrt = call double @llvm.sqrt.f64(double %95)
  %96 = fadd double %92, %sqrt
  store double %96, ptr %12, align 8, !tbaa !8
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %98 = load double, ptr %97, align 8, !tbaa !8
  store double %98, ptr %8, align 8, !tbaa !8
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %100 = load double, ptr %99, align 8, !tbaa !8
  store double %100, ptr %8, align 8, !tbaa !8
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %102 = load double, ptr %101, align 8, !tbaa !8
  store double %102, ptr %8, align 8, !tbaa !8
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %12)
  %104 = load double, ptr %103, align 8, !tbaa !8
  store double %104, ptr %8, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  br label %105

105:                                              ; preds = %39, %0
  %106 = call i32 @_ZSt12setprecisioni(i32 noundef 20)
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 %106)
  %108 = load double, ptr %8, align 8, !tbaa !8
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %107, double noundef %108)
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %109, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #9
  ret i32 0
}

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

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

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

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

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

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

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

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

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

; 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 @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) local_unnamed_addr #4 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 #4 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)) #7

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #8

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fabs.v2f64(<2 x double>) #8

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 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 willreturn memory(argmem: readwrite) }
attributes #4 = { 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 speculatable willreturn memory(none) }
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" }
attributes #7 = { 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 #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"double", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass