; LLVM IR from NavInfoNC/nc-geo :: src/polyline_tile_splitter.ll (ZN12LineSplitter5splitEPK5PointmPvPFvS2_mS3_E)

; 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 { i32, i32 }
%class.LineSplitter = type { i32, ptr, i64, ptr, i64 }

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

; 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 noundef i32 @_Z18getGridIdFromPointPK5Pointi(ptr noundef, i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN12LineSplitter13getCrosspointEjPK5PointS2_PS0_(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, ptr noundef, ptr noundef, ptr noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN12LineSplitter18getRelativeGridPosEjj(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN12LineSplitter14generateGridIdEjPK5PointNS_8PositionE(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, ptr noundef, i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN12LineSplitter5splitEPK5PointmPvPFvS2_mS3_E(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4) #2 align 2 {
  %6 = alloca i1, align 1
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i8, align 1
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i8, align 1
  %18 = alloca %struct.Point, align 4
  %19 = alloca i8, align 1
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i64 %2, ptr %9, align 8, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  %29 = load ptr, ptr %7, align 8
  %30 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 0
  %31 = load i32, ptr %30, align 8, !tbaa !11
  %32 = icmp eq i32 %31, 0
  br i1 %32, label %33, label %34

33:                                               ; preds = %5
  store i1 false, ptr %6, align 1
  br label %285

34:                                               ; preds = %5
  %35 = load i64, ptr %9, align 8, !tbaa !9
  call void @_ZN12LineSplitter14_reservePointsEm(ptr noundef nonnull align 8 dereferenceable(40) %29, i64 noundef %35)
  %36 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 4
  %37 = load i64, ptr %36, align 8, !tbaa !14
  %38 = load i64, ptr %9, align 8, !tbaa !9
  %39 = icmp ult i64 %37, %38
  br i1 %39, label %40, label %49

40:                                               ; preds = %34
  %41 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 3
  %42 = load ptr, ptr %41, align 8, !tbaa !15
  %43 = load i64, ptr %9, align 8, !tbaa !9
  %44 = mul i64 %43, 8
  %45 = call ptr @realloc(ptr noundef %42, i64 noundef %44) #6
  %46 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 3
  store ptr %45, ptr %46, align 8, !tbaa !15
  %47 = load i64, ptr %9, align 8, !tbaa !9
  %48 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 4
  store i64 %47, ptr %48, align 8, !tbaa !14
  br label %49

49:                                               ; preds = %40, %34
  %50 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 3
  %51 = load ptr, ptr %50, align 8, !tbaa !15
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = load i64, ptr %9, align 8, !tbaa !9
  %54 = mul i64 %53, 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %51, ptr align 4 %52, i64 %54, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #7
  store i8 1, ptr %14, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store i64 0, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %55 = load i64, ptr %15, align 8, !tbaa !9
  %56 = add i64 %55, 1
  store i64 %56, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #7
  store i8 1, ptr %17, align 1, !tbaa !17
  br label %57

57:                                               ; preds = %252, %246, %49
  %58 = load i64, ptr %16, align 8, !tbaa !9
  %59 = load i64, ptr %9, align 8, !tbaa !9
  %60 = icmp ult i64 %58, %59
  br i1 %60, label %61, label %253

61:                                               ; preds = %57
  %62 = load i8, ptr %14, align 1, !tbaa !17, !range !19, !noundef !20
  %63 = trunc i8 %62 to i1
  br i1 %63, label %64, label %72

64:                                               ; preds = %61
  %65 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 3
  %66 = load ptr, ptr %65, align 8, !tbaa !15
  %67 = load i64, ptr %15, align 8, !tbaa !9
  %68 = getelementptr inbounds %struct.Point, ptr %66, i64 %67
  %69 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 0
  %70 = load i32, ptr %69, align 8, !tbaa !11
  %71 = call noundef i32 @_Z18getGridIdFromPointPK5Pointi(ptr noundef %68, i32 noundef %70)
  store i32 %71, ptr %12, align 4, !tbaa !16
  br label %72

72:                                               ; preds = %64, %61
  %73 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 3
  %74 = load ptr, ptr %73, align 8, !tbaa !15
  %75 = load i64, ptr %16, align 8, !tbaa !9
  %76 = getelementptr inbounds %struct.Point, ptr %74, i64 %75
  %77 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 0
  %78 = load i32, ptr %77, align 8, !tbaa !11
  %79 = call noundef i32 @_Z18getGridIdFromPointPK5Pointi(ptr noundef %76, i32 noundef %78)
  store i32 %79, ptr %13, align 4, !tbaa !16
  %80 = load i32, ptr %13, align 4, !tbaa !16
  %81 = load i32, ptr %12, align 4, !tbaa !16
  %82 = icmp ne i32 %80, %81
  br i1 %82, label %83, label %249

83:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #7
  %84 = load i32, ptr %12, align 4, !tbaa !16
  %85 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 3
  %86 = load ptr, ptr %85, align 8, !tbaa !15
  %87 = load i64, ptr %16, align 8, !tbaa !9
  %88 = sub i64 %87, 1
  %89 = getelementptr inbounds %struct.Point, ptr %86, i64 %88
  %90 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 3
  %91 = load ptr, ptr %90, align 8, !tbaa !15
  %92 = load i64, ptr %16, align 8, !tbaa !9
  %93 = getelementptr inbounds %struct.Point, ptr %91, i64 %92
  %94 = call noundef i32 @_ZN12LineSplitter13getCrosspointEjPK5PointS2_PS0_(ptr noundef nonnull align 8 dereferenceable(40) %29, i32 noundef %84, ptr noundef %89, ptr noundef %93, ptr noundef %18)
  %95 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 3
  %96 = load ptr, ptr %95, align 8, !tbaa !15
  %97 = load i64, ptr %16, align 8, !tbaa !9
  %98 = sub i64 %97, 1
  %99 = getelementptr inbounds %struct.Point, ptr %96, i64 %98
  %100 = getelementptr inbounds %struct.Point, ptr %99, i32 0, i32 0
  %101 = load i32, ptr %100, align 4, !tbaa !21
  %102 = getelementptr inbounds %struct.Point, ptr %18, i32 0, i32 0
  %103 = load i32, ptr %102, align 4, !tbaa !21
  %104 = icmp eq i32 %101, %103
  br i1 %104, label %105, label %116

105:                                              ; preds = %83
  %106 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 3
  %107 = load ptr, ptr %106, align 8, !tbaa !15
  %108 = load i64, ptr %16, align 8, !tbaa !9
  %109 = sub i64 %108, 1
  %110 = getelementptr inbounds %struct.Point, ptr %107, i64 %109
  %111 = getelementptr inbounds %struct.Point, ptr %110, i32 0, i32 1
  %112 = load i32, ptr %111, align 4, !tbaa !23
  %113 = getelementptr inbounds %struct.Point, ptr %18, i32 0, i32 1
  %114 = load i32, ptr %113, align 4, !tbaa !23
  %115 = icmp eq i32 %112, %114
  br label %116

116:                                              ; preds = %105, %83
  %117 = phi i1 [ false, %83 ], [ %115, %105 ]
  %118 = zext i1 %117 to i8
  store i8 %118, ptr %19, align 1, !tbaa !17
  %119 = load i8, ptr %19, align 1, !tbaa !17, !range !19, !noundef !20
  %120 = trunc i8 %119 to i1
  br i1 %120, label %121, label %136

121:                                              ; preds = %116
  %122 = load i8, ptr %14, align 1, !tbaa !17, !range !19, !noundef !20
  %123 = trunc i8 %122 to i1
  br i1 %123, label %124, label %136

124:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %125 = load i32, ptr %13, align 4, !tbaa !16
  %126 = load i32, ptr %12, align 4, !tbaa !16
  %127 = call noundef i32 @_ZN12LineSplitter18getRelativeGridPosEjj(ptr noundef nonnull align 8 dereferenceable(40) %29, i32 noundef %125, i32 noundef %126)
  store i32 %127, ptr %20, align 4, !tbaa !24
  %128 = load i32, ptr %12, align 4, !tbaa !16
  %129 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 3
  %130 = load ptr, ptr %129, align 8, !tbaa !15
  %131 = load i64, ptr %16, align 8, !tbaa !9
  %132 = sub i64 %131, 1
  %133 = getelementptr inbounds %struct.Point, ptr %130, i64 %132
  %134 = load i32, ptr %20, align 4, !tbaa !24
  %135 = call noundef i32 @_ZN12LineSplitter14generateGridIdEjPK5PointNS_8PositionE(ptr noundef nonnull align 8 dereferenceable(40) %29, i32 noundef %128, ptr noundef %133, i32 noundef %134)
  store i32 %135, ptr %12, align 4, !tbaa !16
  store i8 0, ptr %14, align 1, !tbaa !17
  store i32 2, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %246

136:                                              ; preds = %121, %116
  store i8 0, ptr %17, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %137 = load i64, ptr %16, align 8, !tbaa !9
  %138 = load i64, ptr %15, align 8, !tbaa !9
  %139 = sub i64 %137, %138
  store i64 %139, ptr %22, align 8, !tbaa !9
  %140 = load i8, ptr %19, align 1, !tbaa !17, !range !19, !noundef !20
  %141 = trunc i8 %140 to i1
  br i1 %141, label %145, label %142

142:                                              ; preds = %136
  %143 = load i64, ptr %22, align 8, !tbaa !9
  %144 = add i64 %143, 1
  store i64 %144, ptr %22, align 8, !tbaa !9
  br label %145

145:                                              ; preds = %142, %136
  %146 = load i64, ptr %22, align 8, !tbaa !9
  call void @_ZN12LineSplitter14_reservePointsEm(ptr noundef nonnull align 8 dereferenceable(40) %29, i64 noundef %146)
  %147 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 3
  %148 = load ptr, ptr %147, align 8, !tbaa !15
  %149 = load i64, ptr %16, align 8, !tbaa !9
  %150 = getelementptr inbounds %struct.Point, ptr %148, i64 %149
  %151 = getelementptr inbounds %struct.Point, ptr %150, i32 0, i32 0
  %152 = load i32, ptr %151, align 4, !tbaa !21
  %153 = getelementptr inbounds %struct.Point, ptr %18, i32 0, i32 0
  %154 = load i32, ptr %153, align 4, !tbaa !21
  %155 = icmp eq i32 %152, %154
  br i1 %155, label %156, label %166

156:                                              ; preds = %145
  %157 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 3
  %158 = load ptr, ptr %157, align 8, !tbaa !15
  %159 = load i64, ptr %16, align 8, !tbaa !9
  %160 = getelementptr inbounds %struct.Point, ptr %158, i64 %159
  %161 = getelementptr inbounds %struct.Point, ptr %160, i32 0, i32 1
  %162 = load i32, ptr %161, align 4, !tbaa !23
  %163 = getelementptr inbounds %struct.Point, ptr %18, i32 0, i32 1
  %164 = load i32, ptr %163, align 4, !tbaa !23
  %165 = icmp eq i32 %162, %164
  br i1 %165, label %204, label %166

166:                                              ; preds = %156, %145
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %167 = load i64, ptr %15, align 8, !tbaa !9
  store i64 %167, ptr %23, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  store i64 0, ptr %24, align 8, !tbaa !9
  br label %168

168:                                              ; preds = %182, %166
  %169 = load i64, ptr %23, align 8, !tbaa !9
  %170 = load i64, ptr %16, align 8, !tbaa !9
  %171 = icmp ult i64 %169, %170
  br i1 %171, label %173, label %172

172:                                              ; preds = %168
  store i32 4, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %187

173:                                              ; preds = %168
  %174 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 3
  %175 = load ptr, ptr %174, align 8, !tbaa !15
  %176 = load i64, ptr %23, align 8, !tbaa !9
  %177 = getelementptr inbounds %struct.Point, ptr %175, i64 %176
  %178 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 1
  %179 = load ptr, ptr %178, align 8, !tbaa !26
  %180 = load i64, ptr %24, align 8, !tbaa !9
  %181 = getelementptr inbounds %struct.Point, ptr %179, i64 %180
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %181, ptr align 4 %177, i64 8, i1 false), !tbaa.struct !27
  br label %182

182:                                              ; preds = %173
  %183 = load i64, ptr %23, align 8, !tbaa !9
  %184 = add i64 %183, 1
  store i64 %184, ptr %23, align 8, !tbaa !9
  %185 = load i64, ptr %24, align 8, !tbaa !9
  %186 = add i64 %185, 1
  store i64 %186, ptr %24, align 8, !tbaa !9
  br label %168, !llvm.loop !28

187:                                              ; preds = %172
  %188 = load i8, ptr %19, align 1, !tbaa !17, !range !19, !noundef !20
  %189 = trunc i8 %188 to i1
  br i1 %189, label %201, label %190

190:                                              ; preds = %187
  %191 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 1
  %192 = load ptr, ptr %191, align 8, !tbaa !26
  %193 = load i64, ptr %22, align 8, !tbaa !9
  %194 = sub i64 %193, 1
  %195 = getelementptr inbounds %struct.Point, ptr %192, i64 %194
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %195, ptr align 4 %18, i64 8, i1 false), !tbaa.struct !27
  %196 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 3
  %197 = load ptr, ptr %196, align 8, !tbaa !15
  %198 = load i64, ptr %16, align 8, !tbaa !9
  %199 = sub i64 %198, 1
  %200 = getelementptr inbounds %struct.Point, ptr %197, i64 %199
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %200, ptr align 4 %18, i64 8, i1 false), !tbaa.struct !27
  br label %201

201:                                              ; preds = %190, %187
  %202 = load i64, ptr %16, align 8, !tbaa !9
  %203 = add i64 %202, -1
  store i64 %203, ptr %16, align 8, !tbaa !9
  br label %226

204:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %205 = load i64, ptr %15, align 8, !tbaa !9
  store i64 %205, ptr %25, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  store i64 0, ptr %26, align 8, !tbaa !9
  br label %206

206:                                              ; preds = %220, %204
  %207 = load i64, ptr %25, align 8, !tbaa !9
  %208 = load i64, ptr %16, align 8, !tbaa !9
  %209 = icmp ule i64 %207, %208
  br i1 %209, label %211, label %210

210:                                              ; preds = %206
  store i32 7, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %225

211:                                              ; preds = %206
  %212 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 3
  %213 = load ptr, ptr %212, align 8, !tbaa !15
  %214 = load i64, ptr %25, align 8, !tbaa !9
  %215 = getelementptr inbounds %struct.Point, ptr %213, i64 %214
  %216 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 1
  %217 = load ptr, ptr %216, align 8, !tbaa !26
  %218 = load i64, ptr %26, align 8, !tbaa !9
  %219 = getelementptr inbounds %struct.Point, ptr %217, i64 %218
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %219, ptr align 4 %215, i64 8, i1 false), !tbaa.struct !27
  br label %220

220:                                              ; preds = %211
  %221 = load i64, ptr %25, align 8, !tbaa !9
  %222 = add i64 %221, 1
  store i64 %222, ptr %25, align 8, !tbaa !9
  %223 = load i64, ptr %26, align 8, !tbaa !9
  %224 = add i64 %223, 1
  store i64 %224, ptr %26, align 8, !tbaa !9
  br label %206, !llvm.loop !30

225:                                              ; preds = %210
  br label %226

226:                                              ; preds = %225, %201
  %227 = load i64, ptr %22, align 8, !tbaa !9
  %228 = icmp uge i64 %227, 2
  br i1 %228, label %229, label %235

229:                                              ; preds = %226
  %230 = load ptr, ptr %11, align 8, !tbaa !5
  %231 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 1
  %232 = load ptr, ptr %231, align 8, !tbaa !26
  %233 = load i64, ptr %22, align 8, !tbaa !9
  %234 = load ptr, ptr %10, align 8, !tbaa !5
  call void %230(ptr noundef %232, i64 noundef %233, ptr noundef %234)
  br label %235

235:                                              ; preds = %229, %226
  %236 = load i64, ptr %16, align 8, !tbaa !9
  store i64 %236, ptr %15, align 8, !tbaa !9
  %237 = load i64, ptr %16, align 8, !tbaa !9
  %238 = add i64 %237, 1
  store i64 %238, ptr %16, align 8, !tbaa !9
  store i8 1, ptr %14, align 1, !tbaa !17
  store i8 1, ptr %17, align 1, !tbaa !17
  %239 = load i64, ptr %15, align 8, !tbaa !9
  %240 = load i64, ptr %9, align 8, !tbaa !9
  %241 = sub i64 %240, 1
  %242 = icmp uge i64 %239, %241
  br i1 %242, label %243, label %244

243:                                              ; preds = %235
  store i8 0, ptr %17, align 1, !tbaa !17
  store i32 3, ptr %21, align 4
  br label %245

244:                                              ; preds = %235
  store i32 0, ptr %21, align 4
  br label %245

245:                                              ; preds = %244, %243
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %246

246:                                              ; preds = %245, %124
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  %247 = load i32, ptr %21, align 4
  switch i32 %247, label %287 [
    i32 0, label %248
    i32 2, label %57
    i32 3, label %253
  ]

248:                                              ; preds = %246
  br label %252

249:                                              ; preds = %72
  %250 = load i64, ptr %16, align 8, !tbaa !9
  %251 = add i64 %250, 1
  store i64 %251, ptr %16, align 8, !tbaa !9
  store i8 0, ptr %14, align 1, !tbaa !17
  br label %252

252:                                              ; preds = %249, %248
  br label %57, !llvm.loop !31

253:                                              ; preds = %246, %57
  %254 = load i8, ptr %17, align 1, !tbaa !17, !range !19, !noundef !20
  %255 = trunc i8 %254 to i1
  br i1 %255, label %256, label %284

256:                                              ; preds = %253
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %257 = load i64, ptr %16, align 8, !tbaa !9
  %258 = load i64, ptr %15, align 8, !tbaa !9
  %259 = sub i64 %257, %258
  store i64 %259, ptr %27, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  store i64 0, ptr %28, align 8, !tbaa !9
  br label %260

260:                                              ; preds = %275, %256
  %261 = load i64, ptr %28, align 8, !tbaa !9
  %262 = load i64, ptr %27, align 8, !tbaa !9
  %263 = icmp ult i64 %261, %262
  br i1 %263, label %265, label %264

264:                                              ; preds = %260
  store i32 10, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  br label %278

265:                                              ; preds = %260
  %266 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 3
  %267 = load ptr, ptr %266, align 8, !tbaa !15
  %268 = load i64, ptr %15, align 8, !tbaa !9
  %269 = add i64 %268, 1
  store i64 %269, ptr %15, align 8, !tbaa !9
  %270 = getelementptr inbounds %struct.Point, ptr %267, i64 %268
  %271 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 1
  %272 = load ptr, ptr %271, align 8, !tbaa !26
  %273 = load i64, ptr %28, align 8, !tbaa !9
  %274 = getelementptr inbounds %struct.Point, ptr %272, i64 %273
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %274, ptr align 4 %270, i64 8, i1 false), !tbaa.struct !27
  br label %275

275:                                              ; preds = %265
  %276 = load i64, ptr %28, align 8, !tbaa !9
  %277 = add i64 %276, 1
  store i64 %277, ptr %28, align 8, !tbaa !9
  br label %260, !llvm.loop !32

278:                                              ; preds = %264
  %279 = load ptr, ptr %11, align 8, !tbaa !5
  %280 = getelementptr inbounds %class.LineSplitter, ptr %29, i32 0, i32 1
  %281 = load ptr, ptr %280, align 8, !tbaa !26
  %282 = load i64, ptr %27, align 8, !tbaa !9
  %283 = load ptr, ptr %10, align 8, !tbaa !5
  call void %279(ptr noundef %281, i64 noundef %282, ptr noundef %283)
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br label %284

284:                                              ; preds = %278, %253
  store i1 true, ptr %6, align 1
  store i32 1, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %285

285:                                              ; preds = %284, %33
  %286 = load i1, ptr %6, align 1
  ret i1 %286

287:                                              ; preds = %246
  unreachable
}

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN12LineSplitter14_reservePointsEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #3 align 2

; Function Attrs: nounwind allocsize(1)
declare ptr @realloc(ptr noundef, i64 noundef) #4

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTS12LineSplitter", !13, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !10, i64 32}
!15 = !{!12, !6, i64 24}
!16 = !{!13, !13, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!22, !13, i64 0}
!22 = !{!"_ZTS5Point", !13, i64 0, !13, i64 4}
!23 = !{!22, !13, i64 4}
!24 = !{!25, !25, i64 0}
!25 = !{!"_ZTSN12LineSplitter8PositionE", !7, i64 0}
!26 = !{!12, !6, i64 8}
!27 = !{i64 0, i64 4, !16, i64 4, i64 4, !16}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}
!31 = distinct !{!31, !29}
!32 = distinct !{!32, !29}


; 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 { i32, i32 }

; 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 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 noundef i32 @_Z18getGridIdFromPointPK5Pointi(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN12LineSplitter13getCrosspointEjPK5PointS2_PS0_(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN12LineSplitter18getRelativeGridPosEjj(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN12LineSplitter14generateGridIdEjPK5PointNS_8PositionE(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN12LineSplitter5splitEPK5PointmPvPFvS2_mS3_E(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr nocapture noundef readonly %1, i64 noundef %2, ptr noundef %3, ptr nocapture noundef readonly %4) local_unnamed_addr #2 align 2 {
  %6 = alloca %struct.Point, align 8
  %7 = load i32, ptr %0, align 8, !tbaa !5
  %8 = icmp ne i32 %7, 0
  br i1 %8, label %9, label %.loopexit128

9:                                                ; preds = %5
  tail call void @_ZN12LineSplitter14_reservePointsEm(ptr noundef nonnull align 8 dereferenceable(40) %0, i64 noundef %2)
  %10 = getelementptr inbounds i8, ptr %0, i64 32
  %11 = load i64, ptr %10, align 8, !tbaa !12
  %12 = icmp ult i64 %11, %2
  %13 = getelementptr inbounds i8, ptr %0, i64 24
  %14 = load ptr, ptr %13, align 8, !tbaa !13
  %15 = shl i64 %2, 3
  br i1 %12, label %16, label %._crit_edge215

16:                                               ; preds = %9
  %17 = tail call ptr @realloc(ptr noundef %14, i64 noundef %15) #6
  store ptr %17, ptr %13, align 8, !tbaa !13
  store i64 %2, ptr %10, align 8, !tbaa !12
  br label %._crit_edge215

._crit_edge215:                                   ; preds = %9, %16
  %18 = phi ptr [ %17, %16 ], [ %14, %9 ]
  %19 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %1, i64 %15, i1 false)
  %.not127184 = icmp ugt i64 %2, 1
  br i1 %.not127184, label %.lr.ph.lr.ph, label %.lr.ph196

.lr.ph.lr.ph:                                     ; preds = %._crit_edge215
  %20 = getelementptr inbounds i8, ptr %6, i64 4
  %21 = getelementptr inbounds i8, ptr %0, i64 8
  %22 = add i64 %2, -1
  br label %.lr.ph.split.us.preheader

.lr.ph.split.us.preheader:                        ; preds = %.outer, %.lr.ph.lr.ph
  %.080.ph188 = phi i32 [ 0, %.lr.ph.lr.ph ], [ %.181143, %.outer ]
  %.086.ph187 = phi i64 [ 1, %.lr.ph.lr.ph ], [ %.389, %.outer ]
  %.091.ph186 = phi i64 [ 0, %.lr.ph.lr.ph ], [ %.293, %.outer ]
  %.096.ph185 = phi i1 [ true, %.lr.ph.lr.ph ], [ %.not139, %.outer ]
  %23 = add i64 %.086.ph187, -1
  %.pre219 = load ptr, ptr %19, align 8, !tbaa !13
  %.pre223 = load i32, ptr %0, align 8, !tbaa !5
  br i1 %.096.ph185, label %24, label %27

24:                                               ; preds = %.lr.ph.split.us.preheader
  %25 = getelementptr inbounds %struct.Point, ptr %.pre219, i64 %.091.ph186
  %26 = call noundef i32 @_Z18getGridIdFromPointPK5Pointi(ptr noundef %25, i32 noundef %.pre223)
  %.pre218 = load ptr, ptr %19, align 8, !tbaa !13
  %.pre222 = load i32, ptr %0, align 8, !tbaa !5
  br label %27

27:                                               ; preds = %24, %.lr.ph.split.us.preheader
  %28 = phi i32 [ %.pre222, %24 ], [ %.pre223, %.lr.ph.split.us.preheader ]
  %29 = phi ptr [ %.pre218, %24 ], [ %.pre219, %.lr.ph.split.us.preheader ]
  %.181.us.peel = phi i32 [ %26, %24 ], [ %.080.ph188, %.lr.ph.split.us.preheader ]
  %30 = getelementptr inbounds %struct.Point, ptr %29, i64 %.086.ph187
  %31 = call noundef i32 @_Z18getGridIdFromPointPK5Pointi(ptr noundef %30, i32 noundef %28)
  %.not.us.peel.not = icmp eq i32 %31, %.181.us.peel
  br i1 %.not.us.peel.not, label %.outer, label %32

32:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %33 = load ptr, ptr %19, align 8, !tbaa !13
  %34 = getelementptr inbounds %struct.Point, ptr %33, i64 %23
  %35 = getelementptr inbounds %struct.Point, ptr %33, i64 %.086.ph187
  %36 = call noundef i32 @_ZN12LineSplitter13getCrosspointEjPK5PointS2_PS0_(ptr noundef nonnull align 8 dereferenceable(40) %0, i32 noundef %.181.us.peel, ptr noundef %34, ptr noundef %35, ptr noundef nonnull %6)
  %37 = load ptr, ptr %19, align 8, !tbaa !13
  %38 = getelementptr inbounds %struct.Point, ptr %37, i64 %23
  %39 = load i32, ptr %38, align 4, !tbaa !14
  %40 = load i32, ptr %6, align 8, !tbaa !14
  %41 = icmp eq i32 %39, %40
  br i1 %41, label %42, label %.thread111

42:                                               ; preds = %32
  %43 = getelementptr inbounds i8, ptr %38, i64 4
  %44 = load i32, ptr %43, align 4, !tbaa !16
  %45 = load i32, ptr %20, align 4, !tbaa !16
  %46 = icmp eq i32 %44, %45
  %cond.fr.us.peel = freeze i1 %46
  %brmerge.demorgan.us.peel = and i1 %.096.ph185, %cond.fr.us.peel
  br i1 %brmerge.demorgan.us.peel, label %47, label %.split163.us

47:                                               ; preds = %42
  %48 = call noundef i32 @_ZN12LineSplitter18getRelativeGridPosEjj(ptr noundef nonnull align 8 dereferenceable(40) %0, i32 noundef %31, i32 noundef %.181.us.peel)
  %49 = load ptr, ptr %19, align 8, !tbaa !13
  %50 = getelementptr inbounds %struct.Point, ptr %49, i64 %23
  %51 = call noundef i32 @_ZN12LineSplitter14generateGridIdEjPK5PointNS_8PositionE(ptr noundef nonnull align 8 dereferenceable(40) %0, i32 noundef %.181.us.peel, ptr noundef %50, i32 noundef %48)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %.pre220.pre = load ptr, ptr %19, align 8, !tbaa !13
  %.pre221.pre = load i32, ptr %0, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.Point, ptr %.pre220.pre, i64 %.086.ph187
  %53 = call noundef i32 @_Z18getGridIdFromPointPK5Pointi(ptr noundef %52, i32 noundef %.pre221.pre)
  %.not.us.not = icmp eq i32 %53, %51
  br i1 %.not.us.not, label %.outer, label %54

54:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %55 = load ptr, ptr %19, align 8, !tbaa !13
  %56 = getelementptr inbounds %struct.Point, ptr %55, i64 %23
  %57 = getelementptr inbounds %struct.Point, ptr %55, i64 %.086.ph187
  %58 = call noundef i32 @_ZN12LineSplitter13getCrosspointEjPK5PointS2_PS0_(ptr noundef nonnull align 8 dereferenceable(40) %0, i32 noundef %51, ptr noundef %56, ptr noundef %57, ptr noundef nonnull %6)
  %59 = load ptr, ptr %19, align 8, !tbaa !13
  %60 = getelementptr inbounds %struct.Point, ptr %59, i64 %23
  %61 = load i32, ptr %60, align 4, !tbaa !14
  %62 = load i32, ptr %6, align 8, !tbaa !14
  %63 = icmp eq i32 %61, %62
  br i1 %63, label %.split163.us.loopexit.loopexit, label %.thread111

.thread111:                                       ; preds = %32, %54
  %.181.us.lcssa201 = phi i32 [ %.181.us.peel, %32 ], [ %51, %54 ]
  %reass.sub = sub i64 %.086.ph187, %.091.ph186
  %64 = add i64 %reass.sub, 1
  br label %71

.split163.us.loopexit.loopexit:                   ; preds = %54
  %65 = getelementptr inbounds i8, ptr %60, i64 4
  %66 = load i32, ptr %65, align 4, !tbaa !16
  %67 = load i32, ptr %20, align 4, !tbaa !16
  %68 = icmp eq i32 %66, %67
  %cond.fr.us = freeze i1 %68
  br label %.split163.us

.split163.us:                                     ; preds = %42, %.split163.us.loopexit.loopexit
  %cond.fr.us.lcssa = phi i1 [ %cond.fr.us.peel, %42 ], [ %cond.fr.us, %.split163.us.loopexit.loopexit ]
  %.181.us.lcssa202 = phi i32 [ %.181.us.peel, %42 ], [ %51, %.split163.us.loopexit.loopexit ]
  %69 = sub i64 %.086.ph187, %.091.ph186
  %not.cond.fr = xor i1 %cond.fr.us.lcssa, true
  %70 = zext i1 %not.cond.fr to i64
  %spec.select = add i64 %69, %70
  br label %71

71:                                               ; preds = %.split163.us, %.thread111
  %.181144 = phi i32 [ %.181.us.lcssa201, %.thread111 ], [ %.181.us.lcssa202, %.split163.us ]
  %72 = phi i1 [ false, %.thread111 ], [ %cond.fr.us.lcssa, %.split163.us ]
  %73 = phi i64 [ %64, %.thread111 ], [ %spec.select, %.split163.us ]
  call void @_ZN12LineSplitter14_reservePointsEm(ptr noundef nonnull align 8 dereferenceable(40) %0, i64 noundef %73)
  %74 = load ptr, ptr %19, align 8, !tbaa !13
  %75 = getelementptr inbounds %struct.Point, ptr %74, i64 %.086.ph187
  %76 = load i32, ptr %75, align 4, !tbaa !14
  %77 = load i32, ptr %6, align 8, !tbaa !14
  %78 = icmp eq i32 %76, %77
  br i1 %78, label %79, label %84

79:                                               ; preds = %71
  %80 = getelementptr inbounds i8, ptr %75, i64 4
  %81 = load i32, ptr %80, align 4, !tbaa !16
  %82 = load i32, ptr %20, align 4, !tbaa !16
  %83 = icmp eq i32 %81, %82
  br i1 %83, label %.preheader, label %84

.preheader:                                       ; preds = %79
  %.not103180 = icmp ugt i64 %.091.ph186, %.086.ph187
  br i1 %.not103180, label %.loopexit, label %.lr.ph183

84:                                               ; preds = %79, %71
  %85 = icmp ult i64 %.091.ph186, %.086.ph187
  br i1 %85, label %.lr.ph179.preheader, label %._crit_edge

.lr.ph179.preheader:                              ; preds = %84
  %86 = sub i64 %.086.ph187, %.091.ph186
  %.neg = add i64 %.091.ph186, 1
  %xtraiter = and i64 %86, 1
  %87 = icmp eq i64 %.086.ph187, %.neg
  br i1 %87, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph179.preheader.new

.lr.ph179.preheader.new:                          ; preds = %.lr.ph179.preheader
  %unroll_iter = and i64 %86, -2
  br label %.lr.ph179

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph179, %.lr.ph179.preheader
  %.076178.unr = phi i64 [ 0, %.lr.ph179.preheader ], [ %106, %.lr.ph179 ]
  %.077177.unr = phi i64 [ %.091.ph186, %.lr.ph179.preheader ], [ %105, %.lr.ph179 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph179.epil

.lr.ph179.epil:                                   ; preds = %._crit_edge.loopexit.unr-lcssa
  %88 = load ptr, ptr %19, align 8, !tbaa !13
  %89 = getelementptr inbounds %struct.Point, ptr %88, i64 %.077177.unr
  %90 = load ptr, ptr %21, align 8, !tbaa !17
  %91 = getelementptr inbounds %struct.Point, ptr %90, i64 %.076178.unr
  %92 = load i64, ptr %89, align 4
  store i64 %92, ptr %91, align 4
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph179.epil, %._crit_edge.loopexit.unr-lcssa, %84
  br i1 %72, label %.loopexit, label %107

.lr.ph179:                                        ; preds = %.lr.ph179, %.lr.ph179.preheader.new
  %.076178 = phi i64 [ 0, %.lr.ph179.preheader.new ], [ %106, %.lr.ph179 ]
  %.077177 = phi i64 [ %.091.ph186, %.lr.ph179.preheader.new ], [ %105, %.lr.ph179 ]
  %niter = phi i64 [ 0, %.lr.ph179.preheader.new ], [ %niter.next.1, %.lr.ph179 ]
  %93 = load ptr, ptr %19, align 8, !tbaa !13
  %94 = getelementptr inbounds %struct.Point, ptr %93, i64 %.077177
  %95 = load ptr, ptr %21, align 8, !tbaa !17
  %96 = getelementptr inbounds %struct.Point, ptr %95, i64 %.076178
  %97 = load i64, ptr %94, align 4
  store i64 %97, ptr %96, align 4
  %98 = or disjoint i64 %.076178, 1
  %99 = load ptr, ptr %19, align 8, !tbaa !13
  %100 = getelementptr %struct.Point, ptr %99, i64 %.077177
  %101 = getelementptr i8, ptr %100, i64 8
  %102 = load ptr, ptr %21, align 8, !tbaa !17
  %103 = getelementptr inbounds %struct.Point, ptr %102, i64 %98
  %104 = load i64, ptr %101, align 4
  store i64 %104, ptr %103, align 4
  %105 = add nuw i64 %.077177, 2
  %106 = add i64 %.076178, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph179, !llvm.loop !18

107:                                              ; preds = %._crit_edge
  %108 = load ptr, ptr %21, align 8, !tbaa !17
  %109 = getelementptr %struct.Point, ptr %108, i64 %73
  %110 = getelementptr i8, ptr %109, i64 -8
  %111 = load i64, ptr %6, align 8
  store i64 %111, ptr %110, align 4
  %112 = load ptr, ptr %19, align 8, !tbaa !13
  %113 = getelementptr inbounds %struct.Point, ptr %112, i64 %23
  %114 = load i64, ptr %6, align 8
  store i64 %114, ptr %113, align 4
  br label %.loopexit

.lr.ph183:                                        ; preds = %.preheader, %.lr.ph183
  %.074182 = phi i64 [ %121, %.lr.ph183 ], [ 0, %.preheader ]
  %.075181 = phi i64 [ %120, %.lr.ph183 ], [ %.091.ph186, %.preheader ]
  %115 = load ptr, ptr %19, align 8, !tbaa !13
  %116 = getelementptr inbounds %struct.Point, ptr %115, i64 %.075181
  %117 = load ptr, ptr %21, align 8, !tbaa !17
  %118 = getelementptr inbounds %struct.Point, ptr %117, i64 %.074182
  %119 = load i64, ptr %116, align 4
  store i64 %119, ptr %118, align 4
  %120 = add i64 %.075181, 1
  %121 = add i64 %.074182, 1
  %.not103 = icmp ugt i64 %120, %.086.ph187
  br i1 %.not103, label %.loopexit, label %.lr.ph183, !llvm.loop !20

.loopexit:                                        ; preds = %.lr.ph183, %.preheader, %._crit_edge, %107
  %.187 = phi i64 [ %23, %107 ], [ %23, %._crit_edge ], [ %.086.ph187, %.preheader ], [ %.086.ph187, %.lr.ph183 ]
  %122 = icmp ugt i64 %73, 1
  br i1 %122, label %123, label %125

123:                                              ; preds = %.loopexit
  %124 = load ptr, ptr %21, align 8, !tbaa !17
  call void %4(ptr noundef %124, i64 noundef %73, ptr noundef %3)
  br label %125

125:                                              ; preds = %123, %.loopexit
  %.not104 = icmp ult i64 %.187, %22
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br i1 %.not104, label %.outer, label %.loopexit128

.outer:                                           ; preds = %47, %27, %125
  %.181143 = phi i32 [ %.181144, %125 ], [ %.181.us.peel, %27 ], [ %51, %47 ]
  %.not139 = phi i1 [ true, %125 ], [ false, %27 ], [ false, %47 ]
  %.293 = phi i64 [ %.187, %125 ], [ %.091.ph186, %27 ], [ %.091.ph186, %47 ]
  %.389.in = phi i64 [ %.187, %125 ], [ %.086.ph187, %27 ], [ %.086.ph187, %47 ]
  %.389 = add i64 %.389.in, 1
  %.not127 = icmp ult i64 %.389, %2
  br i1 %.not127, label %.lr.ph.split.us.preheader, label %126, !llvm.loop !21

126:                                              ; preds = %.outer
  %127 = sub i64 %.389, %.293
  %.not198 = icmp eq i64 %.389, %.293
  br i1 %.not198, label %._crit_edge197, label %.lr.ph196

.lr.ph196:                                        ; preds = %._crit_edge215, %126
  %128 = phi i64 [ %127, %126 ], [ 1, %._crit_edge215 ]
  %.394.ph233 = phi i64 [ %.293, %126 ], [ 0, %._crit_edge215 ]
  %129 = getelementptr inbounds i8, ptr %0, i64 8
  %xtraiter234 = and i64 %128, 1
  %130 = icmp eq i64 %128, 1
  br i1 %130, label %._crit_edge197.loopexit.unr-lcssa, label %.lr.ph196.new

.lr.ph196.new:                                    ; preds = %.lr.ph196
  %unroll_iter236 = and i64 %128, -2
  br label %139

._crit_edge197.loopexit.unr-lcssa:                ; preds = %139, %.lr.ph196
  %.0194.unr = phi i64 [ 0, %.lr.ph196 ], [ %153, %139 ]
  %.495193.unr = phi i64 [ %.394.ph233, %.lr.ph196 ], [ %147, %139 ]
  %lcmp.mod235.not = icmp eq i64 %xtraiter234, 0
  br i1 %lcmp.mod235.not, label %._crit_edge197, label %._crit_edge197.loopexit.epilog-lcssa

._crit_edge197.loopexit.epilog-lcssa:             ; preds = %._crit_edge197.loopexit.unr-lcssa
  %131 = load ptr, ptr %19, align 8, !tbaa !13
  %132 = getelementptr inbounds %struct.Point, ptr %131, i64 %.495193.unr
  %133 = load ptr, ptr %129, align 8, !tbaa !17
  %134 = getelementptr inbounds %struct.Point, ptr %133, i64 %.0194.unr
  %135 = load i64, ptr %132, align 4
  store i64 %135, ptr %134, align 4
  br label %._crit_edge197

._crit_edge197:                                   ; preds = %._crit_edge197.loopexit.epilog-lcssa, %._crit_edge197.loopexit.unr-lcssa, %126
  %136 = phi i64 [ %127, %126 ], [ %128, %._crit_edge197.loopexit.unr-lcssa ], [ %128, %._crit_edge197.loopexit.epilog-lcssa ]
  %137 = getelementptr inbounds i8, ptr %0, i64 8
  %138 = load ptr, ptr %137, align 8, !tbaa !17
  call void %4(ptr noundef %138, i64 noundef %136, ptr noundef %3)
  br label %.loopexit128

139:                                              ; preds = %139, %.lr.ph196.new
  %.0194 = phi i64 [ 0, %.lr.ph196.new ], [ %153, %139 ]
  %.495193 = phi i64 [ %.394.ph233, %.lr.ph196.new ], [ %147, %139 ]
  %niter237 = phi i64 [ 0, %.lr.ph196.new ], [ %niter237.next.1, %139 ]
  %140 = load ptr, ptr %19, align 8, !tbaa !13
  %141 = getelementptr inbounds %struct.Point, ptr %140, i64 %.495193
  %142 = load ptr, ptr %129, align 8, !tbaa !17
  %143 = getelementptr inbounds %struct.Point, ptr %142, i64 %.0194
  %144 = load i64, ptr %141, align 4
  store i64 %144, ptr %143, align 4
  %145 = or disjoint i64 %.0194, 1
  %146 = load ptr, ptr %19, align 8, !tbaa !13
  %147 = add i64 %.495193, 2
  %148 = getelementptr %struct.Point, ptr %146, i64 %.495193
  %149 = getelementptr i8, ptr %148, i64 8
  %150 = load ptr, ptr %129, align 8, !tbaa !17
  %151 = getelementptr inbounds %struct.Point, ptr %150, i64 %145
  %152 = load i64, ptr %149, align 4
  store i64 %152, ptr %151, align 4
  %153 = add nuw i64 %.0194, 2
  %niter237.next.1 = add i64 %niter237, 2
  %niter237.ncmp.1 = icmp eq i64 %niter237.next.1, %unroll_iter236
  br i1 %niter237.ncmp.1, label %._crit_edge197.loopexit.unr-lcssa, label %139, !llvm.loop !22

.loopexit128:                                     ; preds = %125, %._crit_edge197, %5
  ret i1 %8
}

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN12LineSplitter14_reservePointsEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias noundef ptr @realloc(ptr allocptr nocapture noundef, i64 noundef) local_unnamed_addr #4

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTS12LineSplitter", !7, i64 0, !10, i64 8, !11, i64 16, !10, i64 24, !11, i64 32}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!6, !11, i64 32}
!13 = !{!6, !10, i64 24}
!14 = !{!15, !7, i64 0}
!15 = !{!"_ZTS5Point", !7, i64 0, !7, i64 4}
!16 = !{!15, !7, i64 4}
!17 = !{!6, !10, i64 8}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass