; LLVM IR from tangjz/acm-icpc :: codeforces/gym (100825H)

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

%struct.Point = type { double, double }

@_ZL2pi = external hidden global double, align 8
@p = external dso_local global [10 x %struct.Point], align 16
@w = external dso_local global double, align 8
@l = external dso_local global double, align 8
@r = external dso_local global double, align 8
@h = external dso_local global double, align 8
@d = external dso_local global double, align 8
@theta = external dso_local global double, align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3sgnd(double noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_Z21PointOfLineReflection5PointS_S_(double, double, double, double, double, double) #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 nounwind uwtable
declare dso_local { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK5Point4unitEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { double, double } @_ZNK5PointmlERKd(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_Z24DistanceOfPointToSegment5PointS_S_(double, double, double, double, double, double) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK5Point3dotERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %struct.Point, align 8
  %4 = alloca %struct.Point, align 8
  %5 = alloca %struct.Point, align 8
  %6 = alloca %struct.Point, align 8
  %7 = alloca %struct.Point, align 8
  %8 = alloca %struct.Point, align 8
  %9 = alloca double, align 8
  %10 = alloca %struct.Point, align 8
  %11 = alloca %struct.Point, align 8
  %12 = alloca %struct.Point, align 8
  %13 = alloca %struct.Point, align 8
  %14 = alloca double, align 8
  %15 = alloca %struct.Point, align 8
  %16 = alloca %struct.Point, align 8
  %17 = alloca %struct.Point, align 8
  %18 = alloca %struct.Point, align 8
  %19 = alloca double, align 8
  %20 = alloca %struct.Point, align 8
  %21 = alloca %struct.Point, align 8
  %22 = alloca %struct.Point, align 8
  %23 = alloca %struct.Point, align 8
  %24 = alloca %struct.Point, align 8
  %25 = alloca %struct.Point, align 8
  %26 = alloca %struct.Point, align 8
  %27 = alloca %struct.Point, align 8
  %28 = alloca %struct.Point, align 8
  %29 = alloca %struct.Point, align 8
  %30 = alloca %struct.Point, align 8
  %31 = alloca %struct.Point, align 8
  %32 = alloca %struct.Point, align 8
  %33 = alloca %struct.Point, align 8
  store i32 0, ptr %1, align 4
  br label %34

34:                                               ; preds = %254, %252, %190, %0
  %35 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @w, ptr noundef @l, ptr noundef @r)
  %36 = icmp eq i32 %35, 3
  br i1 %36, label %37, label %261

37:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %52, %37
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = icmp sle i32 %39, 3
  br i1 %40, label %42, label %41

41:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %55

42:                                               ; preds = %38
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [10 x %struct.Point], ptr @p, i64 0, i64 %44
  %46 = getelementptr inbounds %struct.Point, ptr %45, i32 0, i32 0
  %47 = load i32, ptr %2, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [10 x %struct.Point], ptr @p, i64 0, i64 %48
  %50 = getelementptr inbounds %struct.Point, ptr %49, i32 0, i32 1
  %51 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %46, ptr noundef %50)
  br label %52

52:                                               ; preds = %42
  %53 = load i32, ptr %2, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %2, align 4, !tbaa !5
  br label %38, !llvm.loop !9

55:                                               ; preds = %41
  %56 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef @h)
  call void @llvm.lifetime.start.p0(i64 16, ptr %3) #8
  %57 = getelementptr inbounds %struct.Point, ptr %3, i32 0, i32 0
  store double 0.000000e+00, ptr %57, align 8, !tbaa !11
  %58 = getelementptr inbounds %struct.Point, ptr %3, i32 0, i32 1
  %59 = load double, ptr @l, align 8, !tbaa !14
  store double %59, ptr %58, align 8, !tbaa !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 4), ptr align 8 %3, i64 16, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #8
  %60 = getelementptr inbounds %struct.Point, ptr %4, i32 0, i32 0
  %61 = load double, ptr @w, align 8, !tbaa !14
  store double %61, ptr %60, align 8, !tbaa !11
  %62 = getelementptr inbounds %struct.Point, ptr %4, i32 0, i32 1
  %63 = load double, ptr @l, align 8, !tbaa !14
  store double %63, ptr %62, align 8, !tbaa !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 5), ptr align 8 %4, i64 16, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #8
  %64 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 2), ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 4))
  %65 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 0
  %66 = extractvalue { double, double } %64, 0
  store double %66, ptr %65, align 8
  %67 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 1
  %68 = extractvalue { double, double } %64, 1
  store double %68, ptr %67, align 8
  %69 = call { double, double } @_ZNK5Point4unitEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
  %70 = getelementptr inbounds { double, double }, ptr %7, i32 0, i32 0
  %71 = extractvalue { double, double } %69, 0
  store double %71, ptr %70, align 8
  %72 = getelementptr inbounds { double, double }, ptr %7, i32 0, i32 1
  %73 = extractvalue { double, double } %69, 1
  store double %73, ptr %72, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %74 = load double, ptr @r, align 8, !tbaa !14
  %75 = fmul double %74, 2.000000e+00
  store double %75, ptr %9, align 8, !tbaa !14
  %76 = call { double, double } @_ZNK5PointmlERKd(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %77 = getelementptr inbounds { double, double }, ptr %6, i32 0, i32 0
  %78 = extractvalue { double, double } %76, 0
  store double %78, ptr %77, align 8
  %79 = getelementptr inbounds { double, double }, ptr %6, i32 0, i32 1
  %80 = extractvalue { double, double } %76, 1
  store double %80, ptr %79, align 8
  %81 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 2), ptr noundef nonnull align 8 dereferenceable(16) %6)
  %82 = getelementptr inbounds { double, double }, ptr %5, i32 0, i32 0
  %83 = extractvalue { double, double } %81, 0
  store double %83, ptr %82, align 8
  %84 = getelementptr inbounds { double, double }, ptr %5, i32 0, i32 1
  %85 = extractvalue { double, double } %81, 1
  store double %85, ptr %84, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 6), ptr align 8 %5, i64 16, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 8, 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
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #8
  %86 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 3), ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 5))
  %87 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 0
  %88 = extractvalue { double, double } %86, 0
  store double %88, ptr %87, align 8
  %89 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 1
  %90 = extractvalue { double, double } %86, 1
  store double %90, ptr %89, align 8
  %91 = call { double, double } @_ZNK5Point4unitEv(ptr noundef nonnull align 8 dereferenceable(16) %13)
  %92 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  %93 = extractvalue { double, double } %91, 0
  store double %93, ptr %92, align 8
  %94 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  %95 = extractvalue { double, double } %91, 1
  store double %95, ptr %94, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %96 = load double, ptr @r, align 8, !tbaa !14
  %97 = fmul double %96, 2.000000e+00
  store double %97, ptr %14, align 8, !tbaa !14
  %98 = call { double, double } @_ZNK5PointmlERKd(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %99 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %100 = extractvalue { double, double } %98, 0
  store double %100, ptr %99, align 8
  %101 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %102 = extractvalue { double, double } %98, 1
  store double %102, ptr %101, align 8
  %103 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 3), ptr noundef nonnull align 8 dereferenceable(16) %11)
  %104 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  %105 = extractvalue { double, double } %103, 0
  store double %105, ptr %104, align 8
  %106 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  %107 = extractvalue { double, double } %103, 1
  store double %107, ptr %106, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 7), ptr align 8 %10, i64 16, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #8
  %108 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 1), ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 7))
  %109 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %110 = extractvalue { double, double } %108, 0
  store double %110, ptr %109, align 8
  %111 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %112 = extractvalue { double, double } %108, 1
  store double %112, ptr %111, align 8
  %113 = call { double, double } @_ZNK5Point4unitEv(ptr noundef nonnull align 8 dereferenceable(16) %18)
  %114 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %115 = extractvalue { double, double } %113, 0
  store double %115, ptr %114, align 8
  %116 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %117 = extractvalue { double, double } %113, 1
  store double %117, ptr %116, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %118 = load double, ptr @r, align 8, !tbaa !14
  %119 = fmul double %118, 2.000000e+00
  store double %119, ptr %19, align 8, !tbaa !14
  %120 = call { double, double } @_ZNK5PointmlERKd(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(8) %19)
  %121 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %122 = extractvalue { double, double } %120, 0
  store double %122, ptr %121, align 8
  %123 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %124 = extractvalue { double, double } %120, 1
  store double %124, ptr %123, align 8
  %125 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 1), ptr noundef nonnull align 8 dereferenceable(16) %16)
  %126 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %127 = extractvalue { double, double } %125, 0
  store double %127, ptr %126, align 8
  %128 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %129 = extractvalue { double, double } %125, 1
  store double %129, ptr %128, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 8), ptr align 8 %15, i64 16, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %21, ptr align 16 getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 6), i64 16, i1 false), !tbaa.struct !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 16 getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 1), i64 16, i1 false), !tbaa.struct !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr align 16 getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 7), i64 16, i1 false), !tbaa.struct !16
  %130 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %131 = load double, ptr %130, align 8
  %132 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %133 = load double, ptr %132, align 8
  %134 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %135 = load double, ptr %134, align 8
  %136 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %137 = load double, ptr %136, align 8
  %138 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %139 = load double, ptr %138, align 8
  %140 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %141 = load double, ptr %140, align 8
  %142 = call { double, double } @_Z21PointOfLineReflection5PointS_S_(double %131, double %133, double %135, double %137, double %139, double %141)
  %143 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %144 = extractvalue { double, double } %142, 0
  store double %144, ptr %143, align 8
  %145 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %146 = extractvalue { double, double } %142, 1
  store double %146, ptr %145, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 9), ptr align 8 %20, i64 16, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #8
  %147 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 8), ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 9))
  %148 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %149 = extractvalue { double, double } %147, 0
  store double %149, ptr %148, align 8
  %150 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %151 = extractvalue { double, double } %147, 1
  store double %151, ptr %150, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #8
  %152 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 7), ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 1))
  %153 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %154 = extractvalue { double, double } %152, 0
  store double %154, ptr %153, align 8
  %155 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %156 = extractvalue { double, double } %152, 1
  store double %156, ptr %155, align 8
  %157 = call noundef double @_ZNK5Point3dotERKS_(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(16) %25)
  %158 = call noundef i32 @_Z3sgnd(double noundef %157)
  %159 = icmp sle i32 %158, 0
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #8
  br i1 %159, label %188, label %160

160:                                              ; preds = %55
  %161 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 6), ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 8))
  %162 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %163 = extractvalue { double, double } %161, 0
  store double %163, ptr %162, align 8
  %164 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %165 = extractvalue { double, double } %161, 1
  store double %165, ptr %164, align 8
  %166 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 4), ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 2))
  %167 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %168 = extractvalue { double, double } %166, 0
  store double %168, ptr %167, align 8
  %169 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %170 = extractvalue { double, double } %166, 1
  store double %170, ptr %169, align 8
  %171 = call noundef double @_ZNK5Point3dotERKS_(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(16) %27)
  %172 = call noundef i32 @_Z3sgnd(double noundef %171)
  %173 = icmp sle i32 %172, 0
  br i1 %173, label %188, label %174

174:                                              ; preds = %160
  %175 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 7), ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 1))
  %176 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %177 = extractvalue { double, double } %175, 0
  store double %177, ptr %176, align 8
  %178 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %179 = extractvalue { double, double } %175, 1
  store double %179, ptr %178, align 8
  %180 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 5), ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 3))
  %181 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 0
  %182 = extractvalue { double, double } %180, 0
  store double %182, ptr %181, align 8
  %183 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 1
  %184 = extractvalue { double, double } %180, 1
  store double %184, ptr %183, align 8
  %185 = call noundef double @_ZNK5Point3dotERKS_(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(16) %29)
  %186 = call noundef i32 @_Z3sgnd(double noundef %185)
  %187 = icmp sle i32 %186, 0
  br label %188

188:                                              ; preds = %174, %160, %55
  %189 = phi i1 [ true, %160 ], [ true, %55 ], [ %187, %174 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #8
  br i1 %189, label %190, label %192

190:                                              ; preds = %188
  %191 = call i32 @puts(ptr noundef @.str.3)
  br label %34, !llvm.loop !17

192:                                              ; preds = %188
  %193 = load double, ptr @h, align 8, !tbaa !14
  %194 = load double, ptr getelementptr inbounds (%struct.Point, ptr getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 9), i32 0, i32 1), align 8, !tbaa !15
  %195 = fsub double %193, %194
  %196 = load double, ptr getelementptr inbounds (%struct.Point, ptr getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 8), i32 0, i32 1), align 8, !tbaa !15
  %197 = load double, ptr getelementptr inbounds (%struct.Point, ptr getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 9), i32 0, i32 1), align 8, !tbaa !15
  %198 = fsub double %196, %197
  %199 = fdiv double %195, %198
  %200 = load double, ptr getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 8), align 16, !tbaa !11
  %201 = load double, ptr getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 9), align 16, !tbaa !11
  %202 = fsub double %200, %201
  %203 = load double, ptr getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 9), align 16, !tbaa !11
  %204 = call double @llvm.fmuladd.f64(double %199, double %202, double %203)
  store double %204, ptr @d, align 8, !tbaa !14
  %205 = load double, ptr getelementptr inbounds (%struct.Point, ptr getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 8), i32 0, i32 1), align 8, !tbaa !15
  %206 = load double, ptr getelementptr inbounds (%struct.Point, ptr getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 9), i32 0, i32 1), align 8, !tbaa !15
  %207 = fsub double %205, %206
  %208 = load double, ptr getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 8), align 16, !tbaa !11
  %209 = load double, ptr getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 9), align 16, !tbaa !11
  %210 = fsub double %208, %209
  %211 = call double @atan2(double noundef %207, double noundef %210) #8
  store double %211, ptr @theta, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #8
  %212 = getelementptr inbounds %struct.Point, ptr %30, i32 0, i32 0
  %213 = load double, ptr @d, align 8, !tbaa !14
  store double %213, ptr %212, align 8, !tbaa !11
  %214 = getelementptr inbounds %struct.Point, ptr %30, i32 0, i32 1
  %215 = load double, ptr @h, align 8, !tbaa !14
  store double %215, ptr %214, align 8, !tbaa !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 @p, ptr align 8 %30, i64 16, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #8
  %216 = load double, ptr @theta, align 8, !tbaa !14
  %217 = call noundef i32 @_Z3sgnd(double noundef %216)
  %218 = icmp sle i32 %217, 0
  br i1 %218, label %252, label %219

219:                                              ; preds = %192
  %220 = load double, ptr @d, align 8, !tbaa !14
  %221 = load double, ptr @r, align 8, !tbaa !14
  %222 = fsub double %220, %221
  %223 = call noundef i32 @_Z3sgnd(double noundef %222)
  %224 = icmp slt i32 %223, 0
  br i1 %224, label %252, label %225

225:                                              ; preds = %219
  %226 = load double, ptr @d, align 8, !tbaa !14
  %227 = load double, ptr @r, align 8, !tbaa !14
  %228 = fadd double %226, %227
  %229 = load double, ptr @w, align 8, !tbaa !14
  %230 = fsub double %228, %229
  %231 = call noundef i32 @_Z3sgnd(double noundef %230)
  %232 = icmp sgt i32 %231, 0
  br i1 %232, label %252, label %233

233:                                              ; preds = %225
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %31, ptr align 16 getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 2), i64 16, i1 false), !tbaa.struct !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %32, ptr align 16 @p, i64 16, i1 false), !tbaa.struct !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %33, ptr align 16 getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 8), i64 16, i1 false), !tbaa.struct !16
  %234 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 0
  %235 = load double, ptr %234, align 8
  %236 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 1
  %237 = load double, ptr %236, align 8
  %238 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %239 = load double, ptr %238, align 8
  %240 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %241 = load double, ptr %240, align 8
  %242 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 0
  %243 = load double, ptr %242, align 8
  %244 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 1
  %245 = load double, ptr %244, align 8
  %246 = call noundef double @_Z24DistanceOfPointToSegment5PointS_S_(double %235, double %237, double %239, double %241, double %243, double %245)
  %247 = load double, ptr @r, align 8, !tbaa !14
  %248 = fneg double %247
  %249 = call double @llvm.fmuladd.f64(double %248, double 2.000000e+00, double %246)
  %250 = call noundef i32 @_Z3sgnd(double noundef %249)
  %251 = icmp slt i32 %250, 0
  br i1 %251, label %252, label %254

252:                                              ; preds = %233, %225, %219, %192
  %253 = call i32 @puts(ptr noundef @.str.3)
  br label %34, !llvm.loop !17

254:                                              ; preds = %233
  %255 = load double, ptr @d, align 8, !tbaa !14
  %256 = load double, ptr @theta, align 8, !tbaa !14
  %257 = load double, ptr @_ZL2pi, align 8, !tbaa !14
  %258 = fdiv double %256, %257
  %259 = fmul double %258, 1.800000e+02
  %260 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, double noundef %255, double noundef %259)
  br label %34, !llvm.loop !17

261:                                              ; preds = %34
  ret i32 0
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

declare i32 @puts(ptr noundef) #4

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

; Function Attrs: nounwind
declare double @atan2(double noundef, double noundef) #7

declare i32 @printf(ptr noundef, ...) #4

attributes #0 = { 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 #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTS5Point", !13, i64 0, !13, i64 8}
!13 = !{!"double", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!12, !13, i64 8}
!16 = !{i64 0, i64 8, !14, i64 8, i64 8, !14}
!17 = distinct !{!17, !10}


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

%struct.Point = type { double, double }

@_ZL2pi = external hidden local_unnamed_addr global double, align 8
@p = external dso_local global [10 x %struct.Point], align 16
@w = external dso_local global double, align 8
@l = external dso_local global double, align 8
@r = external dso_local global double, align 8
@h = external dso_local global double, align 8
@d = external dso_local local_unnamed_addr global double, align 8
@theta = external dso_local local_unnamed_addr global double, align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3sgnd(double noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_Z21PointOfLineReflection5PointS_S_(double, double, double, double, double, double) 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 nounwind uwtable
declare dso_local { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK5Point4unitEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { double, double } @_ZNK5PointmlERKd(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_Z24DistanceOfPointToSegment5PointS_S_(double, double, double, double, double, double) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK5Point3dotERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca %struct.Point, align 8
  %2 = alloca %struct.Point, align 8
  %3 = alloca %struct.Point, align 8
  %4 = alloca double, align 8
  %5 = alloca %struct.Point, align 8
  %6 = alloca %struct.Point, align 8
  %7 = alloca %struct.Point, align 8
  %8 = alloca double, align 8
  %9 = alloca %struct.Point, align 8
  %10 = alloca %struct.Point, align 8
  %11 = alloca %struct.Point, align 8
  %12 = alloca double, align 8
  %13 = alloca %struct.Point, align 8
  %14 = alloca %struct.Point, align 8
  %15 = alloca %struct.Point, align 8
  %16 = alloca %struct.Point, align 8
  %17 = alloca %struct.Point, align 8
  %18 = alloca %struct.Point, align 8
  %19 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @w, ptr noundef nonnull @l, ptr noundef nonnull @r)
  %20 = icmp eq i32 %19, 3
  br i1 %20, label %.preheader.lr.ph, label %._crit_edge

.preheader.lr.ph:                                 ; preds = %0
  %21 = getelementptr inbounds i8, ptr %3, i64 8
  %22 = getelementptr inbounds i8, ptr %2, i64 8
  %23 = getelementptr inbounds i8, ptr %1, i64 8
  %24 = getelementptr inbounds i8, ptr %7, i64 8
  %25 = getelementptr inbounds i8, ptr %6, i64 8
  %26 = getelementptr inbounds i8, ptr %5, i64 8
  %27 = getelementptr inbounds i8, ptr %11, i64 8
  %28 = getelementptr inbounds i8, ptr %10, i64 8
  %29 = getelementptr inbounds i8, ptr %9, i64 8
  %30 = getelementptr inbounds i8, ptr %13, i64 8
  %31 = getelementptr inbounds i8, ptr %14, i64 8
  %32 = getelementptr inbounds i8, ptr %15, i64 8
  %33 = getelementptr inbounds i8, ptr %16, i64 8
  %34 = getelementptr inbounds i8, ptr %17, i64 8
  %35 = getelementptr inbounds i8, ptr %18, i64 8
  br label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %.backedge
  %36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @p, i64 16), ptr noundef nonnull getelementptr inbounds (i8, ptr @p, i64 24))
  %37 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @p, i64 32), ptr noundef nonnull getelementptr inbounds (i8, ptr @p, i64 40))
  %38 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @p, i64 48), ptr noundef nonnull getelementptr inbounds (i8, ptr @p, i64 56))
  %39 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull @h)
  %40 = load double, ptr @l, align 8, !tbaa !5
  store double 0.000000e+00, ptr getelementptr inbounds (i8, ptr @p, i64 64), align 16, !tbaa !5
  store double %40, ptr getelementptr inbounds (i8, ptr @p, i64 72), align 8, !tbaa !5
  %41 = load double, ptr @w, align 8, !tbaa !5
  store double %41, ptr getelementptr inbounds (i8, ptr @p, i64 80), align 16, !tbaa !5
  store double %40, ptr getelementptr inbounds (i8, ptr @p, i64 88), align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  %42 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @p, i64 32), ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @p, i64 64))
  %43 = extractvalue { double, double } %42, 0
  store double %43, ptr %3, align 8
  %44 = extractvalue { double, double } %42, 1
  store double %44, ptr %21, align 8
  %45 = call { double, double } @_ZNK5Point4unitEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %46 = extractvalue { double, double } %45, 0
  store double %46, ptr %2, align 8
  %47 = extractvalue { double, double } %45, 1
  store double %47, ptr %22, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %48 = load double, ptr @r, align 8, !tbaa !5
  %49 = fmul double %48, 2.000000e+00
  store double %49, ptr %4, align 8, !tbaa !5
  %50 = call { double, double } @_ZNK5PointmlERKd(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %51 = extractvalue { double, double } %50, 0
  store double %51, ptr %1, align 8
  %52 = extractvalue { double, double } %50, 1
  store double %52, ptr %23, align 8
  %53 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @p, i64 32), ptr noundef nonnull align 8 dereferenceable(16) %1)
  %54 = extractvalue { double, double } %53, 0
  %55 = extractvalue { double, double } %53, 1
  store double %54, ptr getelementptr inbounds (i8, ptr @p, i64 96), align 16, !tbaa !5
  store double %55, ptr getelementptr inbounds (i8, ptr @p, i64 104), align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  %56 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @p, i64 48), ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @p, i64 80))
  %57 = extractvalue { double, double } %56, 0
  store double %57, ptr %7, align 8
  %58 = extractvalue { double, double } %56, 1
  store double %58, ptr %24, align 8
  %59 = call { double, double } @_ZNK5Point4unitEv(ptr noundef nonnull align 8 dereferenceable(16) %7)
  %60 = extractvalue { double, double } %59, 0
  store double %60, ptr %6, align 8
  %61 = extractvalue { double, double } %59, 1
  store double %61, ptr %25, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %62 = load double, ptr @r, align 8, !tbaa !5
  %63 = fmul double %62, 2.000000e+00
  store double %63, ptr %8, align 8, !tbaa !5
  %64 = call { double, double } @_ZNK5PointmlERKd(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %65 = extractvalue { double, double } %64, 0
  store double %65, ptr %5, align 8
  %66 = extractvalue { double, double } %64, 1
  store double %66, ptr %26, align 8
  %67 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @p, i64 48), ptr noundef nonnull align 8 dereferenceable(16) %5)
  %68 = extractvalue { double, double } %67, 0
  %69 = extractvalue { double, double } %67, 1
  store double %68, ptr getelementptr inbounds (i8, ptr @p, i64 112), align 16, !tbaa !5
  store double %69, ptr getelementptr inbounds (i8, ptr @p, i64 120), align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  %70 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @p, i64 16), ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @p, i64 112))
  %71 = extractvalue { double, double } %70, 0
  store double %71, ptr %11, align 8
  %72 = extractvalue { double, double } %70, 1
  store double %72, ptr %27, align 8
  %73 = call { double, double } @_ZNK5Point4unitEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
  %74 = extractvalue { double, double } %73, 0
  store double %74, ptr %10, align 8
  %75 = extractvalue { double, double } %73, 1
  store double %75, ptr %28, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %76 = load double, ptr @r, align 8, !tbaa !5
  %77 = fmul double %76, 2.000000e+00
  store double %77, ptr %12, align 8, !tbaa !5
  %78 = call { double, double } @_ZNK5PointmlERKd(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(8) %12)
  %79 = extractvalue { double, double } %78, 0
  store double %79, ptr %9, align 8
  %80 = extractvalue { double, double } %78, 1
  store double %80, ptr %29, align 8
  %81 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @p, i64 16), ptr noundef nonnull align 8 dereferenceable(16) %9)
  %82 = extractvalue { double, double } %81, 0
  %83 = extractvalue { double, double } %81, 1
  store double %82, ptr getelementptr inbounds (i8, ptr @p, i64 128), align 16, !tbaa !5
  store double %83, ptr getelementptr inbounds (i8, ptr @p, i64 136), align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  %.sroa.010.0.copyload = load double, ptr getelementptr inbounds (i8, ptr @p, i64 96), align 16, !tbaa !5
  %.sroa.211.0.copyload = load double, ptr getelementptr inbounds (i8, ptr @p, i64 104), align 8, !tbaa !5
  %.sroa.08.0.copyload = load double, ptr getelementptr inbounds (i8, ptr @p, i64 16), align 16, !tbaa !5
  %.sroa.29.0.copyload = load double, ptr getelementptr inbounds (i8, ptr @p, i64 24), align 8, !tbaa !5
  %.sroa.06.0.copyload = load double, ptr getelementptr inbounds (i8, ptr @p, i64 112), align 16, !tbaa !5
  %.sroa.27.0.copyload = load double, ptr getelementptr inbounds (i8, ptr @p, i64 120), align 8, !tbaa !5
  %84 = call { double, double } @_Z21PointOfLineReflection5PointS_S_(double %.sroa.010.0.copyload, double %.sroa.211.0.copyload, double %.sroa.08.0.copyload, double %.sroa.29.0.copyload, double %.sroa.06.0.copyload, double %.sroa.27.0.copyload)
  %85 = extractvalue { double, double } %84, 0
  %86 = extractvalue { double, double } %84, 1
  store double %85, ptr getelementptr inbounds (i8, ptr @p, i64 144), align 16, !tbaa !5
  store double %86, ptr getelementptr inbounds (i8, ptr @p, i64 152), align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  %87 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @p, i64 128), ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @p, i64 144))
  %88 = extractvalue { double, double } %87, 0
  store double %88, ptr %13, align 8
  %89 = extractvalue { double, double } %87, 1
  store double %89, ptr %30, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #7
  %90 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @p, i64 112), ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @p, i64 16))
  %91 = extractvalue { double, double } %90, 0
  store double %91, ptr %14, align 8
  %92 = extractvalue { double, double } %90, 1
  store double %92, ptr %31, align 8
  %93 = call noundef double @_ZNK5Point3dotERKS_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %14)
  %94 = call noundef i32 @_Z3sgnd(double noundef %93)
  %95 = icmp slt i32 %94, 1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #7
  br i1 %95, label %.critedge, label %96

96:                                               ; preds = %.preheader
  %97 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @p, i64 96), ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @p, i64 128))
  %98 = extractvalue { double, double } %97, 0
  store double %98, ptr %15, align 8
  %99 = extractvalue { double, double } %97, 1
  store double %99, ptr %32, align 8
  %100 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @p, i64 64), ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @p, i64 32))
  %101 = extractvalue { double, double } %100, 0
  store double %101, ptr %16, align 8
  %102 = extractvalue { double, double } %100, 1
  store double %102, ptr %33, align 8
  %103 = call noundef double @_ZNK5Point3dotERKS_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %16)
  %104 = call noundef i32 @_Z3sgnd(double noundef %103)
  %105 = icmp slt i32 %104, 1
  br i1 %105, label %.critedge, label %106

106:                                              ; preds = %96
  %107 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @p, i64 112), ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @p, i64 16))
  %108 = extractvalue { double, double } %107, 0
  store double %108, ptr %17, align 8
  %109 = extractvalue { double, double } %107, 1
  store double %109, ptr %34, align 8
  %110 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @p, i64 80), ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @p, i64 48))
  %111 = extractvalue { double, double } %110, 0
  store double %111, ptr %18, align 8
  %112 = extractvalue { double, double } %110, 1
  store double %112, ptr %35, align 8
  %113 = call noundef double @_ZNK5Point3dotERKS_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %18)
  %114 = call noundef i32 @_Z3sgnd(double noundef %113)
  %115 = icmp slt i32 %114, 1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  br i1 %115, label %116, label %120

.critedge:                                        ; preds = %.preheader, %96
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  br label %116

116:                                              ; preds = %.critedge, %106
  %117 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %.backedge

.backedge:                                        ; preds = %116, %157, %159
  %118 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @w, ptr noundef nonnull @l, ptr noundef nonnull @r)
  %119 = icmp eq i32 %118, 3
  br i1 %119, label %.preheader, label %._crit_edge, !llvm.loop !9

120:                                              ; preds = %106
  %121 = load double, ptr @h, align 8, !tbaa !5
  %122 = load double, ptr getelementptr inbounds (i8, ptr @p, i64 152), align 8, !tbaa !11
  %123 = fsub double %121, %122
  %124 = load double, ptr getelementptr inbounds (i8, ptr @p, i64 136), align 8, !tbaa !11
  %125 = fsub double %124, %122
  %126 = fdiv double %123, %125
  %127 = load double, ptr getelementptr inbounds (i8, ptr @p, i64 128), align 16, !tbaa !13
  %128 = load double, ptr getelementptr inbounds (i8, ptr @p, i64 144), align 16, !tbaa !13
  %129 = fsub double %127, %128
  %130 = call double @llvm.fmuladd.f64(double %126, double %129, double %128)
  store double %130, ptr @d, align 8, !tbaa !5
  %131 = call double @atan2(double noundef %125, double noundef %129) #7
  store double %131, ptr @theta, align 8, !tbaa !5
  %132 = load double, ptr @d, align 8, !tbaa !5
  %133 = load double, ptr @h, align 8, !tbaa !5
  store double %132, ptr @p, align 16, !tbaa !5
  store double %133, ptr getelementptr inbounds (i8, ptr @p, i64 8), align 8, !tbaa !5
  %134 = call noundef i32 @_Z3sgnd(double noundef %131)
  %135 = icmp slt i32 %134, 1
  br i1 %135, label %157, label %136

136:                                              ; preds = %120
  %137 = load double, ptr @d, align 8, !tbaa !5
  %138 = load double, ptr @r, align 8, !tbaa !5
  %139 = fsub double %137, %138
  %140 = call noundef i32 @_Z3sgnd(double noundef %139)
  %141 = icmp slt i32 %140, 0
  br i1 %141, label %157, label %142

142:                                              ; preds = %136
  %143 = load double, ptr @d, align 8, !tbaa !5
  %144 = load double, ptr @r, align 8, !tbaa !5
  %145 = fadd double %143, %144
  %146 = load double, ptr @w, align 8, !tbaa !5
  %147 = fsub double %145, %146
  %148 = call noundef i32 @_Z3sgnd(double noundef %147)
  %149 = icmp sgt i32 %148, 0
  br i1 %149, label %157, label %150

150:                                              ; preds = %142
  %.sroa.03.0.copyload = load double, ptr getelementptr inbounds (i8, ptr @p, i64 32), align 16, !tbaa !5
  %.sroa.24.0.copyload = load double, ptr getelementptr inbounds (i8, ptr @p, i64 40), align 8, !tbaa !5
  %.sroa.01.0.copyload = load double, ptr @p, align 16, !tbaa !5
  %.sroa.22.0.copyload = load double, ptr getelementptr inbounds (i8, ptr @p, i64 8), align 8, !tbaa !5
  %.sroa.0.0.copyload = load double, ptr getelementptr inbounds (i8, ptr @p, i64 128), align 16, !tbaa !5
  %.sroa.2.0.copyload = load double, ptr getelementptr inbounds (i8, ptr @p, i64 136), align 8, !tbaa !5
  %151 = call noundef double @_Z24DistanceOfPointToSegment5PointS_S_(double %.sroa.03.0.copyload, double %.sroa.24.0.copyload, double %.sroa.01.0.copyload, double %.sroa.22.0.copyload, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload)
  %152 = load double, ptr @r, align 8, !tbaa !5
  %153 = fneg double %152
  %154 = call double @llvm.fmuladd.f64(double %153, double 2.000000e+00, double %151)
  %155 = call noundef i32 @_Z3sgnd(double noundef %154)
  %156 = icmp slt i32 %155, 0
  br i1 %156, label %157, label %159

157:                                              ; preds = %150, %142, %136, %120
  %158 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %.backedge

159:                                              ; preds = %150
  %160 = load double, ptr @d, align 8, !tbaa !5
  %161 = load double, ptr @theta, align 8, !tbaa !5
  %162 = load double, ptr @_ZL2pi, align 8, !tbaa !5
  %163 = fdiv double %161, %162
  %164 = fmul double %163, 1.800000e+02
  %165 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, double noundef %160, double noundef %164)
  br label %.backedge

._crit_edge:                                      ; preds = %.backedge, %0
  ret i32 0
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTS5Point", !6, i64 0, !6, i64 8}
!13 = !{!12, !6, i64 0}


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