; LLVM IR from tangjz/acm-icpc :: self_training/2016-07-11 (H)

; 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 [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 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
  %34 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @w, ptr noundef @l, ptr noundef @r)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %49, %0
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = icmp sle i32 %36, 3
  br i1 %37, label %39, label %38

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

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

49:                                               ; preds = %39
  %50 = load i32, ptr %2, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %2, align 4, !tbaa !5
  br label %35, !llvm.loop !9

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

156:                                              ; preds = %52
  %157 = 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))
  %158 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %159 = extractvalue { double, double } %157, 0
  store double %159, ptr %158, align 8
  %160 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %161 = extractvalue { double, double } %157, 1
  store double %161, ptr %160, align 8
  %162 = 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))
  %163 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %164 = extractvalue { double, double } %162, 0
  store double %164, ptr %163, align 8
  %165 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %166 = extractvalue { double, double } %162, 1
  store double %166, ptr %165, align 8
  %167 = call noundef double @_ZNK5Point3dotERKS_(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(16) %27)
  %168 = call noundef i32 @_Z3sgnd(double noundef %167)
  %169 = icmp sle i32 %168, 0
  br i1 %169, label %184, label %170

170:                                              ; preds = %156
  %171 = 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))
  %172 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %173 = extractvalue { double, double } %171, 0
  store double %173, ptr %172, align 8
  %174 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %175 = extractvalue { double, double } %171, 1
  store double %175, ptr %174, align 8
  %176 = 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))
  %177 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 0
  %178 = extractvalue { double, double } %176, 0
  store double %178, ptr %177, align 8
  %179 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 1
  %180 = extractvalue { double, double } %176, 1
  store double %180, ptr %179, align 8
  %181 = call noundef double @_ZNK5Point3dotERKS_(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(16) %29)
  %182 = call noundef i32 @_Z3sgnd(double noundef %181)
  %183 = icmp sle i32 %182, 0
  br label %184

184:                                              ; preds = %170, %156, %52
  %185 = phi i1 [ true, %156 ], [ true, %52 ], [ %183, %170 ]
  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 %185, label %186, label %188

186:                                              ; preds = %184
  %187 = call i32 @puts(ptr noundef @.str.2)
  store i32 0, ptr %1, align 4
  br label %258

188:                                              ; preds = %184
  %189 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef @h)
  %190 = load double, ptr @h, align 8, !tbaa !14
  %191 = 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
  %192 = fsub double %190, %191
  %193 = 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
  %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 = fdiv double %192, %195
  %197 = load double, ptr getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 8), align 16, !tbaa !11
  %198 = load double, ptr getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 9), align 16, !tbaa !11
  %199 = fsub double %197, %198
  %200 = load double, ptr getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 9), align 16, !tbaa !11
  %201 = call double @llvm.fmuladd.f64(double %196, double %199, double %200)
  store double %201, ptr @d, align 8, !tbaa !14
  %202 = 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
  %203 = 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
  %204 = fsub double %202, %203
  %205 = load double, ptr getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 8), align 16, !tbaa !11
  %206 = load double, ptr getelementptr inbounds ([10 x %struct.Point], ptr @p, i64 0, i64 9), align 16, !tbaa !11
  %207 = fsub double %205, %206
  %208 = call double @atan2(double noundef %204, double noundef %207) #8
  store double %208, ptr @theta, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #8
  %209 = getelementptr inbounds %struct.Point, ptr %30, i32 0, i32 0
  %210 = load double, ptr @d, align 8, !tbaa !14
  store double %210, ptr %209, align 8, !tbaa !11
  %211 = getelementptr inbounds %struct.Point, ptr %30, i32 0, i32 1
  %212 = load double, ptr @h, align 8, !tbaa !14
  store double %212, ptr %211, 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
  %213 = load double, ptr @theta, align 8, !tbaa !14
  %214 = call noundef i32 @_Z3sgnd(double noundef %213)
  %215 = icmp sle i32 %214, 0
  br i1 %215, label %249, label %216

216:                                              ; preds = %188
  %217 = load double, ptr @d, align 8, !tbaa !14
  %218 = load double, ptr @r, align 8, !tbaa !14
  %219 = fsub double %217, %218
  %220 = call noundef i32 @_Z3sgnd(double noundef %219)
  %221 = icmp slt i32 %220, 0
  br i1 %221, label %249, label %222

222:                                              ; preds = %216
  %223 = load double, ptr @d, align 8, !tbaa !14
  %224 = load double, ptr @r, align 8, !tbaa !14
  %225 = fadd double %223, %224
  %226 = load double, ptr @w, align 8, !tbaa !14
  %227 = fsub double %225, %226
  %228 = call noundef i32 @_Z3sgnd(double noundef %227)
  %229 = icmp sgt i32 %228, 0
  br i1 %229, label %249, label %230

230:                                              ; preds = %222
  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
  %231 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 0
  %232 = load double, ptr %231, align 8
  %233 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 1
  %234 = load double, ptr %233, align 8
  %235 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %236 = load double, ptr %235, align 8
  %237 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %238 = load double, ptr %237, align 8
  %239 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 0
  %240 = load double, ptr %239, align 8
  %241 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 1
  %242 = load double, ptr %241, align 8
  %243 = call noundef double @_Z24DistanceOfPointToSegment5PointS_S_(double %232, double %234, double %236, double %238, double %240, double %242)
  %244 = load double, ptr @r, align 8, !tbaa !14
  %245 = fneg double %244
  %246 = call double @llvm.fmuladd.f64(double %245, double 2.000000e+00, double %243)
  %247 = call noundef i32 @_Z3sgnd(double noundef %246)
  %248 = icmp slt i32 %247, 0
  br i1 %248, label %249, label %251

249:                                              ; preds = %230, %222, %216, %188
  %250 = call i32 @puts(ptr noundef @.str.2)
  store i32 0, ptr %1, align 4
  br label %258

251:                                              ; preds = %230
  %252 = load double, ptr @d, align 8, !tbaa !14
  %253 = load double, ptr @theta, align 8, !tbaa !14
  %254 = load double, ptr @_ZL2pi, align 8, !tbaa !14
  %255 = fdiv double %253, %254
  %256 = fmul double %255, 1.800000e+02
  %257 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, double noundef %252, double noundef %256)
  store i32 0, ptr %1, align 4
  br label %258

258:                                              ; preds = %251, %249, %186
  %259 = load i32, ptr %1, align 4
  ret i32 %259
}

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}


; 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 [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 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 = tail 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))
  %21 = tail 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))
  %22 = tail 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))
  %23 = 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 %23, ptr getelementptr inbounds (i8, ptr @p, i64 72), align 8, !tbaa !5
  %24 = load double, ptr @w, align 8, !tbaa !5
  store double %24, ptr getelementptr inbounds (i8, ptr @p, i64 80), align 16, !tbaa !5
  store double %23, 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
  %25 = tail 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))
  %26 = extractvalue { double, double } %25, 0
  store double %26, ptr %3, align 8
  %27 = getelementptr inbounds i8, ptr %3, i64 8
  %28 = extractvalue { double, double } %25, 1
  store double %28, ptr %27, align 8
  %29 = call { double, double } @_ZNK5Point4unitEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %30 = extractvalue { double, double } %29, 0
  store double %30, ptr %2, align 8
  %31 = getelementptr inbounds i8, ptr %2, i64 8
  %32 = extractvalue { double, double } %29, 1
  store double %32, ptr %31, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %33 = load double, ptr @r, align 8, !tbaa !5
  %34 = fmul double %33, 2.000000e+00
  store double %34, ptr %4, align 8, !tbaa !5
  %35 = call { double, double } @_ZNK5PointmlERKd(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %36 = extractvalue { double, double } %35, 0
  store double %36, ptr %1, align 8
  %37 = getelementptr inbounds i8, ptr %1, i64 8
  %38 = extractvalue { double, double } %35, 1
  store double %38, ptr %37, align 8
  %39 = 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)
  %40 = extractvalue { double, double } %39, 0
  %41 = extractvalue { double, double } %39, 1
  store double %40, ptr getelementptr inbounds (i8, ptr @p, i64 96), align 16, !tbaa !5
  store double %41, 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
  %42 = 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))
  %43 = extractvalue { double, double } %42, 0
  store double %43, ptr %7, align 8
  %44 = getelementptr inbounds i8, ptr %7, i64 8
  %45 = extractvalue { double, double } %42, 1
  store double %45, ptr %44, align 8
  %46 = call { double, double } @_ZNK5Point4unitEv(ptr noundef nonnull align 8 dereferenceable(16) %7)
  %47 = extractvalue { double, double } %46, 0
  store double %47, ptr %6, align 8
  %48 = getelementptr inbounds i8, ptr %6, i64 8
  %49 = extractvalue { double, double } %46, 1
  store double %49, ptr %48, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %50 = load double, ptr @r, align 8, !tbaa !5
  %51 = fmul double %50, 2.000000e+00
  store double %51, ptr %8, align 8, !tbaa !5
  %52 = call { double, double } @_ZNK5PointmlERKd(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %53 = extractvalue { double, double } %52, 0
  store double %53, ptr %5, align 8
  %54 = getelementptr inbounds i8, ptr %5, i64 8
  %55 = extractvalue { double, double } %52, 1
  store double %55, ptr %54, align 8
  %56 = 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)
  %57 = extractvalue { double, double } %56, 0
  %58 = extractvalue { double, double } %56, 1
  store double %57, ptr getelementptr inbounds (i8, ptr @p, i64 112), align 16, !tbaa !5
  store double %58, 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
  %59 = 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))
  %60 = extractvalue { double, double } %59, 0
  store double %60, ptr %11, align 8
  %61 = getelementptr inbounds i8, ptr %11, i64 8
  %62 = extractvalue { double, double } %59, 1
  store double %62, ptr %61, align 8
  %63 = call { double, double } @_ZNK5Point4unitEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
  %64 = extractvalue { double, double } %63, 0
  store double %64, ptr %10, align 8
  %65 = getelementptr inbounds i8, ptr %10, i64 8
  %66 = extractvalue { double, double } %63, 1
  store double %66, ptr %65, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %67 = load double, ptr @r, align 8, !tbaa !5
  %68 = fmul double %67, 2.000000e+00
  store double %68, ptr %12, align 8, !tbaa !5
  %69 = call { double, double } @_ZNK5PointmlERKd(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(8) %12)
  %70 = extractvalue { double, double } %69, 0
  store double %70, ptr %9, align 8
  %71 = getelementptr inbounds i8, ptr %9, i64 8
  %72 = extractvalue { double, double } %69, 1
  store double %72, ptr %71, align 8
  %73 = 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)
  %74 = extractvalue { double, double } %73, 0
  %75 = extractvalue { double, double } %73, 1
  store double %74, ptr getelementptr inbounds (i8, ptr @p, i64 128), align 16, !tbaa !5
  store double %75, 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
  %76 = 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)
  %77 = extractvalue { double, double } %76, 0
  %78 = extractvalue { double, double } %76, 1
  store double %77, ptr getelementptr inbounds (i8, ptr @p, i64 144), align 16, !tbaa !5
  store double %78, ptr getelementptr inbounds (i8, ptr @p, i64 152), align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  %79 = 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))
  %80 = extractvalue { double, double } %79, 0
  store double %80, ptr %13, align 8
  %81 = getelementptr inbounds i8, ptr %13, i64 8
  %82 = extractvalue { double, double } %79, 1
  store double %82, ptr %81, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #7
  %83 = 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))
  %84 = extractvalue { double, double } %83, 0
  store double %84, ptr %14, align 8
  %85 = getelementptr inbounds i8, ptr %14, i64 8
  %86 = extractvalue { double, double } %83, 1
  store double %86, ptr %85, align 8
  %87 = call noundef double @_ZNK5Point3dotERKS_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %14)
  %88 = call noundef i32 @_Z3sgnd(double noundef %87)
  %89 = icmp slt i32 %88, 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 %89, label %.critedge, label %90

90:                                               ; preds = %0
  %91 = 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))
  %92 = extractvalue { double, double } %91, 0
  store double %92, ptr %15, align 8
  %93 = getelementptr inbounds i8, ptr %15, i64 8
  %94 = extractvalue { double, double } %91, 1
  store double %94, ptr %93, align 8
  %95 = 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))
  %96 = extractvalue { double, double } %95, 0
  store double %96, ptr %16, align 8
  %97 = getelementptr inbounds i8, ptr %16, i64 8
  %98 = extractvalue { double, double } %95, 1
  store double %98, ptr %97, align 8
  %99 = call noundef double @_ZNK5Point3dotERKS_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %16)
  %100 = call noundef i32 @_Z3sgnd(double noundef %99)
  %101 = icmp slt i32 %100, 1
  br i1 %101, label %.critedge, label %102

102:                                              ; preds = %90
  %103 = 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))
  %104 = extractvalue { double, double } %103, 0
  store double %104, ptr %17, align 8
  %105 = getelementptr inbounds i8, ptr %17, i64 8
  %106 = extractvalue { double, double } %103, 1
  store double %106, ptr %105, align 8
  %107 = 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))
  %108 = extractvalue { double, double } %107, 0
  store double %108, ptr %18, align 8
  %109 = getelementptr inbounds i8, ptr %18, i64 8
  %110 = extractvalue { double, double } %107, 1
  store double %110, ptr %109, align 8
  %111 = call noundef double @_ZNK5Point3dotERKS_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %18)
  %112 = call noundef i32 @_Z3sgnd(double noundef %111)
  %113 = icmp slt i32 %112, 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 %113, label %114, label %116

.critedge:                                        ; preds = %0, %90
  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 %114

114:                                              ; preds = %.critedge, %102
  %115 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %163

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

133:                                              ; preds = %116
  %134 = load double, ptr @d, align 8, !tbaa !5
  %135 = load double, ptr @r, align 8, !tbaa !5
  %136 = fsub double %134, %135
  %137 = call noundef i32 @_Z3sgnd(double noundef %136)
  %138 = icmp slt i32 %137, 0
  br i1 %138, label %154, label %139

139:                                              ; preds = %133
  %140 = load double, ptr @d, align 8, !tbaa !5
  %141 = load double, ptr @r, align 8, !tbaa !5
  %142 = fadd double %140, %141
  %143 = load double, ptr @w, align 8, !tbaa !5
  %144 = fsub double %142, %143
  %145 = call noundef i32 @_Z3sgnd(double noundef %144)
  %146 = icmp sgt i32 %145, 0
  br i1 %146, label %154, label %147

147:                                              ; preds = %139
  %.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
  %148 = 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)
  %149 = load double, ptr @r, align 8, !tbaa !5
  %150 = fneg double %149
  %151 = call double @llvm.fmuladd.f64(double %150, double 2.000000e+00, double %148)
  %152 = call noundef i32 @_Z3sgnd(double noundef %151)
  %153 = icmp slt i32 %152, 0
  br i1 %153, label %154, label %156

154:                                              ; preds = %147, %139, %133, %116
  %155 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %163

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

163:                                              ; preds = %156, %154, %114
  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 = !{!10, !6, i64 8}
!10 = !{!"_ZTS5Point", !6, i64 0, !6, i64 8}
!11 = !{!10, !6, i64 0}


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