; LLVM IR from tangjz/acm-icpc :: hdu/4785.ll (Z5mergeRiP5PointiS1_)

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

@_ZZ5mergeRiP5PointiS1_E1q = external hidden global [41 x %struct.Point], align 16
@.str = external hidden unnamed_addr constant [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [62 x i8], align 1
@__PRETTY_FUNCTION__._Z5mergeRiP5PointiS1_ = external hidden unnamed_addr constant [41 x i8], align 1

; 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 uwtable
define dso_local void @_Z5mergeRiP5PointiS1_(ptr noundef nonnull align 4 dereferenceable(4) %0, ptr noundef %1, i32 noundef %2, ptr noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %struct.Point, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %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 i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 1, ptr %12, align 4, !tbaa !9
  br label %31

31:                                               ; preds = %50, %4
  %32 = load i32, ptr %12, align 4, !tbaa !9
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = load i32, ptr %33, align 4, !tbaa !9
  %35 = icmp slt i32 %32, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %53

37:                                               ; preds = %31
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = load i32, ptr %12, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds %struct.Point, ptr %38, i64 %40
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = load i32, ptr %9, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds %struct.Point, ptr %42, i64 %44
  %46 = call noundef zeroext i1 @_ZNK5PointltERKS_(ptr noundef nonnull align 8 dereferenceable(16) %41, ptr noundef nonnull align 8 dereferenceable(16) %45)
  br i1 %46, label %47, label %49

47:                                               ; preds = %37
  %48 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %48, ptr %9, align 4, !tbaa !9
  br label %49

49:                                               ; preds = %47, %37
  br label %50

50:                                               ; preds = %49
  %51 = load i32, ptr %12, align 4, !tbaa !9
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %12, align 4, !tbaa !9
  br label %31, !llvm.loop !11

53:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 1, ptr %13, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %72, %53
  %55 = load i32, ptr %13, align 4, !tbaa !9
  %56 = load i32, ptr %7, align 4, !tbaa !9
  %57 = icmp slt i32 %55, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %75

59:                                               ; preds = %54
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = load i32, ptr %13, align 4, !tbaa !9
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds %struct.Point, ptr %60, i64 %62
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = load i32, ptr %10, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds %struct.Point, ptr %64, i64 %66
  %68 = call noundef zeroext i1 @_ZNK5PointltERKS_(ptr noundef nonnull align 8 dereferenceable(16) %63, ptr noundef nonnull align 8 dereferenceable(16) %67)
  br i1 %68, label %69, label %71

69:                                               ; preds = %59
  %70 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %70, ptr %10, align 4, !tbaa !9
  br label %71

71:                                               ; preds = %69, %59
  br label %72

72:                                               ; preds = %71
  %73 = load i32, ptr %13, align 4, !tbaa !9
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %13, align 4, !tbaa !9
  br label %54, !llvm.loop !13

75:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #5
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = load i32, ptr %9, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds %struct.Point, ptr %76, i64 %78
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = load i32, ptr %10, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds %struct.Point, ptr %80, i64 %82
  %84 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %79, ptr noundef nonnull align 8 dereferenceable(16) %83)
  %85 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %86 = extractvalue { double, double } %84, 0
  store double %86, ptr %85, align 8
  %87 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %88 = extractvalue { double, double } %84, 1
  store double %88, ptr %87, align 8
  %89 = load i32, ptr %11, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [41 x %struct.Point], ptr @_ZZ5mergeRiP5PointiS1_E1q, i64 0, i64 %90
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %91, ptr align 8 %14, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %92 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %92, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %93 = load i32, ptr %17, align 4, !tbaa !9
  %94 = add nsw i32 %93, 1
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = load i32, ptr %95, align 4, !tbaa !9
  %97 = icmp slt i32 %94, %96
  br i1 %97, label %98, label %101

98:                                               ; preds = %75
  %99 = load i32, ptr %17, align 4, !tbaa !9
  %100 = add nsw i32 %99, 1
  br label %102

101:                                              ; preds = %75
  br label %102

102:                                              ; preds = %101, %98
  %103 = phi i32 [ %100, %98 ], [ 0, %101 ]
  store i32 %103, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %104 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %104, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %105 = load i32, ptr %19, align 4, !tbaa !9
  %106 = add nsw i32 %105, 1
  %107 = load i32, ptr %7, align 4, !tbaa !9
  %108 = icmp slt i32 %106, %107
  br i1 %108, label %109, label %112

109:                                              ; preds = %102
  %110 = load i32, ptr %19, align 4, !tbaa !9
  %111 = add nsw i32 %110, 1
  br label %113

112:                                              ; preds = %102
  br label %113

113:                                              ; preds = %112, %109
  %114 = phi i32 [ %111, %109 ], [ 0, %112 ]
  store i32 %114, ptr %20, align 4, !tbaa !9
  br label %115

115:                                              ; preds = %221, %113
  %116 = load i32, ptr %15, align 4, !tbaa !9
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = load i32, ptr %117, align 4, !tbaa !9
  %119 = icmp slt i32 %116, %118
  br i1 %119, label %120, label %124

120:                                              ; preds = %115
  %121 = load i32, ptr %16, align 4, !tbaa !9
  %122 = load i32, ptr %7, align 4, !tbaa !9
  %123 = icmp slt i32 %121, %122
  br label %124

124:                                              ; preds = %120, %115
  %125 = phi i1 [ false, %115 ], [ %123, %120 ]
  br i1 %125, label %126, label %222

126:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #5
  %127 = load ptr, ptr %6, align 8, !tbaa !5
  %128 = load i32, ptr %18, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds %struct.Point, ptr %127, i64 %129
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  %132 = load i32, ptr %17, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds %struct.Point, ptr %131, i64 %133
  %135 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %130, ptr noundef nonnull align 8 dereferenceable(16) %134)
  %136 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %137 = extractvalue { double, double } %135, 0
  store double %137, ptr %136, align 8
  %138 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %139 = extractvalue { double, double } %135, 1
  store double %139, ptr %138, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #5
  %140 = load ptr, ptr %8, align 8, !tbaa !5
  %141 = load i32, ptr %20, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds %struct.Point, ptr %140, i64 %142
  %144 = load ptr, ptr %8, align 8, !tbaa !5
  %145 = load i32, ptr %19, align 4, !tbaa !9
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds %struct.Point, ptr %144, i64 %146
  %148 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %143, ptr noundef nonnull align 8 dereferenceable(16) %147)
  %149 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %150 = extractvalue { double, double } %148, 0
  store double %150, ptr %149, align 8
  %151 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %152 = extractvalue { double, double } %148, 1
  store double %152, ptr %151, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #5
  %153 = call noundef zeroext i1 @_ZNK5Point3cmpERKS_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %22)
  br i1 %153, label %154, label %155

154:                                              ; preds = %126
  br label %156

155:                                              ; preds = %126
  br label %156

156:                                              ; preds = %155, %154
  %157 = phi ptr [ %21, %154 ], [ %22, %155 ]
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr align 8 %157, i64 16, i1 false), !tbaa.struct !14
  %158 = load i32, ptr %11, align 4, !tbaa !9
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %11, align 4, !tbaa !9
  %160 = load i32, ptr %11, align 4, !tbaa !9
  %161 = sub nsw i32 %160, 1
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [41 x %struct.Point], ptr @_ZZ5mergeRiP5PointiS1_E1q, i64 0, i64 %162
  %164 = load i32, ptr %11, align 4, !tbaa !9
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [41 x %struct.Point], ptr @_ZZ5mergeRiP5PointiS1_E1q, i64 0, i64 %165
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %166, ptr align 16 %163, i64 16, i1 false), !tbaa.struct !14
  %167 = call noundef zeroext i1 @_ZNK5Point3cmpERKS_(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(16) %21)
  br i1 %167, label %194, label %168

168:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #5
  %169 = load i32, ptr %11, align 4, !tbaa !9
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [41 x %struct.Point], ptr @_ZZ5mergeRiP5PointiS1_E1q, i64 0, i64 %170
  %172 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %171, ptr noundef nonnull align 8 dereferenceable(16) %21)
  %173 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %174 = extractvalue { double, double } %172, 0
  store double %174, ptr %173, align 8
  %175 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %176 = extractvalue { double, double } %172, 1
  store double %176, ptr %175, align 8
  %177 = load i32, ptr %11, align 4, !tbaa !9
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [41 x %struct.Point], ptr @_ZZ5mergeRiP5PointiS1_E1q, i64 0, i64 %178
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %179, ptr align 8 %24, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #5
  %180 = load i32, ptr %15, align 4, !tbaa !9
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %15, align 4, !tbaa !9
  %182 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %182, ptr %17, align 4, !tbaa !9
  %183 = load i32, ptr %17, align 4, !tbaa !9
  %184 = add nsw i32 %183, 1
  %185 = load ptr, ptr %5, align 8, !tbaa !5
  %186 = load i32, ptr %185, align 4, !tbaa !9
  %187 = icmp slt i32 %184, %186
  br i1 %187, label %188, label %191

188:                                              ; preds = %168
  %189 = load i32, ptr %17, align 4, !tbaa !9
  %190 = add nsw i32 %189, 1
  br label %192

191:                                              ; preds = %168
  br label %192

192:                                              ; preds = %191, %188
  %193 = phi i32 [ %190, %188 ], [ 0, %191 ]
  store i32 %193, ptr %18, align 4, !tbaa !9
  br label %194

194:                                              ; preds = %192, %156
  %195 = call noundef zeroext i1 @_ZNK5Point3cmpERKS_(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(16) %22)
  br i1 %195, label %221, label %196

196:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #5
  %197 = load i32, ptr %11, align 4, !tbaa !9
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [41 x %struct.Point], ptr @_ZZ5mergeRiP5PointiS1_E1q, i64 0, i64 %198
  %200 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %199, ptr noundef nonnull align 8 dereferenceable(16) %22)
  %201 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %202 = extractvalue { double, double } %200, 0
  store double %202, ptr %201, align 8
  %203 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %204 = extractvalue { double, double } %200, 1
  store double %204, ptr %203, align 8
  %205 = load i32, ptr %11, align 4, !tbaa !9
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [41 x %struct.Point], ptr @_ZZ5mergeRiP5PointiS1_E1q, i64 0, i64 %206
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %207, ptr align 8 %25, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #5
  %208 = load i32, ptr %16, align 4, !tbaa !9
  %209 = add nsw i32 %208, 1
  store i32 %209, ptr %16, align 4, !tbaa !9
  %210 = load i32, ptr %20, align 4, !tbaa !9
  store i32 %210, ptr %19, align 4, !tbaa !9
  %211 = load i32, ptr %19, align 4, !tbaa !9
  %212 = add nsw i32 %211, 1
  %213 = load i32, ptr %7, align 4, !tbaa !9
  %214 = icmp slt i32 %212, %213
  br i1 %214, label %215, label %218

215:                                              ; preds = %196
  %216 = load i32, ptr %19, align 4, !tbaa !9
  %217 = add nsw i32 %216, 1
  br label %219

218:                                              ; preds = %196
  br label %219

219:                                              ; preds = %218, %215
  %220 = phi i32 [ %217, %215 ], [ 0, %218 ]
  store i32 %220, ptr %20, align 4, !tbaa !9
  br label %221

221:                                              ; preds = %219, %194
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  br label %115, !llvm.loop !17

222:                                              ; preds = %124
  br label %223

223:                                              ; preds = %268, %222
  %224 = load i32, ptr %15, align 4, !tbaa !9
  %225 = load ptr, ptr %5, align 8, !tbaa !5
  %226 = load i32, ptr %225, align 4, !tbaa !9
  %227 = icmp slt i32 %224, %226
  br i1 %227, label %228, label %270

228:                                              ; preds = %223
  %229 = load i32, ptr %11, align 4, !tbaa !9
  %230 = add nsw i32 %229, 1
  store i32 %230, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #5
  %231 = load i32, ptr %11, align 4, !tbaa !9
  %232 = sub nsw i32 %231, 1
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [41 x %struct.Point], ptr @_ZZ5mergeRiP5PointiS1_E1q, i64 0, i64 %233
  %235 = load ptr, ptr %6, align 8, !tbaa !5
  %236 = load i32, ptr %18, align 4, !tbaa !9
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds %struct.Point, ptr %235, i64 %237
  %239 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %234, ptr noundef nonnull align 8 dereferenceable(16) %238)
  %240 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %241 = extractvalue { double, double } %239, 0
  store double %241, ptr %240, align 8
  %242 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %243 = extractvalue { double, double } %239, 1
  store double %243, ptr %242, align 8
  %244 = load ptr, ptr %6, align 8, !tbaa !5
  %245 = load i32, ptr %17, align 4, !tbaa !9
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds %struct.Point, ptr %244, i64 %246
  %248 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(16) %247)
  %249 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %250 = extractvalue { double, double } %248, 0
  store double %250, ptr %249, align 8
  %251 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %252 = extractvalue { double, double } %248, 1
  store double %252, ptr %251, align 8
  %253 = load i32, ptr %11, align 4, !tbaa !9
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [41 x %struct.Point], ptr @_ZZ5mergeRiP5PointiS1_E1q, i64 0, i64 %254
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %255, ptr align 8 %26, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #5
  %256 = load i32, ptr %15, align 4, !tbaa !9
  %257 = add nsw i32 %256, 1
  store i32 %257, ptr %15, align 4, !tbaa !9
  %258 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %258, ptr %17, align 4, !tbaa !9
  %259 = load i32, ptr %17, align 4, !tbaa !9
  %260 = add nsw i32 %259, 1
  %261 = load ptr, ptr %5, align 8, !tbaa !5
  %262 = load i32, ptr %261, align 4, !tbaa !9
  %263 = icmp slt i32 %260, %262
  br i1 %263, label %264, label %267

264:                                              ; preds = %228
  %265 = load i32, ptr %17, align 4, !tbaa !9
  %266 = add nsw i32 %265, 1
  br label %268

267:                                              ; preds = %228
  br label %268

268:                                              ; preds = %267, %264
  %269 = phi i32 [ %266, %264 ], [ 0, %267 ]
  store i32 %269, ptr %18, align 4, !tbaa !9
  br label %223, !llvm.loop !18

270:                                              ; preds = %223
  br label %271

271:                                              ; preds = %314, %270
  %272 = load i32, ptr %16, align 4, !tbaa !9
  %273 = load i32, ptr %7, align 4, !tbaa !9
  %274 = icmp slt i32 %272, %273
  br i1 %274, label %275, label %316

275:                                              ; preds = %271
  %276 = load i32, ptr %11, align 4, !tbaa !9
  %277 = add nsw i32 %276, 1
  store i32 %277, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #5
  %278 = load i32, ptr %11, align 4, !tbaa !9
  %279 = sub nsw i32 %278, 1
  %280 = sext i32 %279 to i64
  %281 = getelementptr inbounds [41 x %struct.Point], ptr @_ZZ5mergeRiP5PointiS1_E1q, i64 0, i64 %280
  %282 = load ptr, ptr %8, align 8, !tbaa !5
  %283 = load i32, ptr %20, align 4, !tbaa !9
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds %struct.Point, ptr %282, i64 %284
  %286 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %281, ptr noundef nonnull align 8 dereferenceable(16) %285)
  %287 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 0
  %288 = extractvalue { double, double } %286, 0
  store double %288, ptr %287, align 8
  %289 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 1
  %290 = extractvalue { double, double } %286, 1
  store double %290, ptr %289, align 8
  %291 = load ptr, ptr %8, align 8, !tbaa !5
  %292 = load i32, ptr %19, align 4, !tbaa !9
  %293 = sext i32 %292 to i64
  %294 = getelementptr inbounds %struct.Point, ptr %291, i64 %293
  %295 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(16) %294)
  %296 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %297 = extractvalue { double, double } %295, 0
  store double %297, ptr %296, align 8
  %298 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %299 = extractvalue { double, double } %295, 1
  store double %299, ptr %298, align 8
  %300 = load i32, ptr %11, align 4, !tbaa !9
  %301 = sext i32 %300 to i64
  %302 = getelementptr inbounds [41 x %struct.Point], ptr @_ZZ5mergeRiP5PointiS1_E1q, i64 0, i64 %301
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %302, ptr align 8 %28, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #5
  %303 = load i32, ptr %16, align 4, !tbaa !9
  %304 = add nsw i32 %303, 1
  store i32 %304, ptr %16, align 4, !tbaa !9
  %305 = load i32, ptr %20, align 4, !tbaa !9
  store i32 %305, ptr %19, align 4, !tbaa !9
  %306 = load i32, ptr %19, align 4, !tbaa !9
  %307 = add nsw i32 %306, 1
  %308 = load i32, ptr %7, align 4, !tbaa !9
  %309 = icmp slt i32 %307, %308
  br i1 %309, label %310, label %313

310:                                              ; preds = %275
  %311 = load i32, ptr %19, align 4, !tbaa !9
  %312 = add nsw i32 %311, 1
  br label %314

313:                                              ; preds = %275
  br label %314

314:                                              ; preds = %313, %310
  %315 = phi i32 [ %312, %310 ], [ 0, %313 ]
  store i32 %315, ptr %20, align 4, !tbaa !9
  br label %271, !llvm.loop !19

316:                                              ; preds = %271
  %317 = load i32, ptr %11, align 4, !tbaa !9
  %318 = sext i32 %317 to i64
  %319 = getelementptr inbounds [41 x %struct.Point], ptr @_ZZ5mergeRiP5PointiS1_E1q, i64 0, i64 %318
  %320 = call noundef zeroext i1 @_ZNK5Point3cmpERKS_(ptr noundef nonnull align 8 dereferenceable(16) @_ZZ5mergeRiP5PointiS1_E1q, ptr noundef nonnull align 8 dereferenceable(16) %319)
  br i1 %320, label %327, label %321

321:                                              ; preds = %316
  %322 = load i32, ptr %11, align 4, !tbaa !9
  %323 = sext i32 %322 to i64
  %324 = getelementptr inbounds [41 x %struct.Point], ptr @_ZZ5mergeRiP5PointiS1_E1q, i64 0, i64 %323
  %325 = call noundef zeroext i1 @_ZNK5Point3cmpERKS_(ptr noundef nonnull align 8 dereferenceable(16) %324, ptr noundef nonnull align 8 dereferenceable(16) @_ZZ5mergeRiP5PointiS1_E1q)
  %326 = xor i1 %325, true
  br label %327

327:                                              ; preds = %321, %316
  %328 = phi i1 [ false, %316 ], [ %326, %321 ]
  br i1 %328, label %329, label %330

329:                                              ; preds = %327
  br label %332

330:                                              ; preds = %327
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 164, ptr noundef @__PRETTY_FUNCTION__._Z5mergeRiP5PointiS1_) #6
  unreachable

331:                                              ; No predecessors!
  br label %332

332:                                              ; preds = %331, %329
  %333 = load i32, ptr %11, align 4, !tbaa !9
  %334 = load ptr, ptr %5, align 8, !tbaa !5
  store i32 %333, ptr %334, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  store i32 0, ptr %30, align 4, !tbaa !9
  br label %335

335:                                              ; preds = %349, %332
  %336 = load i32, ptr %30, align 4, !tbaa !9
  %337 = load ptr, ptr %5, align 8, !tbaa !5
  %338 = load i32, ptr %337, align 4, !tbaa !9
  %339 = icmp slt i32 %336, %338
  br i1 %339, label %341, label %340

340:                                              ; preds = %335
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  br label %352

341:                                              ; preds = %335
  %342 = load i32, ptr %30, align 4, !tbaa !9
  %343 = sext i32 %342 to i64
  %344 = getelementptr inbounds [41 x %struct.Point], ptr @_ZZ5mergeRiP5PointiS1_E1q, i64 0, i64 %343
  %345 = load ptr, ptr %6, align 8, !tbaa !5
  %346 = load i32, ptr %30, align 4, !tbaa !9
  %347 = sext i32 %346 to i64
  %348 = getelementptr inbounds %struct.Point, ptr %345, i64 %347
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %348, ptr align 16 %344, i64 16, i1 false), !tbaa.struct !14
  br label %349

349:                                              ; preds = %341
  %350 = load i32, ptr %30, align 4, !tbaa !9
  %351 = add nsw i32 %350, 1
  store i32 %351, ptr %30, align 4, !tbaa !9
  br label %335, !llvm.loop !20

352:                                              ; preds = %340
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  ret void
}

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

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 = { 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 = { noreturn 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 = { nounwind }
attributes #6 = { noreturn 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 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{i64 0, i64 8, !15, i64 8, i64 8, !15}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}


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

@_ZZ5mergeRiP5PointiS1_E1q = external hidden global [41 x %struct.Point], align 16
@.str = external hidden unnamed_addr constant [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [62 x i8], align 1
@__PRETTY_FUNCTION__._Z5mergeRiP5PointiS1_ = external hidden unnamed_addr constant [41 x i8], align 1

; 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 uwtable
define dso_local void @_Z5mergeRiP5PointiS1_(ptr nocapture noundef nonnull align 4 dereferenceable(4) %0, ptr noundef %1, i32 noundef %2, ptr noundef %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 %struct.Point, align 8
  %10 = load i32, ptr %0, align 4, !tbaa !5
  %11 = icmp sgt i32 %10, 1
  br i1 %11, label %.lr.ph, label %.preheader131

.preheader131:                                    ; preds = %.lr.ph, %4
  %.0103.lcssa = phi i32 [ 0, %4 ], [ %spec.select, %.lr.ph ]
  %12 = icmp sgt i32 %2, 1
  br i1 %12, label %.lr.ph136.preheader, label %._crit_edge

.lr.ph136.preheader:                              ; preds = %.preheader131
  %wide.trip.count = zext nneg i32 %2 to i64
  br label %.lr.ph136

.lr.ph:                                           ; preds = %4, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %4 ]
  %.0103133 = phi i32 [ %spec.select, %.lr.ph ], [ 0, %4 ]
  %13 = getelementptr inbounds %struct.Point, ptr %1, i64 %indvars.iv
  %14 = sext i32 %.0103133 to i64
  %15 = getelementptr inbounds %struct.Point, ptr %1, i64 %14
  %16 = tail call noundef zeroext i1 @_ZNK5PointltERKS_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %15)
  %17 = trunc nuw nsw i64 %indvars.iv to i32
  %spec.select = select i1 %16, i32 %17, i32 %.0103133
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %18 = load i32, ptr %0, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = icmp slt i64 %indvars.iv.next, %19
  br i1 %20, label %.lr.ph, label %.preheader131, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph136, %.preheader131
  %.0104.lcssa = phi i32 [ 0, %.preheader131 ], [ %spec.select129, %.lr.ph136 ]
  %21 = sext i32 %.0103.lcssa to i64
  %22 = getelementptr inbounds %struct.Point, ptr %1, i64 %21
  %23 = sext i32 %.0104.lcssa to i64
  %24 = getelementptr inbounds %struct.Point, ptr %3, i64 %23
  %25 = tail call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %24)
  %26 = extractvalue { double, double } %25, 0
  %27 = extractvalue { double, double } %25, 1
  store double %26, ptr @_ZZ5mergeRiP5PointiS1_E1q, align 16, !tbaa !11
  store double %27, ptr getelementptr inbounds (i8, ptr @_ZZ5mergeRiP5PointiS1_E1q, i64 8), align 8, !tbaa !11
  %28 = add nsw i32 %.0103.lcssa, 1
  %29 = load i32, ptr %0, align 4, !tbaa !5
  %30 = icmp slt i32 %28, %29
  %31 = select i1 %30, i32 %28, i32 0
  %32 = add nsw i32 %.0104.lcssa, 1
  %33 = icmp slt i32 %32, %2
  %34 = select i1 %33, i32 %32, i32 0
  %35 = icmp sgt i32 %29, 0
  %36 = icmp sgt i32 %2, 0
  %37 = and i1 %35, %36
  br i1 %37, label %.lr.ph146, label %.preheader130

.lr.ph146:                                        ; preds = %._crit_edge
  %38 = getelementptr inbounds i8, ptr %5, i64 8
  %39 = getelementptr inbounds i8, ptr %6, i64 8
  br label %50

.lr.ph136:                                        ; preds = %.lr.ph136.preheader, %.lr.ph136
  %indvars.iv174 = phi i64 [ 1, %.lr.ph136.preheader ], [ %indvars.iv.next175, %.lr.ph136 ]
  %.0104135 = phi i32 [ 0, %.lr.ph136.preheader ], [ %spec.select129, %.lr.ph136 ]
  %40 = getelementptr inbounds %struct.Point, ptr %3, i64 %indvars.iv174
  %41 = sext i32 %.0104135 to i64
  %42 = getelementptr inbounds %struct.Point, ptr %3, i64 %41
  %43 = tail call noundef zeroext i1 @_ZNK5PointltERKS_(ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 8 dereferenceable(16) %42)
  %44 = trunc nuw nsw i64 %indvars.iv174 to i32
  %spec.select129 = select i1 %43, i32 %44, i32 %.0104135
  %indvars.iv.next175 = add nuw nsw i64 %indvars.iv174, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next175, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph136, !llvm.loop !13

.preheader130.loopexit:                           ; preds = %88
  %45 = trunc nuw i64 %indvars.iv.next178 to i32
  br label %.preheader130

.preheader130:                                    ; preds = %.preheader130.loopexit, %._crit_edge
  %46 = phi i32 [ %29, %._crit_edge ], [ %89, %.preheader130.loopexit ]
  %.0125.lcssa = phi i32 [ %31, %._crit_edge ], [ %.1126, %.preheader130.loopexit ]
  %.0122.lcssa = phi i32 [ %.0104.lcssa, %._crit_edge ], [ %.1123, %.preheader130.loopexit ]
  %.0119.lcssa = phi i32 [ %34, %._crit_edge ], [ %.1120, %.preheader130.loopexit ]
  %.0116.lcssa = phi i32 [ %.0103.lcssa, %._crit_edge ], [ %.1117, %.preheader130.loopexit ]
  %.0113.lcssa = phi i32 [ 0, %._crit_edge ], [ %.1114, %.preheader130.loopexit ]
  %.0110.lcssa = phi i32 [ 0, %._crit_edge ], [ %.1111, %.preheader130.loopexit ]
  %.0106.lcssa = phi i32 [ 0, %._crit_edge ], [ %45, %.preheader130.loopexit ]
  %47 = icmp slt i32 %.0110.lcssa, %46
  br i1 %47, label %.lr.ph158, label %.preheader

.lr.ph158:                                        ; preds = %.preheader130
  %48 = getelementptr inbounds i8, ptr %8, i64 8
  %49 = zext i32 %.0106.lcssa to i64
  br label %97

50:                                               ; preds = %.lr.ph146, %88
  %indvars.iv177 = phi i64 [ 0, %.lr.ph146 ], [ %indvars.iv.next178, %88 ]
  %.0110143 = phi i32 [ 0, %.lr.ph146 ], [ %.1111, %88 ]
  %.0113142 = phi i32 [ 0, %.lr.ph146 ], [ %.1114, %88 ]
  %.0116141 = phi i32 [ %.0103.lcssa, %.lr.ph146 ], [ %.1117, %88 ]
  %.0119140 = phi i32 [ %34, %.lr.ph146 ], [ %.1120, %88 ]
  %.0122139 = phi i32 [ %.0104.lcssa, %.lr.ph146 ], [ %.1123, %88 ]
  %.0125138 = phi i32 [ %31, %.lr.ph146 ], [ %.1126, %88 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %51 = sext i32 %.0125138 to i64
  %52 = getelementptr inbounds %struct.Point, ptr %1, i64 %51
  %53 = sext i32 %.0116141 to i64
  %54 = getelementptr inbounds %struct.Point, ptr %1, i64 %53
  %55 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %52, ptr noundef nonnull align 8 dereferenceable(16) %54)
  %56 = extractvalue { double, double } %55, 0
  store double %56, ptr %5, align 8
  %57 = extractvalue { double, double } %55, 1
  store double %57, ptr %38, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %58 = sext i32 %.0119140 to i64
  %59 = getelementptr inbounds %struct.Point, ptr %3, i64 %58
  %60 = sext i32 %.0122139 to i64
  %61 = getelementptr inbounds %struct.Point, ptr %3, i64 %60
  %62 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %59, ptr noundef nonnull align 8 dereferenceable(16) %61)
  %63 = extractvalue { double, double } %62, 0
  store double %63, ptr %6, align 8
  %64 = extractvalue { double, double } %62, 1
  store double %64, ptr %39, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  %65 = call noundef zeroext i1 @_ZNK5Point3cmpERKS_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %6)
  %. = select i1 %65, ptr %5, ptr %6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %., i64 16, i1 false), !tbaa.struct !14
  %indvars.iv.next178 = add nuw nsw i64 %indvars.iv177, 1
  %66 = getelementptr inbounds [41 x %struct.Point], ptr @_ZZ5mergeRiP5PointiS1_E1q, i64 0, i64 %indvars.iv177
  %67 = getelementptr inbounds [41 x %struct.Point], ptr @_ZZ5mergeRiP5PointiS1_E1q, i64 0, i64 %indvars.iv.next178
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %67, ptr noundef nonnull align 16 dereferenceable(16) %66, i64 16, i1 false), !tbaa.struct !14
  %68 = call noundef zeroext i1 @_ZNK5Point3cmpERKS_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %5)
  br i1 %68, label %78, label %69

69:                                               ; preds = %50
  %70 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %67, ptr noundef nonnull align 8 dereferenceable(16) %5)
  %71 = extractvalue { double, double } %70, 0
  %72 = extractvalue { double, double } %70, 1
  store double %71, ptr %67, align 16, !tbaa !11
  %.sroa.49.0..sroa_idx = getelementptr inbounds i8, ptr %67, i64 8
  store double %72, ptr %.sroa.49.0..sroa_idx, align 8, !tbaa !11
  %73 = add nsw i32 %.0110143, 1
  %74 = add nsw i32 %.0125138, 1
  %75 = load i32, ptr %0, align 4, !tbaa !5
  %76 = icmp slt i32 %74, %75
  %77 = select i1 %76, i32 %74, i32 0
  br label %78

78:                                               ; preds = %69, %50
  %.1126 = phi i32 [ %.0125138, %50 ], [ %77, %69 ]
  %.1117 = phi i32 [ %.0116141, %50 ], [ %.0125138, %69 ]
  %.1111 = phi i32 [ %.0110143, %50 ], [ %73, %69 ]
  %79 = call noundef zeroext i1 @_ZNK5Point3cmpERKS_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %6)
  br i1 %79, label %88, label %80

80:                                               ; preds = %78
  %81 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %67, ptr noundef nonnull align 8 dereferenceable(16) %6)
  %82 = extractvalue { double, double } %81, 0
  %83 = extractvalue { double, double } %81, 1
  store double %82, ptr %67, align 16, !tbaa !11
  %.sroa.47.0..sroa_idx = getelementptr inbounds i8, ptr %67, i64 8
  store double %83, ptr %.sroa.47.0..sroa_idx, align 8, !tbaa !11
  %84 = add nsw i32 %.0113142, 1
  %85 = add nsw i32 %.0119140, 1
  %86 = icmp slt i32 %85, %2
  %87 = select i1 %86, i32 %85, i32 0
  br label %88

88:                                               ; preds = %80, %78
  %.1123 = phi i32 [ %.0122139, %78 ], [ %.0119140, %80 ]
  %.1120 = phi i32 [ %.0119140, %78 ], [ %87, %80 ]
  %.1114 = phi i32 [ %.0113142, %78 ], [ %84, %80 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  %89 = load i32, ptr %0, align 4, !tbaa !5
  %90 = icmp slt i32 %.1111, %89
  %91 = icmp slt i32 %.1114, %2
  %92 = select i1 %90, i1 %91, i1 false
  br i1 %92, label %50, label %.preheader130.loopexit, !llvm.loop !15

.preheader.loopexit:                              ; preds = %97
  %93 = trunc nuw i64 %indvars.iv.next181 to i32
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %.preheader130
  %.1107.lcssa = phi i32 [ %.0106.lcssa, %.preheader130 ], [ %93, %.preheader.loopexit ]
  %94 = icmp slt i32 %.0113.lcssa, %2
  br i1 %94, label %.lr.ph164, label %._crit_edge165

.lr.ph164:                                        ; preds = %.preheader
  %95 = getelementptr inbounds i8, ptr %9, i64 8
  %96 = zext i32 %.1107.lcssa to i64
  br label %116

97:                                               ; preds = %.lr.ph158, %97
  %indvars.iv180 = phi i64 [ %49, %.lr.ph158 ], [ %indvars.iv.next181, %97 ]
  %.2112156 = phi i32 [ %.0110.lcssa, %.lr.ph158 ], [ %110, %97 ]
  %.2118155 = phi i32 [ %.0116.lcssa, %.lr.ph158 ], [ %.2127154, %97 ]
  %.2127154 = phi i32 [ %.0125.lcssa, %.lr.ph158 ], [ %114, %97 ]
  %indvars.iv.next181 = add nuw nsw i64 %indvars.iv180, 1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  %98 = getelementptr inbounds [41 x %struct.Point], ptr @_ZZ5mergeRiP5PointiS1_E1q, i64 0, i64 %indvars.iv180
  %99 = sext i32 %.2127154 to i64
  %100 = getelementptr inbounds %struct.Point, ptr %1, i64 %99
  %101 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %98, ptr noundef nonnull align 8 dereferenceable(16) %100)
  %102 = extractvalue { double, double } %101, 0
  store double %102, ptr %8, align 8
  %103 = extractvalue { double, double } %101, 1
  store double %103, ptr %48, align 8
  %104 = sext i32 %.2118155 to i64
  %105 = getelementptr inbounds %struct.Point, ptr %1, i64 %104
  %106 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %105)
  %107 = extractvalue { double, double } %106, 0
  %108 = extractvalue { double, double } %106, 1
  %109 = getelementptr inbounds [41 x %struct.Point], ptr @_ZZ5mergeRiP5PointiS1_E1q, i64 0, i64 %indvars.iv.next181
  store double %107, ptr %109, align 16, !tbaa !11
  %.sroa.45.0..sroa_idx = getelementptr inbounds i8, ptr %109, i64 8
  store double %108, ptr %.sroa.45.0..sroa_idx, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  %110 = add nsw i32 %.2112156, 1
  %111 = add nsw i32 %.2127154, 1
  %112 = load i32, ptr %0, align 4, !tbaa !5
  %113 = icmp slt i32 %111, %112
  %114 = select i1 %113, i32 %111, i32 0
  %115 = icmp slt i32 %110, %112
  br i1 %115, label %97, label %.preheader.loopexit, !llvm.loop !16

116:                                              ; preds = %.lr.ph164, %116
  %indvars.iv183 = phi i64 [ %96, %.lr.ph164 ], [ %indvars.iv.next184, %116 ]
  %.2115162 = phi i32 [ %.0113.lcssa, %.lr.ph164 ], [ %129, %116 ]
  %.2121161 = phi i32 [ %.0119.lcssa, %.lr.ph164 ], [ %132, %116 ]
  %.2124160 = phi i32 [ %.0122.lcssa, %.lr.ph164 ], [ %.2121161, %116 ]
  %indvars.iv.next184 = add nuw nsw i64 %indvars.iv183, 1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  %117 = getelementptr inbounds [41 x %struct.Point], ptr @_ZZ5mergeRiP5PointiS1_E1q, i64 0, i64 %indvars.iv183
  %118 = sext i32 %.2121161 to i64
  %119 = getelementptr inbounds %struct.Point, ptr %3, i64 %118
  %120 = call { double, double } @_ZNK5PointplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %117, ptr noundef nonnull align 8 dereferenceable(16) %119)
  %121 = extractvalue { double, double } %120, 0
  store double %121, ptr %9, align 8
  %122 = extractvalue { double, double } %120, 1
  store double %122, ptr %95, align 8
  %123 = sext i32 %.2124160 to i64
  %124 = getelementptr inbounds %struct.Point, ptr %3, i64 %123
  %125 = call { double, double } @_ZNK5PointmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %124)
  %126 = extractvalue { double, double } %125, 0
  %127 = extractvalue { double, double } %125, 1
  %128 = getelementptr inbounds [41 x %struct.Point], ptr @_ZZ5mergeRiP5PointiS1_E1q, i64 0, i64 %indvars.iv.next184
  store double %126, ptr %128, align 16, !tbaa !11
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %128, i64 8
  store double %127, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  %129 = add i32 %.2115162, 1
  %130 = add nsw i32 %.2121161, 1
  %131 = icmp slt i32 %130, %2
  %132 = select i1 %131, i32 %130, i32 0
  %exitcond186.not = icmp eq i32 %129, %2
  br i1 %exitcond186.not, label %._crit_edge165.loopexit, label %116, !llvm.loop !17

._crit_edge165.loopexit:                          ; preds = %116
  %133 = trunc nuw i64 %indvars.iv.next184 to i32
  br label %._crit_edge165

._crit_edge165:                                   ; preds = %._crit_edge165.loopexit, %.preheader
  %.2.lcssa = phi i32 [ %.1107.lcssa, %.preheader ], [ %133, %._crit_edge165.loopexit ]
  %134 = zext nneg i32 %.2.lcssa to i64
  %135 = getelementptr inbounds [41 x %struct.Point], ptr @_ZZ5mergeRiP5PointiS1_E1q, i64 0, i64 %134
  %136 = call noundef zeroext i1 @_ZNK5Point3cmpERKS_(ptr noundef nonnull align 8 dereferenceable(16) @_ZZ5mergeRiP5PointiS1_E1q, ptr noundef nonnull align 8 dereferenceable(16) %135)
  br i1 %136, label %.critedge, label %137

137:                                              ; preds = %._crit_edge165
  %138 = call noundef zeroext i1 @_ZNK5Point3cmpERKS_(ptr noundef nonnull align 8 dereferenceable(16) %135, ptr noundef nonnull align 8 dereferenceable(16) @_ZZ5mergeRiP5PointiS1_E1q)
  br i1 %138, label %.critedge, label %139

.critedge:                                        ; preds = %._crit_edge165, %137
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 164, ptr noundef nonnull @__PRETTY_FUNCTION__._Z5mergeRiP5PointiS1_) #6
  unreachable

139:                                              ; preds = %137
  store i32 %.2.lcssa, ptr %0, align 4, !tbaa !5
  %140 = icmp sgt i32 %.2.lcssa, 0
  br i1 %140, label %.lr.ph169, label %._crit_edge170

._crit_edge170:                                   ; preds = %.lr.ph169, %139
  ret void

.lr.ph169:                                        ; preds = %139, %.lr.ph169
  %indvars.iv187 = phi i64 [ %indvars.iv.next188, %.lr.ph169 ], [ 0, %139 ]
  %141 = getelementptr inbounds [41 x %struct.Point], ptr @_ZZ5mergeRiP5PointiS1_E1q, i64 0, i64 %indvars.iv187
  %142 = getelementptr inbounds %struct.Point, ptr %1, i64 %indvars.iv187
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %142, ptr noundef nonnull align 16 dereferenceable(16) %141, i64 16, i1 false), !tbaa.struct !14
  %indvars.iv.next188 = add nuw nsw i64 %indvars.iv187, 1
  %143 = load i32, ptr %0, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = icmp slt i64 %indvars.iv.next188, %144
  br i1 %145, label %.lr.ph169, label %._crit_edge170, !llvm.loop !18
}

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

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 = { 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 = { noreturn 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 = { nounwind }
attributes #6 = { noreturn 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, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = !{i64 0, i64 8, !11, i64 8, i64 8, !11}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


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