; LLVM IR from tangjz/acm-icpc :: hdu/6419.ll (Z15getIntersection6SectorS_P5Point)

; 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.Sector = type { %struct.Point, %struct.Point, %struct.Point }
%struct.Point = type { double, double }

@rad = external dso_local global i32, align 4

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6Sector8containsERK5Point(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: nounwind
declare x86_fp80 @sqrtl(x86_fp80 noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z15getIntersection6SectorS_P5Point(ptr noundef byval(%struct.Sector) align 8 %0, ptr noundef byval(%struct.Sector) align 8 %1, ptr noundef %2) #5 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %struct.Point, align 8
  %7 = alloca double, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %struct.Point, align 8
  %11 = alloca %struct.Point, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca %struct.Point, align 8
  %15 = alloca %struct.Point, align 8
  %16 = alloca double, align 8
  %17 = alloca i32, align 4
  %18 = alloca %struct.Point, align 8
  %19 = alloca %struct.Point, align 8
  store ptr %2, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #6
  %20 = getelementptr inbounds %struct.Sector, ptr %1, i32 0, i32 0
  %21 = getelementptr inbounds %struct.Sector, ptr %0, i32 0, i32 0
  %22 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(16) %21)
  %23 = getelementptr inbounds { double, double }, ptr %6, i32 0, i32 0
  %24 = extractvalue { double, double } %22, 0
  store double %24, ptr %23, align 8
  %25 = getelementptr inbounds { double, double }, ptr %6, i32 0, i32 1
  %26 = extractvalue { double, double } %22, 1
  store double %26, ptr %25, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %27 = call noundef double @_ZNK5Point3dotERKS_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %6)
  store double %27, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %28 = load double, ptr %7, align 8, !tbaa !9
  %29 = load i32, ptr @rad, align 4, !tbaa !11
  %30 = sext i32 %29 to i64
  %31 = mul nsw i64 4, %30
  %32 = load i32, ptr @rad, align 4, !tbaa !11
  %33 = sext i32 %32 to i64
  %34 = mul nsw i64 %31, %33
  %35 = sitofp i64 %34 to double
  %36 = fsub double %28, %35
  %37 = call noundef i32 @_Z3sgnd(double noundef %36)
  store i32 %37, ptr %8, align 4, !tbaa !11
  %38 = load i32, ptr %8, align 4, !tbaa !11
  %39 = icmp sgt i32 %38, 0
  br i1 %39, label %40, label %41

40:                                               ; preds = %3
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %140

41:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #6
  %42 = getelementptr inbounds %struct.Sector, ptr %0, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store double 5.000000e-01, ptr %12, align 8, !tbaa !9
  %43 = call { double, double } @_ZNK5PointmlERKd(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(8) %12)
  %44 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %45 = extractvalue { double, double } %43, 0
  store double %45, ptr %44, align 8
  %46 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %47 = extractvalue { double, double } %43, 1
  store double %47, ptr %46, align 8
  %48 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %42, ptr noundef nonnull align 8 dereferenceable(16) %11)
  %49 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  %50 = extractvalue { double, double } %48, 0
  store double %50, ptr %49, align 8
  %51 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  %52 = extractvalue { double, double } %48, 1
  store double %52, ptr %51, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  %53 = load i32, ptr %8, align 4, !tbaa !11
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %55, label %68

55:                                               ; preds = %41
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.Point, ptr %56, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %57, ptr align 8 %10, i64 16, i1 false), !tbaa.struct !13
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.Point, ptr %58, i64 0
  %60 = call noundef zeroext i1 @_ZNK6Sector8containsERK5Point(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(16) %59)
  br i1 %60, label %61, label %65

61:                                               ; preds = %55
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.Point, ptr %62, i64 0
  %64 = call noundef zeroext i1 @_ZNK6Sector8containsERK5Point(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(16) %63)
  br label %65

65:                                               ; preds = %61, %55
  %66 = phi i1 [ false, %55 ], [ %64, %61 ]
  %67 = zext i1 %66 to i32
  store i32 %67, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %139

68:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %69 = load i32, ptr @rad, align 4, !tbaa !11
  %70 = sext i32 %69 to i64
  %71 = load i32, ptr @rad, align 4, !tbaa !11
  %72 = sext i32 %71 to i64
  %73 = mul nsw i64 %70, %72
  %74 = sitofp i64 %73 to double
  %75 = load double, ptr %7, align 8, !tbaa !9
  %76 = fdiv double %75, 4.000000e+00
  %77 = fsub double %74, %76
  %78 = fpext double %77 to x86_fp80
  %79 = call x86_fp80 @sqrtl(x86_fp80 noundef %78) #6
  %80 = fptrunc x86_fp80 %79 to double
  store double %80, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #6
  %81 = call { double, double } @_ZNK5Point9shiftLeftEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  %82 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %83 = extractvalue { double, double } %81, 0
  store double %83, ptr %82, align 8
  %84 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %85 = extractvalue { double, double } %81, 1
  store double %85, ptr %84, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %86 = load double, ptr %13, align 8, !tbaa !9
  %87 = call noundef double @_ZNK5Point3lenEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  %88 = fdiv double %86, %87
  store double %88, ptr %16, align 8, !tbaa !9
  %89 = call { double, double } @_ZNK5PointmlERKd(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(8) %16)
  %90 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %91 = extractvalue { double, double } %89, 0
  store double %91, ptr %90, align 8
  %92 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %93 = extractvalue { double, double } %89, 1
  store double %93, ptr %92, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %6, ptr align 8 %14, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #6
  %94 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %6)
  %95 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %96 = extractvalue { double, double } %94, 0
  store double %96, ptr %95, align 8
  %97 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %98 = extractvalue { double, double } %94, 1
  store double %98, ptr %97, align 8
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = load i32, ptr %17, align 4, !tbaa !11
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds %struct.Point, ptr %99, i64 %101
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %102, ptr align 8 %18, i64 16, i1 false), !tbaa.struct !13
  %103 = call noundef zeroext i1 @_ZNK6Sector8containsERK5Point(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(16) %102)
  br i1 %103, label %104, label %110

104:                                              ; preds = %68
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = load i32, ptr %17, align 4, !tbaa !11
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds %struct.Point, ptr %105, i64 %107
  %109 = call noundef zeroext i1 @_ZNK6Sector8containsERK5Point(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(16) %108)
  br label %110

110:                                              ; preds = %104, %68
  %111 = phi i1 [ false, %68 ], [ %109, %104 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  br i1 %111, label %112, label %115

112:                                              ; preds = %110
  %113 = load i32, ptr %17, align 4, !tbaa !11
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %17, align 4, !tbaa !11
  br label %115

115:                                              ; preds = %112, %110
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #6
  %116 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %6)
  %117 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %118 = extractvalue { double, double } %116, 0
  store double %118, ptr %117, align 8
  %119 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %120 = extractvalue { double, double } %116, 1
  store double %120, ptr %119, align 8
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = load i32, ptr %17, align 4, !tbaa !11
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds %struct.Point, ptr %121, i64 %123
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %124, ptr align 8 %19, i64 16, i1 false), !tbaa.struct !13
  %125 = call noundef zeroext i1 @_ZNK6Sector8containsERK5Point(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(16) %124)
  br i1 %125, label %126, label %132

126:                                              ; preds = %115
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  %128 = load i32, ptr %17, align 4, !tbaa !11
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds %struct.Point, ptr %127, i64 %129
  %131 = call noundef zeroext i1 @_ZNK6Sector8containsERK5Point(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(16) %130)
  br label %132

132:                                              ; preds = %126, %115
  %133 = phi i1 [ false, %115 ], [ %131, %126 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  br i1 %133, label %134, label %137

134:                                              ; preds = %132
  %135 = load i32, ptr %17, align 4, !tbaa !11
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %17, align 4, !tbaa !11
  br label %137

137:                                              ; preds = %134, %132
  %138 = load i32, ptr %17, align 4, !tbaa !11
  store i32 %138, ptr %4, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %139

139:                                              ; preds = %137, %65
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  br label %140

140:                                              ; preds = %139, %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #6
  %141 = load i32, ptr %4, align 4
  ret i32 %141
}

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

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

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

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


; 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.Sector = type { %struct.Point, %struct.Point, %struct.Point }
%struct.Point = type { double, double }

@rad = external dso_local local_unnamed_addr global i32, align 4

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

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

; Function Attrs: mustprogress 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) #2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6Sector8containsERK5Point(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare x86_fp80 @sqrtl(x86_fp80 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef range(i32 0, 3) i32 @_Z15getIntersection6SectorS_P5Point(ptr noundef nonnull byval(%struct.Sector) align 8 %0, ptr noundef nonnull byval(%struct.Sector) align 8 %1, ptr noundef %2) local_unnamed_addr #1 {
  %4 = alloca %struct.Point, align 8
  %5 = alloca %struct.Point, align 8
  %6 = alloca %struct.Point, align 8
  %7 = alloca double, align 8
  %8 = alloca %struct.Point, align 8
  %9 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  %10 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %0)
  %11 = extractvalue { double, double } %10, 0
  store double %11, ptr %4, align 8
  %12 = getelementptr inbounds i8, ptr %4, i64 8
  %13 = extractvalue { double, double } %10, 1
  store double %13, ptr %12, align 8
  %14 = call noundef double @_ZNK5Point3dotERKS_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %4)
  %15 = load i32, ptr @rad, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = shl nsw i64 %16, 2
  %18 = mul nsw i64 %17, %16
  %19 = sitofp i64 %18 to double
  %20 = fsub double %14, %19
  %21 = call noundef i32 @_Z3sgnd(double noundef %20)
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %72, label %23

23:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  store double 5.000000e-01, ptr %7, align 8, !tbaa !9
  %24 = call { double, double } @_ZNK5PointmlERKd(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %25 = extractvalue { double, double } %24, 0
  store double %25, ptr %6, align 8
  %26 = getelementptr inbounds i8, ptr %6, i64 8
  %27 = extractvalue { double, double } %24, 1
  store double %27, ptr %26, align 8
  %28 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %6)
  %29 = extractvalue { double, double } %28, 0
  store double %29, ptr %5, align 8
  %30 = getelementptr inbounds i8, ptr %5, i64 8
  %31 = extractvalue { double, double } %28, 1
  store double %31, ptr %30, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  %32 = icmp eq i32 %21, 0
  br i1 %32, label %33, label %38

33:                                               ; preds = %23
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %5, i64 16, i1 false), !tbaa.struct !11
  %34 = call noundef zeroext i1 @_ZNK6Sector8containsERK5Point(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(16) %2)
  br i1 %34, label %35, label %.critedge2

35:                                               ; preds = %33
  %36 = call noundef zeroext i1 @_ZNK6Sector8containsERK5Point(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(16) %2)
  %37 = zext i1 %36 to i32
  br label %.critedge2

38:                                               ; preds = %23
  %39 = load i32, ptr @rad, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = mul nsw i64 %40, %40
  %42 = uitofp nneg i64 %41 to double
  %43 = fmul double %14, 2.500000e-01
  %44 = fsub double %42, %43
  %45 = fpext double %44 to x86_fp80
  %46 = call x86_fp80 @sqrtl(x86_fp80 noundef %45) #5
  %47 = fptrunc x86_fp80 %46 to double
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  %48 = call { double, double } @_ZNK5Point9shiftLeftEv(ptr noundef nonnull align 8 dereferenceable(16) %4)
  %49 = extractvalue { double, double } %48, 0
  store double %49, ptr %8, align 8
  %50 = getelementptr inbounds i8, ptr %8, i64 8
  %51 = extractvalue { double, double } %48, 1
  store double %51, ptr %50, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %52 = call noundef double @_ZNK5Point3lenEv(ptr noundef nonnull align 8 dereferenceable(16) %4)
  %53 = fdiv double %47, %52
  store double %53, ptr %9, align 8, !tbaa !9
  %54 = call { double, double } @_ZNK5PointmlERKd(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %55 = extractvalue { double, double } %54, 0
  %56 = extractvalue { double, double } %54, 1
  store double %55, ptr %4, align 8, !tbaa !9
  store double %56, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  %57 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %4)
  %58 = extractvalue { double, double } %57, 0
  %59 = extractvalue { double, double } %57, 1
  store double %58, ptr %2, align 8, !tbaa !9
  %.sroa.54.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 8
  store double %59, ptr %.sroa.54.0..sroa_idx, align 8, !tbaa !9
  %60 = call noundef zeroext i1 @_ZNK6Sector8containsERK5Point(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(16) %2)
  br i1 %60, label %61, label %.critedge

61:                                               ; preds = %38
  %62 = call noundef zeroext i1 @_ZNK6Sector8containsERK5Point(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(16) %2)
  %spec.select = zext i1 %62 to i32
  br label %.critedge

.critedge:                                        ; preds = %61, %38
  %.024 = phi i32 [ %spec.select, %61 ], [ 0, %38 ]
  %63 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %4)
  %64 = extractvalue { double, double } %63, 0
  %65 = extractvalue { double, double } %63, 1
  %66 = zext nneg i32 %.024 to i64
  %67 = getelementptr inbounds %struct.Point, ptr %2, i64 %66
  store double %64, ptr %67, align 8, !tbaa !9
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %67, i64 8
  store double %65, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !9
  %68 = call noundef zeroext i1 @_ZNK6Sector8containsERK5Point(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(16) %67)
  br i1 %68, label %69, label %.critedge2

69:                                               ; preds = %.critedge
  %70 = call noundef zeroext i1 @_ZNK6Sector8containsERK5Point(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(16) %67)
  %71 = zext i1 %70 to i32
  %spec.select27 = add nuw nsw i32 %.024, %71
  br label %.critedge2

.critedge2:                                       ; preds = %69, %.critedge, %33, %35
  %.0 = phi i32 [ 0, %33 ], [ %37, %35 ], [ %spec.select27, %69 ], [ %.024, %.critedge ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  br label %72

72:                                               ; preds = %3, %.critedge2
  %.1 = phi i32 [ %.0, %.critedge2 ], [ 0, %3 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  ret i32 %.1
}

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass