; LLVM IR from tangjz/acm-icpc :: codeforces/gym/100506H.ll (Z5cover5PointS_)

; 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 }
%"struct.std::pair" = type { %struct.Point, %struct.Point }
%"struct.std::less" = type { i8 }

@p = external dso_local global [101 x %struct.Point], align 16
@n = external dso_local global i32, align 4
@r = external dso_local global double, align 8
@cnt = external dso_local global i32, align 4
@seg = external dso_local global [101 x %"struct.std::pair"], align 16

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(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 nounwind uwtable
declare dso_local noundef double @_ZNK5Point4modeEv(ptr noundef nonnull align 8 dereferenceable(16)) #0 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 uwtable
define dso_local noundef zeroext i1 @_Z5cover5PointS_(double %0, double %1, double %2, double %3) #3 {
  %5 = alloca i1, align 1
  %6 = alloca %struct.Point, align 8
  %7 = alloca %struct.Point, align 8
  %8 = alloca %struct.Point, align 8
  %9 = alloca %struct.Point, align 8
  %10 = alloca %struct.Point, align 8
  %11 = alloca double, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %struct.Point, align 8
  %15 = alloca %struct.Point, align 8
  %16 = alloca double, align 8
  %17 = alloca %struct.Point, align 8
  %18 = alloca %struct.Point, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca %struct.Point, align 8
  %22 = alloca %struct.Point, align 8
  %23 = alloca double, align 8
  %24 = alloca %struct.Point, align 8
  %25 = alloca %struct.Point, align 8
  %26 = alloca double, align 8
  %27 = alloca %"struct.std::pair", align 8
  %28 = alloca %"struct.std::less", align 1
  %29 = alloca %struct.Point, align 8
  %30 = alloca i32, align 4
  %31 = getelementptr inbounds { double, double }, ptr %6, i32 0, i32 0
  store double %0, ptr %31, align 8
  %32 = getelementptr inbounds { double, double }, ptr %6, i32 0, i32 1
  store double %1, ptr %32, align 8
  %33 = getelementptr inbounds { double, double }, ptr %7, i32 0, i32 0
  store double %2, ptr %33, align 8
  %34 = getelementptr inbounds { double, double }, ptr %7, i32 0, i32 1
  store double %3, ptr %34, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #8
  %35 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %6)
  %36 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  %37 = extractvalue { double, double } %35, 0
  store double %37, ptr %36, align 8
  %38 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  %39 = extractvalue { double, double } %35, 1
  store double %39, ptr %38, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  store double 1.000000e-03, ptr %11, align 8, !tbaa !5
  %40 = call { double, double } @_ZNK5PointmlERKd(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %41 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  %42 = extractvalue { double, double } %40, 0
  store double %42, ptr %41, align 8
  %43 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  %44 = extractvalue { double, double } %40, 1
  store double %44, ptr %43, align 8
  %45 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %9)
  %46 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 0
  %47 = extractvalue { double, double } %45, 0
  store double %47, ptr %46, align 8
  %48 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 1
  %49 = extractvalue { double, double } %45, 1
  store double %49, ptr %48, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %6, ptr align 8 %8, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #8
  %50 = call noundef zeroext i1 @_ZNK5PointltERKS_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %6)
  br i1 %50, label %51, label %52

51:                                               ; preds = %4
  call void @_ZSt4swapI5PointENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %7) #8
  br label %52

52:                                               ; preds = %51, %4
  store i32 0, ptr @cnt, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !10
  br label %53

53:                                               ; preds = %147, %52
  %54 = load i32, ptr %12, align 4, !tbaa !10
  %55 = load i32, ptr @n, align 4, !tbaa !10
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %53
  store i32 2, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %150

58:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #8
  %59 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %6)
  %60 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %61 = extractvalue { double, double } %59, 0
  store double %61, ptr %60, align 8
  %62 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %63 = extractvalue { double, double } %59, 1
  store double %63, ptr %62, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #8
  %64 = load i32, ptr %12, align 4, !tbaa !10
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [101 x %struct.Point], ptr @p, i64 0, i64 %65
  %67 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %66, ptr noundef nonnull align 8 dereferenceable(16) %6)
  %68 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %69 = extractvalue { double, double } %67, 0
  store double %69, ptr %68, align 8
  %70 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %71 = extractvalue { double, double } %67, 1
  store double %71, ptr %70, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %72 = call noundef double @_ZNK5Point3detERKS_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(16) %15)
  %73 = call double @llvm.fabs.f64(double %72)
  %74 = call noundef double @_ZNK5Point4modeEv(ptr noundef nonnull align 8 dereferenceable(16) %14)
  %75 = fdiv double %73, %74
  store double %75, ptr %16, align 8, !tbaa !5
  %76 = load double, ptr %16, align 8, !tbaa !5
  %77 = load double, ptr @r, align 8, !tbaa !5
  %78 = fsub double %76, %77
  %79 = call noundef i32 @_Z4dcmpd(double noundef %78)
  %80 = icmp sgt i32 %79, 0
  br i1 %80, label %81, label %82

81:                                               ; preds = %58
  store i32 4, ptr %13, align 4
  br label %144

82:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %83 = call noundef double @_ZNK5Point3dotERKS_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(16) %15)
  %84 = call noundef double @_ZNK5Point3dotERKS_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(16) %14)
  %85 = fdiv double %83, %84
  store double %85, ptr %19, align 8, !tbaa !5
  %86 = call { double, double } @_ZNK5PointmlERKd(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(8) %19)
  %87 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %88 = extractvalue { double, double } %86, 0
  store double %88, ptr %87, align 8
  %89 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %90 = extractvalue { double, double } %86, 1
  store double %90, ptr %89, align 8
  %91 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %18)
  %92 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %93 = extractvalue { double, double } %91, 0
  store double %93, ptr %92, align 8
  %94 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %95 = extractvalue { double, double } %91, 1
  store double %95, ptr %94, align 8
  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.start.p0(i64 8, ptr %20) #8
  %96 = load double, ptr @r, align 8, !tbaa !5
  %97 = load double, ptr @r, align 8, !tbaa !5
  %98 = load double, ptr %16, align 8, !tbaa !5
  %99 = load double, ptr %16, align 8, !tbaa !5
  %100 = fmul double %98, %99
  %101 = fneg double %100
  %102 = call double @llvm.fmuladd.f64(double %96, double %97, double %101)
  %103 = call double @sqrt(double noundef %102) #8
  store double %103, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %104 = load double, ptr %20, align 8, !tbaa !5
  %105 = call noundef double @_ZNK5Point4modeEv(ptr noundef nonnull align 8 dereferenceable(16) %14)
  %106 = fdiv double %104, %105
  store double %106, ptr %23, align 8, !tbaa !5
  %107 = call { double, double } @_ZNK5PointmlERKd(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(8) %23)
  %108 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %109 = extractvalue { double, double } %107, 0
  store double %109, ptr %108, align 8
  %110 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %111 = extractvalue { double, double } %107, 1
  store double %111, ptr %110, align 8
  %112 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %22)
  %113 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %114 = extractvalue { double, double } %112, 0
  store double %114, ptr %113, align 8
  %115 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %116 = extractvalue { double, double } %112, 1
  store double %116, ptr %115, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  %117 = load double, ptr %20, align 8, !tbaa !5
  %118 = call noundef double @_ZNK5Point4modeEv(ptr noundef nonnull align 8 dereferenceable(16) %14)
  %119 = fdiv double %117, %118
  store double %119, ptr %26, align 8, !tbaa !5
  %120 = call { double, double } @_ZNK5PointmlERKd(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(8) %26)
  %121 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %122 = extractvalue { double, double } %120, 0
  store double %122, ptr %121, align 8
  %123 = getelementptr inbounds { double, double }, ptr %25, 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) %17, ptr noundef nonnull align 8 dereferenceable(16) %25)
  %126 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %127 = extractvalue { double, double } %125, 0
  store double %127, ptr %126, align 8
  %128 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %129 = extractvalue { double, double } %125, 1
  store double %129, ptr %128, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #8
  %130 = call noundef zeroext i1 @_ZNK5PointltERKS_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %6)
  br i1 %130, label %131, label %132

131:                                              ; preds = %82
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %21, ptr align 8 %6, i64 16, i1 false), !tbaa.struct !9
  br label %132

132:                                              ; preds = %131, %82
  %133 = call noundef zeroext i1 @_ZNK5PointltERKS_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %24)
  br i1 %133, label %134, label %135

134:                                              ; preds = %132
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 %7, i64 16, i1 false), !tbaa.struct !9
  br label %135

135:                                              ; preds = %134, %132
  %136 = call noundef zeroext i1 @_ZNK5PointltERKS_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %24)
  br i1 %136, label %137, label %143

137:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #8
  call void @_ZSt9make_pairIR5PointS1_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8 %27, ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %24)
  %138 = load i32, ptr @cnt, align 4, !tbaa !10
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr @cnt, align 4, !tbaa !10
  %140 = sext i32 %138 to i64
  %141 = getelementptr inbounds [101 x %"struct.std::pair"], ptr @seg, i64 0, i64 %140
  %142 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt4pairI5PointS0_EaSEOS1_(ptr noundef nonnull align 8 dereferenceable(32) %141, ptr noundef nonnull align 8 dereferenceable(32) %27) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #8
  br label %143

143:                                              ; preds = %137, %135
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #8
  store i32 0, ptr %13, align 4
  br label %144

144:                                              ; preds = %143, %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #8
  %145 = load i32, ptr %13, align 4
  switch i32 %145, label %193 [
    i32 0, label %146
    i32 4, label %147
  ]

146:                                              ; preds = %144
  br label %147

147:                                              ; preds = %146, %144
  %148 = load i32, ptr %12, align 4, !tbaa !10
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %12, align 4, !tbaa !10
  br label %53, !llvm.loop !12

150:                                              ; preds = %57
  %151 = load i32, ptr @cnt, align 4, !tbaa !10
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds %"struct.std::pair", ptr @seg, i64 %152
  call void @_ZSt4sortIPSt4pairI5PointS1_ESt4lessIS2_EEvT_S6_T0_(ptr noundef @seg, ptr noundef %153)
  %154 = call noundef zeroext i1 @_ZNK5PointltERKS_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) @seg)
  br i1 %154, label %155, label %156

155:                                              ; preds = %150
  store i1 false, ptr %5, align 1
  br label %191

156:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %29, ptr align 16 getelementptr inbounds (%"struct.std::pair", ptr @seg, i32 0, i32 1), i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  store i32 1, ptr %30, align 4, !tbaa !10
  br label %157

157:                                              ; preds = %181, %156
  %158 = load i32, ptr %30, align 4, !tbaa !10
  %159 = load i32, ptr @cnt, align 4, !tbaa !10
  %160 = icmp slt i32 %158, %159
  br i1 %160, label %162, label %161

161:                                              ; preds = %157
  store i32 5, ptr %13, align 4
  br label %184

162:                                              ; preds = %157
  %163 = load i32, ptr %30, align 4, !tbaa !10
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [101 x %"struct.std::pair"], ptr @seg, i64 0, i64 %164
  %166 = getelementptr inbounds %"struct.std::pair", ptr %165, i32 0, i32 0
  %167 = call noundef zeroext i1 @_ZNK5PointltERKS_(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(16) %166)
  br i1 %167, label %168, label %169

168:                                              ; preds = %162
  store i1 false, ptr %5, align 1
  store i32 1, ptr %13, align 4
  br label %184

169:                                              ; preds = %162
  %170 = load i32, ptr %30, align 4, !tbaa !10
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [101 x %"struct.std::pair"], ptr @seg, i64 0, i64 %171
  %173 = getelementptr inbounds %"struct.std::pair", ptr %172, i32 0, i32 1
  %174 = call noundef zeroext i1 @_ZNK5PointltERKS_(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(16) %173)
  br i1 %174, label %175, label %180

175:                                              ; preds = %169
  %176 = load i32, ptr %30, align 4, !tbaa !10
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [101 x %"struct.std::pair"], ptr @seg, i64 0, i64 %177
  %179 = getelementptr inbounds %"struct.std::pair", ptr %178, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %29, ptr align 16 %179, i64 16, i1 false), !tbaa.struct !9
  br label %180

180:                                              ; preds = %175, %169
  br label %181

181:                                              ; preds = %180
  %182 = load i32, ptr %30, align 4, !tbaa !10
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %30, align 4, !tbaa !10
  br label %157, !llvm.loop !14

184:                                              ; preds = %168, %161
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  %185 = load i32, ptr %13, align 4
  switch i32 %185, label %190 [
    i32 5, label %186
  ]

186:                                              ; preds = %184
  %187 = call noundef zeroext i1 @_ZNK5PointltERKS_(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(16) %7)
  br i1 %187, label %188, label %189

188:                                              ; preds = %186
  store i1 false, ptr %5, align 1
  store i32 1, ptr %13, align 4
  br label %190

189:                                              ; preds = %186
  store i1 true, ptr %5, align 1
  store i32 1, ptr %13, align 4
  br label %190

190:                                              ; preds = %189, %188, %184
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #8
  br label %191

191:                                              ; preds = %190, %155
  %192 = load i1, ptr %5, align 1
  ret i1 %192

193:                                              ; preds = %144
  unreachable
}

; 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: 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) #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapI5PointENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #5

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIR5PointS1_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPSt4pairI5PointS1_ESt4lessIS2_EEvT_S6_T0_(ptr noundef, ptr noundef) #7

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

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

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


; 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 }
%"struct.std::pair" = type { %struct.Point, %struct.Point }

@p = external dso_local global [101 x %struct.Point], align 16
@n = external dso_local local_unnamed_addr global i32, align 4
@r = external dso_local local_unnamed_addr global double, align 8
@cnt = external dso_local local_unnamed_addr global i32, align 4
@seg = external dso_local global [101 x %"struct.std::pair"], align 16

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #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 nounwind uwtable
declare dso_local noundef double @_ZNK5Point4modeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 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 uwtable
define dso_local noundef zeroext i1 @_Z5cover5PointS_(double %0, double %1, double %2, double %3) local_unnamed_addr #3 {
  %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 double, align 8
  %18 = alloca %struct.Point, align 8
  %19 = alloca %struct.Point, align 8
  %20 = alloca double, align 8
  %21 = alloca %"struct.std::pair", align 8
  %22 = alloca %struct.Point, align 8
  store double %0, ptr %5, align 8
  %23 = getelementptr inbounds i8, ptr %5, i64 8
  store double %1, ptr %23, align 8
  store double %2, ptr %6, align 8
  %24 = getelementptr inbounds i8, ptr %6, i64 8
  store double %3, ptr %24, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #8
  %25 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %5)
  %26 = extractvalue { double, double } %25, 0
  store double %26, ptr %8, align 8
  %27 = getelementptr inbounds i8, ptr %8, i64 8
  %28 = extractvalue { double, double } %25, 1
  store double %28, ptr %27, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  store double 1.000000e-03, ptr %9, align 8, !tbaa !5
  %29 = call { double, double } @_ZNK5PointmlERKd(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %30 = extractvalue { double, double } %29, 0
  store double %30, ptr %7, align 8
  %31 = getelementptr inbounds i8, ptr %7, i64 8
  %32 = extractvalue { double, double } %29, 1
  store double %32, ptr %31, align 8
  %33 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %7)
  %34 = extractvalue { double, double } %33, 0
  %35 = extractvalue { double, double } %33, 1
  store double %34, ptr %5, align 8, !tbaa !5
  store double %35, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #8
  %36 = call noundef zeroext i1 @_ZNK5PointltERKS_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %5)
  br i1 %36, label %37, label %38

37:                                               ; preds = %4
  call void @_ZSt4swapI5PointENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %6) #8
  br label %38

38:                                               ; preds = %37, %4
  store i32 0, ptr @cnt, align 4, !tbaa !9
  %39 = load i32, ptr @n, align 4, !tbaa !9
  %40 = icmp sgt i32 %39, 0
  br i1 %40, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %38
  %41 = getelementptr inbounds i8, ptr %10, i64 8
  %42 = getelementptr inbounds i8, ptr %11, i64 8
  %43 = getelementptr inbounds i8, ptr %13, i64 8
  %44 = getelementptr inbounds i8, ptr %12, i64 8
  %45 = getelementptr inbounds i8, ptr %16, i64 8
  %46 = getelementptr inbounds i8, ptr %15, i64 8
  %47 = getelementptr inbounds i8, ptr %19, i64 8
  %48 = getelementptr inbounds i8, ptr %18, i64 8
  br label %53

._crit_edge.loopexit:                             ; preds = %114
  %.pre = load i32, ptr @cnt, align 4, !tbaa !9
  %49 = sext i32 %.pre to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %38
  %50 = phi i64 [ %49, %._crit_edge.loopexit ], [ 0, %38 ]
  %51 = getelementptr inbounds %"struct.std::pair", ptr @seg, i64 %50
  call void @_ZSt4sortIPSt4pairI5PointS1_ESt4lessIS2_EEvT_S6_T0_(ptr noundef nonnull @seg, ptr noundef nonnull %51)
  %52 = call noundef zeroext i1 @_ZNK5PointltERKS_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) @seg)
  br i1 %52, label %130, label %118

53:                                               ; preds = %.lr.ph, %114
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %114 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #8
  %54 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %5)
  %55 = extractvalue { double, double } %54, 0
  store double %55, ptr %10, align 8
  %56 = extractvalue { double, double } %54, 1
  store double %56, ptr %41, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #8
  %57 = getelementptr inbounds [101 x %struct.Point], ptr @p, i64 0, i64 %indvars.iv
  %58 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %57, ptr noundef nonnull align 8 dereferenceable(16) %5)
  %59 = extractvalue { double, double } %58, 0
  store double %59, ptr %11, align 8
  %60 = extractvalue { double, double } %58, 1
  store double %60, ptr %42, align 8
  %61 = call noundef double @_ZNK5Point3detERKS_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %11)
  %62 = call double @llvm.fabs.f64(double %61)
  %63 = call noundef double @_ZNK5Point4modeEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
  %64 = fdiv double %62, %63
  %65 = load double, ptr @r, align 8, !tbaa !5
  %66 = fsub double %64, %65
  %67 = call noundef i32 @_Z4dcmpd(double noundef %66)
  %68 = icmp sgt i32 %67, 0
  br i1 %68, label %114, label %69

69:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  %70 = call noundef double @_ZNK5Point3dotERKS_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %11)
  %71 = call noundef double @_ZNK5Point3dotERKS_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %10)
  %72 = fdiv double %70, %71
  store double %72, ptr %14, align 8, !tbaa !5
  %73 = call { double, double } @_ZNK5PointmlERKd(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %74 = extractvalue { double, double } %73, 0
  store double %74, ptr %13, align 8
  %75 = extractvalue { double, double } %73, 1
  store double %75, ptr %43, align 8
  %76 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %13)
  %77 = extractvalue { double, double } %76, 0
  store double %77, ptr %12, align 8
  %78 = extractvalue { double, double } %76, 1
  store double %78, ptr %44, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #8
  %79 = load double, ptr @r, align 8, !tbaa !5
  %80 = fneg double %64
  %81 = fmul double %64, %80
  %82 = call double @llvm.fmuladd.f64(double %79, double %79, double %81)
  %83 = call double @sqrt(double noundef %82) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #8
  %84 = call noundef double @_ZNK5Point4modeEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
  %85 = fdiv double %83, %84
  store double %85, ptr %17, align 8, !tbaa !5
  %86 = call { double, double } @_ZNK5PointmlERKd(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %87 = extractvalue { double, double } %86, 0
  store double %87, ptr %16, align 8
  %88 = extractvalue { double, double } %86, 1
  store double %88, ptr %45, align 8
  %89 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %16)
  %90 = extractvalue { double, double } %89, 0
  store double %90, ptr %15, align 8
  %91 = extractvalue { double, double } %89, 1
  store double %91, ptr %46, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #8
  %92 = call noundef double @_ZNK5Point4modeEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
  %93 = fdiv double %83, %92
  store double %93, ptr %20, align 8, !tbaa !5
  %94 = call { double, double } @_ZNK5PointmlERKd(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %95 = extractvalue { double, double } %94, 0
  store double %95, ptr %19, align 8
  %96 = extractvalue { double, double } %94, 1
  store double %96, ptr %47, align 8
  %97 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %19)
  %98 = extractvalue { double, double } %97, 0
  store double %98, ptr %18, align 8
  %99 = extractvalue { double, double } %97, 1
  store double %99, ptr %48, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #8
  %100 = call noundef zeroext i1 @_ZNK5PointltERKS_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %5)
  br i1 %100, label %101, label %102

101:                                              ; preds = %69
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %5, i64 16, i1 false), !tbaa.struct !11
  br label %102

102:                                              ; preds = %101, %69
  %103 = call noundef zeroext i1 @_ZNK5PointltERKS_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %18)
  br i1 %103, label %104, label %105

104:                                              ; preds = %102
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %6, i64 16, i1 false), !tbaa.struct !11
  br label %105

105:                                              ; preds = %104, %102
  %106 = call noundef zeroext i1 @_ZNK5PointltERKS_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %18)
  br i1 %106, label %107, label %113

107:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %21) #8
  call void @_ZSt9make_pairIR5PointS1_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair") align 8 %21, ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %18)
  %108 = load i32, ptr @cnt, align 4, !tbaa !9
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr @cnt, align 4, !tbaa !9
  %110 = sext i32 %108 to i64
  %111 = getelementptr inbounds [101 x %"struct.std::pair"], ptr @seg, i64 0, i64 %110
  %112 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt4pairI5PointS0_EaSEOS1_(ptr noundef nonnull align 8 dereferenceable(32) %111, ptr noundef nonnull align 8 dereferenceable(32) %21) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %21) #8
  br label %113

113:                                              ; preds = %107, %105
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #8
  br label %114

114:                                              ; preds = %53, %113
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %115 = load i32, ptr @n, align 4, !tbaa !9
  %116 = sext i32 %115 to i64
  %117 = icmp slt i64 %indvars.iv.next, %116
  br i1 %117, label %53, label %._crit_edge.loopexit, !llvm.loop !12

118:                                              ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %22) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 16 dereferenceable(16) getelementptr inbounds (i8, ptr @seg, i64 16), i64 16, i1 false), !tbaa.struct !11
  %119 = load i32, ptr @cnt, align 4, !tbaa !9
  %.not18 = icmp sgt i32 %119, 1
  br i1 %.not18, label %.lr.ph21, label %.critedge

.lr.ph21:                                         ; preds = %118, %126
  %indvars.iv23 = phi i64 [ %indvars.iv.next24, %126 ], [ 1, %118 ]
  %120 = getelementptr inbounds [101 x %"struct.std::pair"], ptr @seg, i64 0, i64 %indvars.iv23
  %121 = call noundef zeroext i1 @_ZNK5PointltERKS_(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %120)
  br i1 %121, label %.loopexit, label %122

122:                                              ; preds = %.lr.ph21
  %123 = getelementptr inbounds i8, ptr %120, i64 16
  %124 = call noundef zeroext i1 @_ZNK5PointltERKS_(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %123)
  br i1 %124, label %125, label %126

125:                                              ; preds = %122
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 16 dereferenceable(16) %123, i64 16, i1 false), !tbaa.struct !11
  br label %126

126:                                              ; preds = %122, %125
  %indvars.iv.next24 = add nuw nsw i64 %indvars.iv23, 1
  %127 = load i32, ptr @cnt, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %.not = icmp slt i64 %indvars.iv.next24, %128
  br i1 %.not, label %.lr.ph21, label %.critedge, !llvm.loop !14

.critedge:                                        ; preds = %126, %118
  %129 = call noundef zeroext i1 @_ZNK5PointltERKS_(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %6)
  %not. = xor i1 %129, true
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph21, %.critedge
  %.1 = phi i1 [ %not., %.critedge ], [ false, %.lr.ph21 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #8
  br label %130

130:                                              ; preds = %._crit_edge, %.loopexit
  %.2 = phi i1 [ %.1, %.loopexit ], [ false, %._crit_edge ]
  ret i1 %.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 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) #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapI5PointENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK5Point3detERKS_(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 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 nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #6

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIR5PointS1_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPSt4pairI5PointS1_ESt4lessIS2_EEvT_S6_T0_(ptr noundef, ptr noundef) local_unnamed_addr #7

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


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