; LLVM IR from tangjz/acm-icpc :: hdu (6080)

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

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@g = external dso_local global [501 x [501 x i8]], align 16
@vis = external dso_local global [501 x [501 x i8]], align 16
@a = external dso_local global [501 x %struct.Point], align 16
@b = external dso_local global [501 x %struct.Point], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i8, align 1
  %11 = alloca i32, align 4
  %12 = alloca %struct.Point, align 4
  %13 = alloca %struct.Point, align 4
  %14 = alloca %struct.Point, align 4
  %15 = alloca %struct.Point, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %struct.Point, align 4
  %20 = alloca %struct.Point, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  br label %25

25:                                               ; preds = %358, %356, %0
  %26 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  %27 = icmp eq i32 %26, 1
  br i1 %27, label %28, label %359

28:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %29

29:                                               ; preds = %38, %28
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = load i32, ptr @n, align 4, !tbaa !5
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %41

34:                                               ; preds = %29
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [501 x %struct.Point], ptr @a, i64 0, i64 %36
  call void @_ZN5Point4readEv(ptr noundef nonnull align 4 dereferenceable(8) %37)
  br label %38

38:                                               ; preds = %34
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %2, align 4, !tbaa !5
  br label %29, !llvm.loop !9

41:                                               ; preds = %33
  %42 = load i32, ptr @n, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds %struct.Point, ptr @a, i64 %43
  call void @_ZSt4sortIP5PointEvT_S2_(ptr noundef @a, ptr noundef %44)
  %45 = load i32, ptr @n, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds %struct.Point, ptr @a, i64 %46
  %48 = call noundef ptr @_ZSt6uniqueIP5PointET_S2_S2_(ptr noundef @a, ptr noundef %47)
  %49 = ptrtoint ptr %48 to i64
  %50 = sub i64 %49, ptrtoint (ptr @a to i64)
  %51 = sdiv exact i64 %50, 8
  %52 = trunc i64 %51 to i32
  store i32 %52, ptr @n, align 4, !tbaa !5
  %53 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  %54 = load i32, ptr @m, align 4, !tbaa !5
  store i32 %54, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %64, %41
  %56 = load i32, ptr %4, align 4, !tbaa !5
  %57 = load i32, ptr @m, align 4, !tbaa !5
  %58 = icmp slt i32 %56, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %67

60:                                               ; preds = %55
  %61 = load i32, ptr %4, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [501 x %struct.Point], ptr @b, i64 0, i64 %62
  call void @_ZN5Point4readEv(ptr noundef nonnull align 4 dereferenceable(8) %63)
  br label %64

64:                                               ; preds = %60
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %4, align 4, !tbaa !5
  br label %55, !llvm.loop !11

67:                                               ; preds = %59
  %68 = load i32, ptr @m, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds %struct.Point, ptr @b, i64 %69
  call void @_ZSt4sortIP5PointEvT_S2_(ptr noundef @b, ptr noundef %70)
  %71 = load i32, ptr @m, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds %struct.Point, ptr @b, i64 %72
  %74 = call noundef ptr @_ZSt6uniqueIP5PointET_S2_S2_(ptr noundef @b, ptr noundef %73)
  %75 = ptrtoint ptr %74 to i64
  %76 = sub i64 %75, ptrtoint (ptr @b to i64)
  %77 = sdiv exact i64 %76, 8
  %78 = trunc i64 %77 to i32
  store i32 %78, ptr @m, align 4, !tbaa !5
  %79 = load i32, ptr @n, align 4, !tbaa !5
  %80 = icmp eq i32 %79, 1
  br i1 %80, label %81, label %108

81:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %93, %81
  %83 = load i32, ptr %5, align 4, !tbaa !5
  %84 = load i32, ptr @m, align 4, !tbaa !5
  %85 = icmp slt i32 %83, %84
  br i1 %85, label %86, label %96

86:                                               ; preds = %82
  %87 = load i32, ptr %5, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [501 x %struct.Point], ptr @b, i64 0, i64 %88
  %90 = call noundef zeroext i1 @_ZNK5PointeqERKS_(ptr noundef nonnull align 4 dereferenceable(8) @a, ptr noundef nonnull align 4 dereferenceable(8) %89)
  br i1 %90, label %91, label %92

91:                                               ; preds = %86
  br label %96

92:                                               ; preds = %86
  br label %93

93:                                               ; preds = %92
  %94 = load i32, ptr %5, align 4, !tbaa !5
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %5, align 4, !tbaa !5
  br label %82, !llvm.loop !12

96:                                               ; preds = %91, %82
  %97 = load i32, ptr %5, align 4, !tbaa !5
  %98 = load i32, ptr @m, align 4, !tbaa !5
  %99 = icmp slt i32 %97, %98
  br i1 %99, label %100, label %104

100:                                              ; preds = %96
  %101 = load i32, ptr %3, align 4, !tbaa !5
  %102 = sub nsw i32 %101, 1
  %103 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %102)
  store i32 2, ptr %6, align 4
  br label %105, !llvm.loop !13

104:                                              ; preds = %96
  store i32 0, ptr %6, align 4
  br label %105

105:                                              ; preds = %104, %100
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  %106 = load i32, ptr %6, align 4
  switch i32 %106, label %356 [
    i32 0, label %107
  ]

107:                                              ; preds = %105
  br label %108

108:                                              ; preds = %107, %67
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #7
  store i8 0, ptr %7, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %109

109:                                              ; preds = %205, %108
  %110 = load i32, ptr %8, align 4, !tbaa !5
  %111 = load i32, ptr @m, align 4, !tbaa !5
  %112 = icmp slt i32 %110, %111
  br i1 %112, label %113, label %117

113:                                              ; preds = %109
  %114 = load i8, ptr %7, align 1, !tbaa !14, !range !16, !noundef !17
  %115 = trunc i8 %114 to i1
  %116 = xor i1 %115, true
  br label %117

117:                                              ; preds = %113, %109
  %118 = phi i1 [ false, %109 ], [ %116, %113 ]
  br i1 %118, label %120, label %119

119:                                              ; preds = %117
  store i32 13, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %208

120:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %121 = load i32, ptr %8, align 4, !tbaa !5
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %9, align 4, !tbaa !5
  br label %123

123:                                              ; preds = %201, %120
  %124 = load i32, ptr %9, align 4, !tbaa !5
  %125 = load i32, ptr @m, align 4, !tbaa !5
  %126 = icmp slt i32 %124, %125
  br i1 %126, label %127, label %131

127:                                              ; preds = %123
  %128 = load i8, ptr %7, align 1, !tbaa !14, !range !16, !noundef !17
  %129 = trunc i8 %128 to i1
  %130 = xor i1 %129, true
  br label %131

131:                                              ; preds = %127, %123
  %132 = phi i1 [ false, %123 ], [ %130, %127 ]
  br i1 %132, label %134, label %133

133:                                              ; preds = %131
  store i32 16, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %204

134:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #7
  store i8 1, ptr %10, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %135

135:                                              ; preds = %188, %134
  %136 = load i32, ptr %11, align 4, !tbaa !5
  %137 = load i32, ptr @n, align 4, !tbaa !5
  %138 = icmp slt i32 %136, %137
  br i1 %138, label %139, label %142

139:                                              ; preds = %135
  %140 = load i8, ptr %10, align 1, !tbaa !14, !range !16, !noundef !17
  %141 = trunc i8 %140 to i1
  br label %142

142:                                              ; preds = %139, %135
  %143 = phi i1 [ false, %135 ], [ %141, %139 ]
  br i1 %143, label %145, label %144

144:                                              ; preds = %142
  store i32 19, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %191

145:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %146 = load i32, ptr %9, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [501 x %struct.Point], ptr @b, i64 0, i64 %147
  %149 = load i32, ptr %8, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [501 x %struct.Point], ptr @b, i64 0, i64 %150
  %152 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %148, ptr noundef nonnull align 4 dereferenceable(8) %151)
  store i64 %152, ptr %12, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %153 = load i32, ptr %11, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [501 x %struct.Point], ptr @a, i64 0, i64 %154
  %156 = load i32, ptr %8, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [501 x %struct.Point], ptr @b, i64 0, i64 %157
  %159 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %155, ptr noundef nonnull align 4 dereferenceable(8) %158)
  store i64 %159, ptr %13, align 4
  %160 = call noundef i32 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(8) %13)
  %161 = icmp ne i32 %160, 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  br i1 %161, label %179, label %162

162:                                              ; preds = %145
  %163 = load i32, ptr %8, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [501 x %struct.Point], ptr @b, i64 0, i64 %164
  %166 = load i32, ptr %11, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [501 x %struct.Point], ptr @a, i64 0, i64 %167
  %169 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %165, ptr noundef nonnull align 4 dereferenceable(8) %168)
  store i64 %169, ptr %14, align 4
  %170 = load i32, ptr %9, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [501 x %struct.Point], ptr @b, i64 0, i64 %171
  %173 = load i32, ptr %11, align 4, !tbaa !5
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [501 x %struct.Point], ptr @a, i64 0, i64 %174
  %176 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %172, ptr noundef nonnull align 4 dereferenceable(8) %175)
  store i64 %176, ptr %15, align 4
  %177 = call noundef i32 @_ZNK5Point3dotERKS_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(8) %15)
  %178 = icmp sle i32 %177, 0
  br label %179

179:                                              ; preds = %162, %145
  %180 = phi i1 [ false, %145 ], [ %178, %162 ]
  %181 = zext i1 %180 to i32
  %182 = load i8, ptr %10, align 1, !tbaa !14, !range !16, !noundef !17
  %183 = trunc i8 %182 to i1
  %184 = zext i1 %183 to i32
  %185 = and i32 %184, %181
  %186 = icmp ne i32 %185, 0
  %187 = zext i1 %186 to i8
  store i8 %187, ptr %10, align 1, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %188

188:                                              ; preds = %179
  %189 = load i32, ptr %11, align 4, !tbaa !5
  %190 = add nsw i32 %189, 1
  store i32 %190, ptr %11, align 4, !tbaa !5
  br label %135, !llvm.loop !18

191:                                              ; preds = %144
  %192 = load i8, ptr %10, align 1, !tbaa !14, !range !16, !noundef !17
  %193 = trunc i8 %192 to i1
  %194 = zext i1 %193 to i32
  %195 = load i8, ptr %7, align 1, !tbaa !14, !range !16, !noundef !17
  %196 = trunc i8 %195 to i1
  %197 = zext i1 %196 to i32
  %198 = or i32 %197, %194
  %199 = icmp ne i32 %198, 0
  %200 = zext i1 %199 to i8
  store i8 %200, ptr %7, align 1, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #7
  br label %201

201:                                              ; preds = %191
  %202 = load i32, ptr %9, align 4, !tbaa !5
  %203 = add nsw i32 %202, 1
  store i32 %203, ptr %9, align 4, !tbaa !5
  br label %123, !llvm.loop !19

204:                                              ; preds = %133
  br label %205

205:                                              ; preds = %204
  %206 = load i32, ptr %8, align 4, !tbaa !5
  %207 = add nsw i32 %206, 1
  store i32 %207, ptr %8, align 4, !tbaa !5
  br label %109, !llvm.loop !20

208:                                              ; preds = %119
  %209 = load i8, ptr %7, align 1, !tbaa !14, !range !16, !noundef !17
  %210 = trunc i8 %209 to i1
  br i1 %210, label %211, label %215

211:                                              ; preds = %208
  %212 = load i32, ptr %3, align 4, !tbaa !5
  %213 = sub nsw i32 %212, 2
  %214 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %213)
  store i32 2, ptr %6, align 4
  br label %216, !llvm.loop !13

215:                                              ; preds = %208
  store i32 0, ptr %6, align 4
  br label %216

216:                                              ; preds = %215, %211
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #7
  %217 = load i32, ptr %6, align 4
  switch i32 %217, label %356 [
    i32 0, label %218
  ]

218:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %219

219:                                              ; preds = %301, %218
  %220 = load i32, ptr %16, align 4, !tbaa !5
  %221 = load i32, ptr @m, align 4, !tbaa !5
  %222 = icmp slt i32 %220, %221
  br i1 %222, label %224, label %223

223:                                              ; preds = %219
  store i32 22, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %304

224:                                              ; preds = %219
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %225

225:                                              ; preds = %297, %224
  %226 = load i32, ptr %17, align 4, !tbaa !5
  %227 = load i32, ptr @m, align 4, !tbaa !5
  %228 = icmp slt i32 %226, %227
  br i1 %228, label %230, label %229

229:                                              ; preds = %225
  store i32 25, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %300

230:                                              ; preds = %225
  %231 = load i32, ptr %16, align 4, !tbaa !5
  %232 = load i32, ptr %17, align 4, !tbaa !5
  %233 = icmp ne i32 %231, %232
  %234 = load i32, ptr %16, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [501 x [501 x i8]], ptr @g, i64 0, i64 %235
  %237 = load i32, ptr %17, align 4, !tbaa !5
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds [501 x i8], ptr %236, i64 0, i64 %238
  %240 = zext i1 %233 to i8
  store i8 %240, ptr %239, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %241

241:                                              ; preds = %287, %230
  %242 = load i32, ptr %18, align 4, !tbaa !5
  %243 = load i32, ptr @n, align 4, !tbaa !5
  %244 = icmp slt i32 %242, %243
  br i1 %244, label %245, label %254

245:                                              ; preds = %241
  %246 = load i32, ptr %16, align 4, !tbaa !5
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds [501 x [501 x i8]], ptr @g, i64 0, i64 %247
  %249 = load i32, ptr %17, align 4, !tbaa !5
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds [501 x i8], ptr %248, i64 0, i64 %250
  %252 = load i8, ptr %251, align 1, !tbaa !14, !range !16, !noundef !17
  %253 = trunc i8 %252 to i1
  br label %254

254:                                              ; preds = %245, %241
  %255 = phi i1 [ false, %241 ], [ %253, %245 ]
  br i1 %255, label %257, label %256

256:                                              ; preds = %254
  store i32 28, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %290

257:                                              ; preds = %254
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %258 = load i32, ptr %17, align 4, !tbaa !5
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [501 x %struct.Point], ptr @b, i64 0, i64 %259
  %261 = load i32, ptr %16, align 4, !tbaa !5
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds [501 x %struct.Point], ptr @b, i64 0, i64 %262
  %264 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %260, ptr noundef nonnull align 4 dereferenceable(8) %263)
  store i64 %264, ptr %19, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %265 = load i32, ptr %18, align 4, !tbaa !5
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds [501 x %struct.Point], ptr @a, i64 0, i64 %266
  %268 = load i32, ptr %16, align 4, !tbaa !5
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds [501 x %struct.Point], ptr @b, i64 0, i64 %269
  %271 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %267, ptr noundef nonnull align 4 dereferenceable(8) %270)
  store i64 %271, ptr %20, align 4
  %272 = call noundef i32 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(8) %20)
  %273 = icmp sge i32 %272, 0
  %274 = zext i1 %273 to i32
  %275 = load i32, ptr %16, align 4, !tbaa !5
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds [501 x [501 x i8]], ptr @g, i64 0, i64 %276
  %278 = load i32, ptr %17, align 4, !tbaa !5
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds [501 x i8], ptr %277, i64 0, i64 %279
  %281 = load i8, ptr %280, align 1, !tbaa !14, !range !16, !noundef !17
  %282 = trunc i8 %281 to i1
  %283 = zext i1 %282 to i32
  %284 = and i32 %283, %274
  %285 = icmp ne i32 %284, 0
  %286 = zext i1 %285 to i8
  store i8 %286, ptr %280, align 1, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %287

287:                                              ; preds = %257
  %288 = load i32, ptr %18, align 4, !tbaa !5
  %289 = add nsw i32 %288, 1
  store i32 %289, ptr %18, align 4, !tbaa !5
  br label %241, !llvm.loop !21

290:                                              ; preds = %256
  %291 = load i32, ptr %16, align 4, !tbaa !5
  %292 = sext i32 %291 to i64
  %293 = getelementptr inbounds [501 x [501 x i8]], ptr @vis, i64 0, i64 %292
  %294 = load i32, ptr %17, align 4, !tbaa !5
  %295 = sext i32 %294 to i64
  %296 = getelementptr inbounds [501 x i8], ptr %293, i64 0, i64 %295
  store i8 0, ptr %296, align 1, !tbaa !14
  br label %297

297:                                              ; preds = %290
  %298 = load i32, ptr %17, align 4, !tbaa !5
  %299 = add nsw i32 %298, 1
  store i32 %299, ptr %17, align 4, !tbaa !5
  br label %225, !llvm.loop !22

300:                                              ; preds = %229
  br label %301

301:                                              ; preds = %300
  %302 = load i32, ptr %16, align 4, !tbaa !5
  %303 = add nsw i32 %302, 1
  store i32 %303, ptr %16, align 4, !tbaa !5
  br label %219, !llvm.loop !23

304:                                              ; preds = %223
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 501, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %305

305:                                              ; preds = %342, %304
  %306 = load i32, ptr %22, align 4, !tbaa !5
  %307 = load i32, ptr @m, align 4, !tbaa !5
  %308 = icmp slt i32 %306, %307
  br i1 %308, label %310, label %309

309:                                              ; preds = %305
  store i32 31, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %345

310:                                              ; preds = %305
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %311

311:                                              ; preds = %338, %310
  %312 = load i32, ptr %23, align 4, !tbaa !5
  %313 = load i32, ptr @m, align 4, !tbaa !5
  %314 = icmp slt i32 %312, %313
  br i1 %314, label %316, label %315

315:                                              ; preds = %311
  store i32 34, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %341

316:                                              ; preds = %311
  %317 = load i32, ptr %22, align 4, !tbaa !5
  %318 = sext i32 %317 to i64
  %319 = getelementptr inbounds [501 x [501 x i8]], ptr @g, i64 0, i64 %318
  %320 = load i32, ptr %23, align 4, !tbaa !5
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds [501 x i8], ptr %319, i64 0, i64 %321
  %323 = load i8, ptr %322, align 1, !tbaa !14, !range !16, !noundef !17
  %324 = trunc i8 %323 to i1
  br i1 %324, label %325, label %337

325:                                              ; preds = %316
  %326 = load i32, ptr %23, align 4, !tbaa !5
  %327 = load i32, ptr %22, align 4, !tbaa !5
  %328 = call noundef i32 @_Z1Gii(i32 noundef %326, i32 noundef %327)
  %329 = icmp sgt i32 %328, 1
  br i1 %329, label %330, label %337

330:                                              ; preds = %325
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %331 = load i32, ptr %23, align 4, !tbaa !5
  %332 = load i32, ptr %22, align 4, !tbaa !5
  %333 = call noundef i32 @_Z1Gii(i32 noundef %331, i32 noundef %332)
  %334 = add nsw i32 %333, 1
  store i32 %334, ptr %24, align 4, !tbaa !5
  %335 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %24)
  %336 = load i32, ptr %335, align 4, !tbaa !5
  store i32 %336, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %337

337:                                              ; preds = %330, %325, %316
  br label %338

338:                                              ; preds = %337
  %339 = load i32, ptr %23, align 4, !tbaa !5
  %340 = add nsw i32 %339, 1
  store i32 %340, ptr %23, align 4, !tbaa !5
  br label %311, !llvm.loop !24

341:                                              ; preds = %315
  br label %342

342:                                              ; preds = %341
  %343 = load i32, ptr %22, align 4, !tbaa !5
  %344 = add nsw i32 %343, 1
  store i32 %344, ptr %22, align 4, !tbaa !5
  br label %305, !llvm.loop !25

345:                                              ; preds = %309
  %346 = load i32, ptr %21, align 4, !tbaa !5
  %347 = icmp slt i32 %346, 501
  br i1 %347, label %348, label %353

348:                                              ; preds = %345
  %349 = load i32, ptr %3, align 4, !tbaa !5
  %350 = load i32, ptr %21, align 4, !tbaa !5
  %351 = sub nsw i32 %349, %350
  %352 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %351)
  br label %355

353:                                              ; preds = %345
  %354 = call i32 @puts(ptr noundef @.str.2)
  br label %355

355:                                              ; preds = %353, %348
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  store i32 0, ptr %6, align 4
  br label %356

356:                                              ; preds = %355, %216, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  %357 = load i32, ptr %6, align 4
  switch i32 %357, label %360 [
    i32 0, label %358
    i32 2, label %25
  ]

358:                                              ; preds = %356
  br label %25, !llvm.loop !13

359:                                              ; preds = %25
  ret i32 0

360:                                              ; preds = %356
  unreachable
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Point4readEv(ptr noundef nonnull align 4 dereferenceable(8)) #3 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6uniqueIP5PointET_S2_S2_(ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5PointeqERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #5 align 2

declare i32 @printf(ptr noundef, ...) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5Point3dotERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z1Gii(i32 noundef, i32 noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #6

declare i32 @puts(ptr noundef) #1

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}


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

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@g = external dso_local local_unnamed_addr global [501 x [501 x i8]], align 16
@vis = external dso_local local_unnamed_addr global [501 x [501 x i8]], align 16
@a = external dso_local global [501 x %struct.Point], align 16
@b = external dso_local global [501 x %struct.Point], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca %struct.Point, align 8
  %2 = alloca %struct.Point, align 8
  %3 = alloca %struct.Point, align 8
  %4 = alloca %struct.Point, align 8
  %5 = alloca %struct.Point, align 8
  %6 = alloca %struct.Point, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %10 = icmp eq i32 %9, 1
  br i1 %10, label %.preheader97, label %._crit_edge139

.preheader97:                                     ; preds = %0, %175
  %11 = load i32, ptr @n, align 4, !tbaa !5
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph, label %.preheader97.._crit_edge_crit_edge

.preheader97.._crit_edge_crit_edge:               ; preds = %.preheader97
  %.pre191 = sext i32 %11 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.preheader97.._crit_edge_crit_edge
  %.pre-phi192 = phi i64 [ %.pre191, %.preheader97.._crit_edge_crit_edge ], [ %27, %.lr.ph ]
  %13 = getelementptr inbounds %struct.Point, ptr @a, i64 %.pre-phi192
  call void @_ZSt4sortIP5PointEvT_S2_(ptr noundef nonnull @a, ptr noundef nonnull %13)
  %14 = load i32, ptr @n, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds %struct.Point, ptr @a, i64 %15
  %17 = call noundef ptr @_ZSt6uniqueIP5PointET_S2_S2_(ptr noundef nonnull @a, ptr noundef nonnull %16)
  %18 = ptrtoint ptr %17 to i64
  %19 = sub i64 %18, ptrtoint (ptr @a to i64)
  %20 = lshr exact i64 %19, 3
  %21 = trunc i64 %20 to i32
  store i32 %21, ptr @n, align 4, !tbaa !5
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @m)
  %23 = load i32, ptr @m, align 4, !tbaa !5
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph103, label %._crit_edge.._crit_edge104_crit_edge

._crit_edge.._crit_edge104_crit_edge:             ; preds = %._crit_edge
  %.pre193 = sext i32 %23 to i64
  br label %._crit_edge104

.lr.ph:                                           ; preds = %.preheader97, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader97 ]
  %25 = getelementptr inbounds [501 x %struct.Point], ptr @a, i64 0, i64 %indvars.iv
  call void @_ZN5Point4readEv(ptr noundef nonnull align 4 dereferenceable(8) %25)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %26 = load i32, ptr @n, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = icmp slt i64 %indvars.iv.next, %27
  br i1 %28, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge104:                                   ; preds = %.lr.ph103, %._crit_edge.._crit_edge104_crit_edge
  %.pre-phi194 = phi i64 [ %.pre193, %._crit_edge.._crit_edge104_crit_edge ], [ %43, %.lr.ph103 ]
  %29 = getelementptr inbounds %struct.Point, ptr @b, i64 %.pre-phi194
  call void @_ZSt4sortIP5PointEvT_S2_(ptr noundef nonnull @b, ptr noundef nonnull %29)
  %30 = load i32, ptr @m, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds %struct.Point, ptr @b, i64 %31
  %33 = call noundef ptr @_ZSt6uniqueIP5PointET_S2_S2_(ptr noundef nonnull @b, ptr noundef nonnull %32)
  %34 = ptrtoint ptr %33 to i64
  %35 = sub i64 %34, ptrtoint (ptr @b to i64)
  %36 = lshr exact i64 %35, 3
  %37 = trunc i64 %36 to i32
  store i32 %37, ptr @m, align 4, !tbaa !5
  %38 = load i32, ptr @n, align 4, !tbaa !5
  %39 = icmp eq i32 %38, 1
  br i1 %39, label %.preheader96, label %.critedge91

.preheader96:                                     ; preds = %._crit_edge104
  %40 = icmp sgt i32 %37, 0
  br i1 %40, label %.lr.ph107, label %._crit_edge108

.lr.ph103:                                        ; preds = %._crit_edge, %.lr.ph103
  %indvars.iv149 = phi i64 [ %indvars.iv.next150, %.lr.ph103 ], [ 0, %._crit_edge ]
  %41 = getelementptr inbounds [501 x %struct.Point], ptr @b, i64 0, i64 %indvars.iv149
  call void @_ZN5Point4readEv(ptr noundef nonnull align 4 dereferenceable(8) %41)
  %indvars.iv.next150 = add nuw nsw i64 %indvars.iv149, 1
  %42 = load i32, ptr @m, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = icmp slt i64 %indvars.iv.next150, %43
  br i1 %44, label %.lr.ph103, label %._crit_edge104, !llvm.loop !11

.lr.ph107:                                        ; preds = %.preheader96, %47
  %indvars.iv152 = phi i64 [ %indvars.iv.next153, %47 ], [ 0, %.preheader96 ]
  %45 = getelementptr inbounds [501 x %struct.Point], ptr @b, i64 0, i64 %indvars.iv152
  %46 = call noundef zeroext i1 @_ZNK5PointeqERKS_(ptr noundef nonnull align 4 dereferenceable(8) @a, ptr noundef nonnull align 4 dereferenceable(8) %45)
  %.pre.pre = load i32, ptr @m, align 4, !tbaa !5
  br i1 %46, label %._crit_edge108.loopexit, label %47

47:                                               ; preds = %.lr.ph107
  %indvars.iv.next153 = add nuw nsw i64 %indvars.iv152, 1
  %48 = sext i32 %.pre.pre to i64
  %49 = icmp slt i64 %indvars.iv.next153, %48
  br i1 %49, label %.lr.ph107, label %._crit_edge108.loopexit, !llvm.loop !12

._crit_edge108.loopexit:                          ; preds = %.lr.ph107, %47
  %.079.lcssa.ph.in = phi i64 [ %indvars.iv.next153, %47 ], [ %indvars.iv152, %.lr.ph107 ]
  %.079.lcssa.ph = trunc i64 %.079.lcssa.ph.in to i32
  br label %._crit_edge108

._crit_edge108:                                   ; preds = %._crit_edge108.loopexit, %.preheader96
  %50 = phi i32 [ %37, %.preheader96 ], [ %.pre.pre, %._crit_edge108.loopexit ]
  %.079.lcssa = phi i32 [ 0, %.preheader96 ], [ %.079.lcssa.ph, %._crit_edge108.loopexit ]
  %.not = icmp slt i32 %.079.lcssa, %50
  br i1 %.not, label %51, label %.critedge91

51:                                               ; preds = %._crit_edge108
  %52 = add nsw i32 %23, -1
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %52)
  br label %175

.critedge91:                                      ; preds = %._crit_edge108, %._crit_edge104
  %54 = phi i32 [ %50, %._crit_edge108 ], [ %37, %._crit_edge104 ]
  %55 = icmp slt i32 %54, 1
  br i1 %55, label %.critedge93._crit_edge.thread, label %.lr.ph122

.loopexit.loopexit:                               ; preds = %._crit_edge114
  %.pre = sext i32 %74 to i64
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %.lr.ph122
  %.pre-phi = phi i64 [ %.pre, %.loopexit.loopexit ], [ %61, %.lr.ph122 ]
  %56 = phi i32 [ %74, %.loopexit.loopexit ], [ %60, %.lr.ph122 ]
  %.1.lcssa = phi i8 [ %78, %.loopexit.loopexit ], [ %.076120, %.lr.ph122 ]
  %57 = icmp sge i64 %indvars.iv.next164, %.pre-phi
  %58 = trunc i8 %.1.lcssa to i1
  %.not86 = select i1 %57, i1 true, i1 %58
  %indvars.iv.next160 = add nuw nsw i64 %indvars.iv159, 1
  br i1 %.not86, label %._crit_edge123, label %.lr.ph122, !llvm.loop !13

._crit_edge123:                                   ; preds = %.loopexit
  br i1 %58, label %._crit_edge123.thread, label %.critedge93.preheader

.critedge93.preheader:                            ; preds = %._crit_edge123
  %59 = icmp sgt i32 %56, 0
  br i1 %59, label %.preheader95, label %.critedge93._crit_edge.thread

.lr.ph122:                                        ; preds = %.critedge91, %.loopexit
  %60 = phi i32 [ %56, %.loopexit ], [ %54, %.critedge91 ]
  %indvars.iv163 = phi i64 [ %indvars.iv.next164, %.loopexit ], [ 0, %.critedge91 ]
  %indvars.iv159 = phi i64 [ %indvars.iv.next160, %.loopexit ], [ 1, %.critedge91 ]
  %.076120 = phi i8 [ %.1.lcssa, %.loopexit ], [ 0, %.critedge91 ]
  %indvars.iv.next164 = add nuw nsw i64 %indvars.iv163, 1
  %61 = sext i32 %60 to i64
  %62 = icmp sge i64 %indvars.iv.next164, %61
  %63 = trunc i8 %.076120 to i1
  %.not88116 = select i1 %62, i1 true, i1 %63
  br i1 %.not88116, label %.loopexit, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %.lr.ph122
  %64 = getelementptr inbounds [501 x %struct.Point], ptr @b, i64 0, i64 %indvars.iv163
  %65 = load i32, ptr @n, align 4, !tbaa !5
  %66 = icmp sgt i32 %65, 0
  br i1 %66, label %.preheader, label %._crit_edge123.thread

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge114
  %67 = phi i32 [ %74, %._crit_edge114 ], [ %60, %.preheader.lr.ph ]
  %68 = phi i32 [ %75, %._crit_edge114 ], [ %60, %.preheader.lr.ph ]
  %69 = phi i32 [ %76, %._crit_edge114 ], [ %65, %.preheader.lr.ph ]
  %indvars.iv161 = phi i64 [ %indvars.iv.next162, %._crit_edge114 ], [ %indvars.iv159, %.preheader.lr.ph ]
  %.1117 = phi i8 [ %78, %._crit_edge114 ], [ %.076120, %.preheader.lr.ph ]
  %70 = icmp sgt i32 %69, 0
  br i1 %70, label %.lr.ph113, label %._crit_edge114

.lr.ph113:                                        ; preds = %.preheader
  %71 = getelementptr inbounds [501 x %struct.Point], ptr @b, i64 0, i64 %indvars.iv161
  br label %82

._crit_edge114.loopexit:                          ; preds = %88, %.thread
  %72 = phi i32 [ %87, %.thread ], [ %93, %88 ]
  %73 = phi i1 [ false, %.thread ], [ %92, %88 ]
  %.pre188 = load i32, ptr @m, align 4, !tbaa !5
  br label %._crit_edge114

._crit_edge114:                                   ; preds = %._crit_edge114.loopexit, %.preheader
  %74 = phi i32 [ %67, %.preheader ], [ %.pre188, %._crit_edge114.loopexit ]
  %75 = phi i32 [ %68, %.preheader ], [ %.pre188, %._crit_edge114.loopexit ]
  %76 = phi i32 [ %69, %.preheader ], [ %72, %._crit_edge114.loopexit ]
  %.073.lcssa = phi i1 [ true, %.preheader ], [ %73, %._crit_edge114.loopexit ]
  %77 = zext i1 %.073.lcssa to i8
  %78 = or i8 %.1117, %77
  %indvars.iv.next162 = add nuw nsw i64 %indvars.iv161, 1
  %79 = trunc nuw i64 %indvars.iv.next162 to i32
  %80 = icmp sle i32 %75, %79
  %81 = trunc i8 %78 to i1
  %.not88 = select i1 %80, i1 true, i1 %81
  br i1 %.not88, label %.loopexit.loopexit, label %.preheader, !llvm.loop !14

82:                                               ; preds = %.lr.ph113, %88
  %indvars.iv155 = phi i64 [ 0, %.lr.ph113 ], [ %indvars.iv.next156, %88 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  %83 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %71, ptr noundef nonnull align 4 dereferenceable(8) %64)
  store i64 %83, ptr %1, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  %84 = getelementptr inbounds [501 x %struct.Point], ptr @a, i64 0, i64 %indvars.iv155
  %85 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %84, ptr noundef nonnull align 4 dereferenceable(8) %64)
  store i64 %85, ptr %2, align 8
  %86 = call noundef i32 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(8) %2)
  %.not89 = icmp eq i32 %86, 0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  br i1 %.not89, label %88, label %.thread

.thread:                                          ; preds = %82
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  %87 = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge114.loopexit

88:                                               ; preds = %82
  %89 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %64, ptr noundef nonnull align 4 dereferenceable(8) %84)
  store i64 %89, ptr %3, align 8
  %90 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %71, ptr noundef nonnull align 4 dereferenceable(8) %84)
  store i64 %90, ptr %4, align 8
  %91 = call noundef i32 @_ZNK5Point3dotERKS_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(8) %4)
  %92 = icmp slt i32 %91, 1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  %indvars.iv.next156 = add nuw nsw i64 %indvars.iv155, 1
  %93 = load i32, ptr @n, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = icmp slt i64 %indvars.iv.next156, %94
  %96 = and i1 %92, %95
  br i1 %96, label %82, label %._crit_edge114.loopexit, !llvm.loop !16

._crit_edge123.thread:                            ; preds = %.preheader.lr.ph, %._crit_edge123
  %97 = add nsw i32 %23, -2
  %98 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %97)
  br label %175

.preheader95:                                     ; preds = %.critedge93.preheader, %.critedge93
  %99 = phi i32 [ %118, %.critedge93 ], [ %56, %.critedge93.preheader ]
  %indvar = phi i64 [ %indvar.next, %.critedge93 ], [ 0, %.critedge93.preheader ]
  %100 = mul nuw nsw i64 %indvar, 501
  %scevgep = getelementptr i8, ptr @vis, i64 %100
  %101 = icmp sgt i32 %99, 0
  br i1 %101, label %.lr.ph130, label %.critedge93

.lr.ph130:                                        ; preds = %.preheader95
  %102 = getelementptr inbounds [501 x %struct.Point], ptr @b, i64 0, i64 %indvar
  %103 = load i32, ptr @n, align 4, !tbaa !5
  %104 = icmp sgt i32 %103, 0
  br i1 %104, label %.lr.ph130.split, label %iter.check

iter.check:                                       ; preds = %.lr.ph130
  %105 = zext nneg i32 %99 to i64
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %scevgep, i8 0, i64 %105, i1 false), !tbaa !17
  %min.iters.check = icmp ult i32 %99, 8
  br i1 %min.iters.check, label %.critedge.us.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  %min.iters.check230 = icmp ult i32 %99, 16
  br i1 %min.iters.check230, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %105, 2147483632
  %broadcast.splatinsert = insertelement <16 x i64> poison, i64 %indvar, i64 0
  %broadcast.splat = shufflevector <16 x i64> %broadcast.splatinsert, <16 x i64> poison, <16 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <16 x i64> [ <i64 0, i64 1, i64 2, i64 3, i64 4, i64 5, i64 6, i64 7, i64 8, i64 9, i64 10, i64 11, i64 12, i64 13, i64 14, i64 15>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %106 = icmp ne <16 x i64> %broadcast.splat, %vec.ind
  %107 = getelementptr inbounds [501 x [501 x i8]], ptr @g, i64 0, i64 %indvar, i64 %index
  %108 = zext <16 x i1> %106 to <16 x i8>
  store <16 x i8> %108, ptr %107, align 1, !tbaa !17
  %index.next = add nuw i64 %index, 16
  %vec.ind.next = add <16 x i64> %vec.ind, <i64 16, i64 16, i64 16, i64 16, i64 16, i64 16, i64 16, i64 16, i64 16, i64 16, i64 16, i64 16, i64 16, i64 16, i64 16, i64 16>
  %109 = icmp eq i64 %index.next, %n.vec
  br i1 %109, label %middle.block, label %vector.body, !llvm.loop !19

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %105
  br i1 %cmp.n, label %.critedge93, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %n.vec.remaining = and i64 %105, 8
  %min.epilog.iters.check.not.not = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check.not.not, label %.critedge.us.preheader, label %vec.epilog.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.vec232 = and i64 %105, 2147483640
  %.splatinsert = insertelement <8 x i64> poison, i64 %vec.epilog.resume.val, i64 0
  %.splat = shufflevector <8 x i64> %.splatinsert, <8 x i64> poison, <8 x i32> zeroinitializer
  %induction = or disjoint <8 x i64> %.splat, <i64 0, i64 1, i64 2, i64 3, i64 4, i64 5, i64 6, i64 7>
  %broadcast.splatinsert237 = insertelement <8 x i64> poison, i64 %indvar, i64 0
  %broadcast.splat238 = shufflevector <8 x i64> %broadcast.splatinsert237, <8 x i64> poison, <8 x i32> zeroinitializer
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index234 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next239, %vec.epilog.vector.body ]
  %vec.ind235 = phi <8 x i64> [ %induction, %vec.epilog.ph ], [ %vec.ind.next236, %vec.epilog.vector.body ]
  %110 = icmp ne <8 x i64> %broadcast.splat238, %vec.ind235
  %111 = getelementptr inbounds [501 x [501 x i8]], ptr @g, i64 0, i64 %indvar, i64 %index234
  %112 = zext <8 x i1> %110 to <8 x i8>
  store <8 x i8> %112, ptr %111, align 1, !tbaa !17
  %index.next239 = add nuw i64 %index234, 8
  %vec.ind.next236 = add <8 x i64> %vec.ind235, <i64 8, i64 8, i64 8, i64 8, i64 8, i64 8, i64 8, i64 8>
  %113 = icmp eq i64 %index.next239, %n.vec232
  br i1 %113, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !22

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n240 = icmp eq i64 %n.vec232, %105
  br i1 %cmp.n240, label %.critedge93, label %.critedge.us.preheader

.critedge.us.preheader:                           ; preds = %vec.epilog.middle.block, %iter.check, %vec.epilog.iter.check
  %indvars.iv165.ph = phi i64 [ 0, %iter.check ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec232, %vec.epilog.middle.block ]
  br label %.critedge.us

.critedge.us:                                     ; preds = %.critedge.us.preheader, %.critedge.us
  %indvars.iv165 = phi i64 [ %indvars.iv.next166, %.critedge.us ], [ %indvars.iv165.ph, %.critedge.us.preheader ]
  %114 = icmp ne i64 %indvar, %indvars.iv165
  %115 = getelementptr inbounds [501 x [501 x i8]], ptr @g, i64 0, i64 %indvar, i64 %indvars.iv165
  %116 = zext i1 %114 to i8
  store i8 %116, ptr %115, align 1, !tbaa !17
  %indvars.iv.next166 = add nuw nsw i64 %indvars.iv165, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next166, %105
  br i1 %exitcond.not, label %.critedge93, label %.critedge.us, !llvm.loop !23

.critedge93._crit_edge.thread:                    ; preds = %.critedge93.preheader, %.critedge91
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  store i32 501, ptr %7, align 4, !tbaa !5
  br label %._crit_edge138.thread

.critedge93._crit_edge:                           ; preds = %.critedge93
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  store i32 501, ptr %7, align 4, !tbaa !5
  %117 = icmp sgt i32 %118, 0
  br i1 %117, label %.preheader94, label %._crit_edge138.thread

.critedge93:                                      ; preds = %.critedge.us, %.critedge, %middle.block, %vec.epilog.middle.block, %.preheader95
  %118 = phi i32 [ %99, %.preheader95 ], [ %99, %vec.epilog.middle.block ], [ %99, %middle.block ], [ %130, %.critedge ], [ %99, %.critedge.us ]
  %indvar.next = add nuw nsw i64 %indvar, 1
  %119 = sext i32 %118 to i64
  %120 = icmp slt i64 %indvar.next, %119
  br i1 %120, label %.preheader95, label %.critedge93._crit_edge, !llvm.loop !24

.lr.ph130.split:                                  ; preds = %.lr.ph130, %.critedge
  %121 = phi i32 [ %130, %.critedge ], [ %99, %.lr.ph130 ]
  %122 = phi i32 [ %131, %.critedge ], [ %99, %.lr.ph130 ]
  %123 = phi i32 [ %132, %.critedge ], [ %103, %.lr.ph130 ]
  %indvars.iv174 = phi i64 [ %indvars.iv.next175, %.critedge ], [ 0, %.lr.ph130 ]
  %124 = icmp ne i64 %indvar, %indvars.iv174
  %125 = getelementptr inbounds [501 x [501 x i8]], ptr @g, i64 0, i64 %indvar, i64 %indvars.iv174
  %126 = zext i1 %124 to i8
  store i8 %126, ptr %125, align 1, !tbaa !17
  %127 = icmp sgt i32 %123, 0
  br i1 %127, label %.lr.ph127, label %.critedge

.lr.ph127:                                        ; preds = %.lr.ph130.split
  %128 = getelementptr inbounds [501 x %struct.Point], ptr @b, i64 0, i64 %indvars.iv174
  br i1 %124, label %.lr.ph227, label %.critedge.loopexit

.critedge.loopexit:                               ; preds = %.lr.ph227, %.lr.ph127
  %129 = phi i32 [ %123, %.lr.ph127 ], [ %144, %.lr.ph227 ]
  %.pre189 = load i32, ptr @m, align 4, !tbaa !5
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %.lr.ph130.split
  %130 = phi i32 [ %.pre189, %.critedge.loopexit ], [ %121, %.lr.ph130.split ]
  %131 = phi i32 [ %.pre189, %.critedge.loopexit ], [ %122, %.lr.ph130.split ]
  %132 = phi i32 [ %129, %.critedge.loopexit ], [ %123, %.lr.ph130.split ]
  %133 = getelementptr inbounds [501 x [501 x i8]], ptr @vis, i64 0, i64 %indvar, i64 %indvars.iv174
  store i8 0, ptr %133, align 1, !tbaa !17
  %indvars.iv.next175 = add nuw nsw i64 %indvars.iv174, 1
  %134 = sext i32 %131 to i64
  %135 = icmp slt i64 %indvars.iv.next175, %134
  br i1 %135, label %.lr.ph130.split, label %.critedge93, !llvm.loop !25

.lr.ph227:                                        ; preds = %.lr.ph127, %.lr.ph227
  %indvars.iv170226 = phi i64 [ %indvars.iv.next171, %.lr.ph227 ], [ 0, %.lr.ph127 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %136 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %128, ptr noundef nonnull align 4 dereferenceable(8) %102)
  store i64 %136, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %137 = getelementptr inbounds [501 x %struct.Point], ptr @a, i64 0, i64 %indvars.iv170226
  %138 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %137, ptr noundef nonnull align 4 dereferenceable(8) %102)
  store i64 %138, ptr %6, align 8
  %139 = call noundef i32 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %6)
  %140 = load i8, ptr %125, align 1, !tbaa !17, !range !26, !noundef !27
  %.inv = icmp sgt i32 %139, -1
  %141 = icmp ne i8 %140, 0
  %142 = and i1 %.inv, %141
  %143 = zext i1 %142 to i8
  store i8 %143, ptr %125, align 1, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  %indvars.iv.next171 = add nuw nsw i64 %indvars.iv170226, 1
  %144 = load i32, ptr @n, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = icmp slt i64 %indvars.iv.next171, %145
  %brmerge.not = and i1 %146, %142
  br i1 %brmerge.not, label %.lr.ph227, label %.critedge.loopexit, !llvm.loop !28

.preheader94:                                     ; preds = %.critedge93._crit_edge, %._crit_edge136
  %147 = phi i32 [ %151, %._crit_edge136 ], [ %118, %.critedge93._crit_edge ]
  %indvars.iv184 = phi i64 [ %indvars.iv.next185, %._crit_edge136 ], [ 0, %.critedge93._crit_edge ]
  %148 = icmp sgt i32 %147, 0
  br i1 %148, label %.lr.ph135, label %.preheader94.._crit_edge136_crit_edge

.preheader94.._crit_edge136_crit_edge:            ; preds = %.preheader94
  %.pre195 = sext i32 %147 to i64
  br label %._crit_edge136

.lr.ph135:                                        ; preds = %.preheader94
  %149 = trunc nuw nsw i64 %indvars.iv184 to i32
  br label %153

._crit_edge138:                                   ; preds = %._crit_edge136
  %.pre190 = load i32, ptr %7, align 4, !tbaa !5
  %150 = icmp slt i32 %.pre190, 501
  br i1 %150, label %170, label %._crit_edge138.thread

._crit_edge136:                                   ; preds = %166, %.preheader94.._crit_edge136_crit_edge
  %.pre-phi196 = phi i64 [ %.pre195, %.preheader94.._crit_edge136_crit_edge ], [ %168, %166 ]
  %151 = phi i32 [ %147, %.preheader94.._crit_edge136_crit_edge ], [ %167, %166 ]
  %indvars.iv.next185 = add nuw nsw i64 %indvars.iv184, 1
  %152 = icmp slt i64 %indvars.iv.next185, %.pre-phi196
  br i1 %152, label %.preheader94, label %._crit_edge138, !llvm.loop !29

153:                                              ; preds = %.lr.ph135, %166
  %indvars.iv180 = phi i64 [ 0, %.lr.ph135 ], [ %indvars.iv.next181, %166 ]
  %154 = getelementptr inbounds [501 x [501 x i8]], ptr @g, i64 0, i64 %indvars.iv184, i64 %indvars.iv180
  %155 = load i8, ptr %154, align 1, !tbaa !17, !range !26, !noundef !27
  %156 = trunc nuw i8 %155 to i1
  br i1 %156, label %157, label %166

157:                                              ; preds = %153
  %158 = trunc nuw nsw i64 %indvars.iv180 to i32
  %159 = call noundef i32 @_Z1Gii(i32 noundef %158, i32 noundef %149)
  %160 = icmp sgt i32 %159, 1
  br i1 %160, label %161, label %166

161:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  %162 = call noundef i32 @_Z1Gii(i32 noundef %158, i32 noundef %149)
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %8, align 4, !tbaa !5
  %164 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %165 = load i32, ptr %164, align 4, !tbaa !5
  store i32 %165, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  br label %166

166:                                              ; preds = %153, %157, %161
  %indvars.iv.next181 = add nuw nsw i64 %indvars.iv180, 1
  %167 = load i32, ptr @m, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = icmp slt i64 %indvars.iv.next181, %168
  br i1 %169, label %153, label %._crit_edge136, !llvm.loop !30

170:                                              ; preds = %._crit_edge138
  %171 = sub nsw i32 %23, %.pre190
  %172 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %171)
  br label %174

._crit_edge138.thread:                            ; preds = %.critedge93._crit_edge.thread, %.critedge93._crit_edge, %._crit_edge138
  %173 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %174

174:                                              ; preds = %._crit_edge138.thread, %170
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  br label %175

175:                                              ; preds = %._crit_edge123.thread, %51, %174
  %176 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %177 = icmp eq i32 %176, 1
  br i1 %177, label %.preheader97, label %._crit_edge139

._crit_edge139:                                   ; preds = %175, %0
  ret i32 0
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Point4readEv(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6uniqueIP5PointET_S2_S2_(ptr noundef, ptr noundef) local_unnamed_addr #4

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5Point3dotERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z1Gii(i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

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

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

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


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