; LLVM IR from lzyrapx/Competitive-Programming :: HDUOJ (5784)

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

@a = external dso_local global [2005 x %struct.Point], align 16
@b = external dso_local global [2005 x %struct.Point], align 16
@S = external dso_local global %struct.Point, align 8
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 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 i64, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %struct.Point, align 8
  %9 = alloca %struct.Point, align 8
  %10 = alloca %struct.Point, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %struct.Point, align 8
  %15 = alloca %struct.Point, align 8
  %16 = alloca %struct.Point, align 8
  %17 = alloca %struct.Point, align 8
  %18 = alloca %struct.Point, align 8
  %19 = alloca %struct.Point, align 8
  %20 = alloca %struct.Point, align 8
  %21 = alloca %struct.Point, align 8
  %22 = alloca %struct.Point, align 8
  %23 = alloca %struct.Point, align 8
  %24 = alloca %struct.Point, align 8
  %25 = alloca %struct.Point, align 8
  %26 = alloca %struct.Point, align 8
  %27 = alloca %struct.Point, align 8
  %28 = alloca %struct.Point, align 8
  %29 = alloca %struct.Point, align 8
  %30 = alloca %struct.Point, align 8
  %31 = alloca %struct.Point, align 8
  %32 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  br label %33

33:                                               ; preds = %241, %0
  %34 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  %35 = icmp ne i32 %34, -1
  br i1 %35, label %36, label %259

36:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %52, %36
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = load i32, ptr @n, align 4, !tbaa !5
  %40 = icmp sle i32 %38, %39
  br i1 %40, label %42, label %41

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

42:                                               ; preds = %37
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [2005 x %struct.Point], ptr @a, i64 0, i64 %44
  %46 = getelementptr inbounds %struct.Point, ptr %45, i32 0, i32 0
  %47 = load i32, ptr %2, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [2005 x %struct.Point], ptr @a, i64 0, i64 %48
  %50 = getelementptr inbounds %struct.Point, ptr %49, i32 0, i32 1
  %51 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %46, ptr noundef %50)
  br label %52

52:                                               ; preds = %42
  %53 = load i32, ptr %2, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %2, align 4, !tbaa !5
  br label %37, !llvm.loop !9

55:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  store i64 0, ptr %3, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %238, %55
  %57 = load i32, ptr %4, align 4, !tbaa !5
  %58 = load i32, ptr @n, align 4, !tbaa !5
  %59 = icmp sle i32 %57, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  store i32 7, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %241

61:                                               ; preds = %56
  %62 = load i32, ptr %4, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [2005 x %struct.Point], ptr @a, i64 0, i64 %63
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 @S, ptr align 8 %64, i64 24, i1 false), !tbaa.struct !13
  store i32 0, ptr @m, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %65

65:                                               ; preds = %83, %61
  %66 = load i32, ptr %6, align 4, !tbaa !5
  %67 = load i32, ptr @n, align 4, !tbaa !5
  %68 = icmp sle i32 %66, %67
  br i1 %68, label %70, label %69

69:                                               ; preds = %65
  store i32 10, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %86

70:                                               ; preds = %65
  %71 = load i32, ptr %6, align 4, !tbaa !5
  %72 = load i32, ptr %4, align 4, !tbaa !5
  %73 = icmp ne i32 %71, %72
  br i1 %73, label %74, label %82

74:                                               ; preds = %70
  %75 = load i32, ptr %6, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [2005 x %struct.Point], ptr @a, i64 0, i64 %76
  %78 = load i32, ptr @m, align 4, !tbaa !5
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr @m, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %80
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %81, ptr align 8 %77, i64 24, i1 false), !tbaa.struct !13
  br label %82

82:                                               ; preds = %74, %70
  br label %83

83:                                               ; preds = %82
  %84 = load i32, ptr %6, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %6, align 4, !tbaa !5
  br label %65, !llvm.loop !14

86:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %87

87:                                               ; preds = %101, %86
  %88 = load i32, ptr %7, align 4, !tbaa !5
  %89 = load i32, ptr @m, align 4, !tbaa !5
  %90 = icmp sle i32 %88, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %87
  store i32 13, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %104

92:                                               ; preds = %87
  %93 = load i32, ptr %7, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %94
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %95, i64 24, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 @S, i64 24, i1 false), !tbaa.struct !13
  call void @_Zmi5PointS_(ptr dead_on_unwind writable sret(%struct.Point) align 8 %8, ptr noundef byval(%struct.Point) align 8 %9, ptr noundef byval(%struct.Point) align 8 %10)
  %96 = call noundef i32 @_Z3cal5Point(ptr noundef byval(%struct.Point) align 8 %8)
  %97 = load i32, ptr %7, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %98
  %100 = getelementptr inbounds %struct.Point, ptr %99, i32 0, i32 2
  store i32 %96, ptr %100, align 8, !tbaa !15
  br label %101

101:                                              ; preds = %92
  %102 = load i32, ptr %7, align 4, !tbaa !5
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %7, align 4, !tbaa !5
  br label %87, !llvm.loop !17

104:                                              ; preds = %91
  %105 = load i32, ptr @m, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds %struct.Point, ptr @b, i64 %106
  %108 = getelementptr inbounds %struct.Point, ptr %107, i64 1
  call void @_ZSt4sortIP5PointPFbS0_S0_EEvT_S4_T0_(ptr noundef getelementptr inbounds (%struct.Point, ptr @b, i64 1), ptr noundef %108, ptr noundef @_Z3cmp5PointS_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 1, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 1, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %109

109:                                              ; preds = %132, %104
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 @S, i64 24, i1 false), !tbaa.struct !13
  %110 = load i32, ptr %11, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %111
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %112, i64 24, i1 false), !tbaa.struct !13
  %113 = load i32, ptr %12, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %114
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %115, i64 24, i1 false), !tbaa.struct !13
  %116 = call noundef zeroext i1 @_Z2ok5PointS_S_(ptr noundef byval(%struct.Point) align 8 %14, ptr noundef byval(%struct.Point) align 8 %15, ptr noundef byval(%struct.Point) align 8 %16)
  br i1 %116, label %117, label %130

117:                                              ; preds = %109
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 @S, i64 24, i1 false), !tbaa.struct !13
  %118 = load i32, ptr %11, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %119
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %120, i64 24, i1 false), !tbaa.struct !13
  %121 = load i32, ptr %12, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %122
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 8 %123, i64 24, i1 false), !tbaa.struct !13
  %124 = call noundef i64 @_Z5cross5PointS_S_(ptr noundef byval(%struct.Point) align 8 %17, ptr noundef byval(%struct.Point) align 8 %18, ptr noundef byval(%struct.Point) align 8 %19)
  %125 = icmp sge i64 %124, 0
  br i1 %125, label %126, label %130

126:                                              ; preds = %117
  %127 = load i32, ptr %12, align 4, !tbaa !5
  %128 = load i32, ptr @m, align 4, !tbaa !5
  %129 = icmp sle i32 %127, %128
  br label %130

130:                                              ; preds = %126, %117, %109
  %131 = phi i1 [ false, %117 ], [ false, %109 ], [ %129, %126 ]
  br i1 %131, label %132, label %135

132:                                              ; preds = %130
  %133 = load i32, ptr %12, align 4, !tbaa !5
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %12, align 4, !tbaa !5
  br label %109, !llvm.loop !18

135:                                              ; preds = %130
  %136 = load i32, ptr %12, align 4, !tbaa !5
  %137 = load i32, ptr @m, align 4, !tbaa !5
  %138 = add nsw i32 %137, 1
  %139 = icmp eq i32 %136, %138
  br i1 %139, label %140, label %141

140:                                              ; preds = %135
  store i32 9, ptr %5, align 4
  br label %235

141:                                              ; preds = %135
  %142 = load i32, ptr %12, align 4, !tbaa !5
  %143 = add nsw i32 %142, -1
  store i32 %143, ptr %12, align 4, !tbaa !5
  %144 = load i32, ptr %12, align 4, !tbaa !5
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %13, align 4, !tbaa !5
  br label %146

146:                                              ; preds = %233, %141
  %147 = load i32, ptr %11, align 4, !tbaa !5
  %148 = load i32, ptr @m, align 4, !tbaa !5
  %149 = icmp sle i32 %147, %148
  br i1 %149, label %150, label %234

150:                                              ; preds = %146
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 @S, i64 24, i1 false), !tbaa.struct !13
  %151 = load i32, ptr %11, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %152
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %21, ptr align 8 %153, i64 24, i1 false), !tbaa.struct !13
  %154 = load i32, ptr %13, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %155
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 8 %156, i64 24, i1 false), !tbaa.struct !13
  %157 = call noundef zeroext i1 @_Z2ok5PointS_S_(ptr noundef byval(%struct.Point) align 8 %20, ptr noundef byval(%struct.Point) align 8 %21, ptr noundef byval(%struct.Point) align 8 %22)
  br i1 %157, label %184, label %158

158:                                              ; preds = %150
  br label %159

159:                                              ; preds = %174, %158
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr align 8 @S, i64 24, i1 false), !tbaa.struct !13
  %160 = load i32, ptr %11, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %161
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 %162, i64 24, i1 false), !tbaa.struct !13
  %163 = load i32, ptr %13, align 4, !tbaa !5
  %164 = add nsw i32 %163, 1
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %165
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %166, i64 24, i1 false), !tbaa.struct !13
  %167 = call noundef zeroext i1 @_Z2ok5PointS_S_(ptr noundef byval(%struct.Point) align 8 %23, ptr noundef byval(%struct.Point) align 8 %24, ptr noundef byval(%struct.Point) align 8 %25)
  br i1 %167, label %172, label %168

168:                                              ; preds = %159
  %169 = load i32, ptr %13, align 4, !tbaa !5
  %170 = load i32, ptr @m, align 4, !tbaa !5
  %171 = icmp slt i32 %169, %170
  br label %172

172:                                              ; preds = %168, %159
  %173 = phi i1 [ false, %159 ], [ %171, %168 ]
  br i1 %173, label %174, label %177

174:                                              ; preds = %172
  %175 = load i32, ptr %13, align 4, !tbaa !5
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %13, align 4, !tbaa !5
  br label %159, !llvm.loop !19

177:                                              ; preds = %172
  %178 = load i32, ptr %13, align 4, !tbaa !5
  %179 = load i32, ptr %12, align 4, !tbaa !5
  %180 = sub nsw i32 %178, %179
  %181 = sext i32 %180 to i64
  %182 = load i64, ptr %3, align 8, !tbaa !11
  %183 = add nsw i64 %182, %181
  store i64 %183, ptr %3, align 8, !tbaa !11
  br label %184

184:                                              ; preds = %177, %150
  %185 = load i32, ptr %11, align 4, !tbaa !5
  %186 = add nsw i32 %185, 1
  store i32 %186, ptr %11, align 4, !tbaa !5
  %187 = load i32, ptr %12, align 4, !tbaa !5
  %188 = load i32, ptr %11, align 4, !tbaa !5
  %189 = icmp slt i32 %187, %188
  br i1 %189, label %190, label %192

190:                                              ; preds = %184
  %191 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %191, ptr %12, align 4, !tbaa !5
  br label %192

192:                                              ; preds = %190, %184
  br label %193

193:                                              ; preds = %218, %192
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 @S, i64 24, i1 false), !tbaa.struct !13
  %194 = load i32, ptr %11, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %195
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %27, ptr align 8 %196, i64 24, i1 false), !tbaa.struct !13
  %197 = load i32, ptr %12, align 4, !tbaa !5
  %198 = add nsw i32 %197, 1
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %199
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %28, ptr align 8 %200, i64 24, i1 false), !tbaa.struct !13
  %201 = call noundef zeroext i1 @_Z2ok5PointS_S_(ptr noundef byval(%struct.Point) align 8 %26, ptr noundef byval(%struct.Point) align 8 %27, ptr noundef byval(%struct.Point) align 8 %28)
  br i1 %201, label %202, label %216

202:                                              ; preds = %193
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %29, ptr align 8 @S, i64 24, i1 false), !tbaa.struct !13
  %203 = load i32, ptr %11, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %204
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %30, ptr align 8 %205, i64 24, i1 false), !tbaa.struct !13
  %206 = load i32, ptr %12, align 4, !tbaa !5
  %207 = add nsw i32 %206, 1
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %208
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %31, ptr align 8 %209, i64 24, i1 false), !tbaa.struct !13
  %210 = call noundef i64 @_Z5cross5PointS_S_(ptr noundef byval(%struct.Point) align 8 %29, ptr noundef byval(%struct.Point) align 8 %30, ptr noundef byval(%struct.Point) align 8 %31)
  %211 = icmp sgt i64 %210, 0
  br i1 %211, label %212, label %216

212:                                              ; preds = %202
  %213 = load i32, ptr %12, align 4, !tbaa !5
  %214 = load i32, ptr @m, align 4, !tbaa !5
  %215 = icmp slt i32 %213, %214
  br label %216

216:                                              ; preds = %212, %202, %193
  %217 = phi i1 [ false, %202 ], [ false, %193 ], [ %215, %212 ]
  br i1 %217, label %218, label %221

218:                                              ; preds = %216
  %219 = load i32, ptr %12, align 4, !tbaa !5
  %220 = add nsw i32 %219, 1
  store i32 %220, ptr %12, align 4, !tbaa !5
  br label %193, !llvm.loop !20

221:                                              ; preds = %216
  %222 = load i32, ptr %13, align 4, !tbaa !5
  %223 = load i32, ptr %12, align 4, !tbaa !5
  %224 = icmp sle i32 %222, %223
  br i1 %224, label %225, label %228

225:                                              ; preds = %221
  %226 = load i32, ptr %12, align 4, !tbaa !5
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr %13, align 4, !tbaa !5
  br label %228

228:                                              ; preds = %225, %221
  %229 = load i32, ptr %13, align 4, !tbaa !5
  %230 = load i32, ptr @m, align 4, !tbaa !5
  %231 = icmp sgt i32 %229, %230
  br i1 %231, label %232, label %233

232:                                              ; preds = %228
  br label %234

233:                                              ; preds = %228
  br label %146, !llvm.loop !21

234:                                              ; preds = %232, %146
  store i32 0, ptr %5, align 4
  br label %235

235:                                              ; preds = %234, %140
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  %236 = load i32, ptr %5, align 4
  switch i32 %236, label %261 [
    i32 0, label %237
    i32 9, label %238
  ]

237:                                              ; preds = %235
  br label %238

238:                                              ; preds = %237, %235
  %239 = load i32, ptr %4, align 4, !tbaa !5
  %240 = add nsw i32 %239, 1
  store i32 %240, ptr %4, align 4, !tbaa !5
  br label %56, !llvm.loop !22

241:                                              ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #7
  %242 = load i32, ptr @n, align 4, !tbaa !5
  %243 = sext i32 %242 to i64
  %244 = mul nsw i64 1, %243
  %245 = load i32, ptr @n, align 4, !tbaa !5
  %246 = sub nsw i32 %245, 1
  %247 = sext i32 %246 to i64
  %248 = mul nsw i64 %244, %247
  %249 = load i32, ptr @n, align 4, !tbaa !5
  %250 = sub nsw i32 %249, 2
  %251 = sext i32 %250 to i64
  %252 = mul nsw i64 %248, %251
  %253 = sdiv i64 %252, 6
  store i64 %253, ptr %32, align 8, !tbaa !11
  %254 = load i64, ptr %3, align 8, !tbaa !11
  %255 = load i64, ptr %32, align 8, !tbaa !11
  %256 = sub nsw i64 %255, %254
  store i64 %256, ptr %32, align 8, !tbaa !11
  %257 = load i64, ptr %32, align 8, !tbaa !11
  %258 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %257)
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  br label %33, !llvm.loop !23

259:                                              ; preds = %33
  %260 = load i32, ptr %1, align 4
  ret i32 %260

261:                                              ; preds = %235
  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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3cal5Point(ptr noundef byval(%struct.Point) align 8) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Zmi5PointS_(ptr dead_on_unwind noalias writable sret(%struct.Point) align 8, ptr noundef byval(%struct.Point) align 8, ptr noundef byval(%struct.Point) align 8) #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z3cmp5PointS_(ptr noundef byval(%struct.Point) align 8, ptr noundef byval(%struct.Point) align 8) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z2ok5PointS_S_(ptr noundef byval(%struct.Point) align 8, ptr noundef byval(%struct.Point) align 8, ptr noundef byval(%struct.Point) align 8) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z5cross5PointS_S_(ptr noundef byval(%struct.Point) align 8, ptr noundef byval(%struct.Point) align 8, ptr noundef byval(%struct.Point) align 8) #4

declare i32 @printf(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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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 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 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{i64 0, i64 8, !11, i64 8, i64 8, !11, i64 16, i64 4, !5}
!14 = distinct !{!14, !10}
!15 = !{!16, !6, i64 16}
!16 = !{!"_ZTS5Point", !12, i64 0, !12, i64 8, !6, i64 16}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !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 { i64, i64, i32 }

@a = external dso_local global [2005 x %struct.Point], align 16
@b = external dso_local global [2005 x %struct.Point], align 16
@S = external dso_local local_unnamed_addr global %struct.Point, align 8
@n = external dso_local global i32, align 4
@m = external dso_local local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 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 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %.not105 = icmp eq i32 %2, -1
  br i1 %.not105, label %._crit_edge106, label %.preheader87

.preheader87:                                     ; preds = %0, %._crit_edge102
  %3 = load i32, ptr @n, align 4, !tbaa !5
  %.not7190 = icmp slt i32 %3, 1
  br i1 %.not7190, label %.preheader86.._crit_edge102_crit_edge, label %.lr.ph

.preheader86:                                     ; preds = %.lr.ph
  %.not7298 = icmp slt i32 %8, 1
  br i1 %.not7298, label %.preheader86.._crit_edge102_crit_edge, label %.lr.ph101

.preheader86.._crit_edge102_crit_edge:            ; preds = %.preheader87, %.preheader86
  %4 = phi i32 [ %8, %.preheader86 ], [ %3, %.preheader87 ]
  %.pre133 = sext i32 %4 to i64
  br label %._crit_edge102

.lr.ph:                                           ; preds = %.preheader87, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.preheader87 ]
  %5 = getelementptr inbounds [2005 x %struct.Point], ptr @a, i64 0, i64 %indvars.iv
  %6 = getelementptr inbounds i8, ptr %5, i64 8
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %5, ptr noundef nonnull %6)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %8 = load i32, ptr @n, align 4, !tbaa !5
  %9 = sext i32 %8 to i64
  %.not71.not = icmp slt i64 %indvars.iv, %9
  br i1 %.not71.not, label %.lr.ph, label %.preheader86, !llvm.loop !9

._crit_edge102:                                   ; preds = %.loopexit, %.preheader86.._crit_edge102_crit_edge
  %.pre-phi = phi i64 [ %.pre133, %.preheader86.._crit_edge102_crit_edge ], [ %101, %.loopexit ]
  %.064.lcssa = phi i64 [ 0, %.preheader86.._crit_edge102_crit_edge ], [ %.4, %.loopexit ]
  %.lcssa89 = phi i32 [ %4, %.preheader86.._crit_edge102_crit_edge ], [ %100, %.loopexit ]
  %10 = add nsw i32 %.lcssa89, -1
  %11 = sext i32 %10 to i64
  %12 = mul nsw i64 %.pre-phi, %11
  %13 = add nsw i32 %.lcssa89, -2
  %14 = sext i32 %13 to i64
  %15 = mul nsw i64 %12, %14
  %16 = sdiv i64 %15, 6
  %17 = sub nsw i64 %16, %.064.lcssa
  %18 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %17)
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %.not = icmp eq i32 %19, -1
  br i1 %.not, label %._crit_edge106, label %.preheader87, !llvm.loop !11

.lr.ph101:                                        ; preds = %.preheader86, %.loopexit
  %indvars.iv129 = phi i64 [ %indvars.iv.next130, %.loopexit ], [ 1, %.preheader86 ]
  %20 = phi i32 [ %100, %.loopexit ], [ %8, %.preheader86 ]
  %.06499 = phi i64 [ %.4, %.loopexit ], [ 0, %.preheader86 ]
  %21 = getelementptr inbounds [2005 x %struct.Point], ptr @a, i64 0, i64 %indvars.iv129
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) @S, ptr noundef nonnull align 8 dereferenceable(24) %21, i64 24, i1 false), !tbaa.struct !12
  store i32 0, ptr @m, align 4, !tbaa !5
  %.not7392 = icmp slt i32 %20, 1
  br i1 %.not7392, label %.preheader85.._crit_edge_crit_edge, label %.lr.ph94.preheader

.lr.ph94.preheader:                               ; preds = %.lr.ph101
  %22 = zext nneg i32 %20 to i64
  %xtraiter = and i64 %22, 1
  %23 = icmp eq i32 %20, 1
  br i1 %23, label %.preheader85.unr-lcssa, label %.lr.ph94.preheader.new

.lr.ph94.preheader.new:                           ; preds = %.lr.ph94.preheader
  %unroll_iter = and i64 %22, 2147483646
  br label %.lr.ph94

.preheader85.unr-lcssa:                           ; preds = %42, %.lr.ph94.preheader
  %.lcssa167.ph = phi i32 [ poison, %.lr.ph94.preheader ], [ %43, %42 ]
  %indvars.iv111.unr = phi i64 [ 1, %.lr.ph94.preheader ], [ %indvars.iv.next112.1, %42 ]
  %.unr = phi i32 [ 0, %.lr.ph94.preheader ], [ %43, %42 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader85, label %.lr.ph94.epil

.lr.ph94.epil:                                    ; preds = %.preheader85.unr-lcssa
  %.not81.epil = icmp eq i64 %indvars.iv111.unr, %indvars.iv129
  br i1 %.not81.epil, label %.preheader85, label %24

24:                                               ; preds = %.lr.ph94.epil
  %25 = getelementptr inbounds [2005 x %struct.Point], ptr @a, i64 0, i64 %indvars.iv111.unr
  %26 = add nsw i32 %.unr, 1
  store i32 %26, ptr @m, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %27
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef nonnull align 8 dereferenceable(24) %25, i64 24, i1 false), !tbaa.struct !12
  br label %.preheader85

.preheader85:                                     ; preds = %.lr.ph94.epil, %24, %.preheader85.unr-lcssa
  %.lcssa167 = phi i32 [ %.lcssa167.ph, %.preheader85.unr-lcssa ], [ %.unr, %.lr.ph94.epil ], [ %26, %24 ]
  %.not7495 = icmp slt i32 %.lcssa167, 1
  br i1 %.not7495, label %.preheader85.._crit_edge_crit_edge, label %.lr.ph97

.preheader85.._crit_edge_crit_edge:               ; preds = %.lr.ph101, %.preheader85
  %29 = phi i32 [ %.lcssa167, %.preheader85 ], [ 0, %.lr.ph101 ]
  %.pre134 = sext i32 %29 to i64
  br label %._crit_edge

.lr.ph94:                                         ; preds = %42, %.lr.ph94.preheader.new
  %indvars.iv111 = phi i64 [ 1, %.lr.ph94.preheader.new ], [ %indvars.iv.next112.1, %42 ]
  %30 = phi i32 [ 0, %.lr.ph94.preheader.new ], [ %43, %42 ]
  %niter = phi i64 [ 0, %.lr.ph94.preheader.new ], [ %niter.next.1, %42 ]
  %.not81 = icmp eq i64 %indvars.iv111, %indvars.iv129
  br i1 %.not81, label %.lr.ph94.1, label %31

31:                                               ; preds = %.lr.ph94
  %32 = getelementptr inbounds [2005 x %struct.Point], ptr @a, i64 0, i64 %indvars.iv111
  %33 = add nsw i32 %30, 1
  store i32 %33, ptr @m, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %34
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %35, ptr noundef nonnull align 8 dereferenceable(24) %32, i64 24, i1 false), !tbaa.struct !12
  br label %.lr.ph94.1

.lr.ph94.1:                                       ; preds = %.lr.ph94, %31
  %36 = phi i32 [ %30, %.lr.ph94 ], [ %33, %31 ]
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %.not81.1 = icmp eq i64 %indvars.iv.next112, %indvars.iv129
  br i1 %.not81.1, label %42, label %37

37:                                               ; preds = %.lr.ph94.1
  %38 = getelementptr inbounds [2005 x %struct.Point], ptr @a, i64 0, i64 %indvars.iv.next112
  %39 = add nsw i32 %36, 1
  store i32 %39, ptr @m, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %40
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %41, ptr noundef nonnull align 8 dereferenceable(24) %38, i64 24, i1 false), !tbaa.struct !12
  br label %42

42:                                               ; preds = %37, %.lr.ph94.1
  %43 = phi i32 [ %36, %.lr.ph94.1 ], [ %39, %37 ]
  %indvars.iv.next112.1 = add nuw nsw i64 %indvars.iv111, 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 %.preheader85.unr-lcssa, label %.lr.ph94, !llvm.loop !15

._crit_edge:                                      ; preds = %.lr.ph97, %.preheader85.._crit_edge_crit_edge
  %.pre-phi135 = phi i64 [ %.pre134, %.preheader85.._crit_edge_crit_edge ], [ %49, %.lr.ph97 ]
  %gep = getelementptr %struct.Point, ptr getelementptr inbounds (i8, ptr @b, i64 24), i64 %.pre-phi135
  call void @_ZSt4sortIP5PointPFbS0_S0_EEvT_S4_T0_(ptr noundef nonnull getelementptr inbounds (i8, ptr @b, i64 24), ptr noundef nonnull %gep, ptr noundef nonnull @_Z3cmp5PointS_)
  %44 = call noundef zeroext i1 @_Z2ok5PointS_S_(ptr noundef nonnull byval(%struct.Point) align 8 @S, ptr noundef nonnull byval(%struct.Point) align 8 getelementptr inbounds (i8, ptr @b, i64 24), ptr noundef nonnull byval(%struct.Point) align 8 getelementptr inbounds (i8, ptr @b, i64 24))
  br i1 %44, label %.lr.ph166, label %..critedge_crit_edge

.lr.ph97:                                         ; preds = %.preheader85, %.lr.ph97
  %indvars.iv114 = phi i64 [ %indvars.iv.next115, %.lr.ph97 ], [ 1, %.preheader85 ]
  %45 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %indvars.iv114
  call void @_Zmi5PointS_(ptr dead_on_unwind nonnull writable sret(%struct.Point) align 8 %1, ptr noundef nonnull byval(%struct.Point) align 8 %45, ptr noundef nonnull byval(%struct.Point) align 8 @S)
  %46 = call noundef i32 @_Z3cal5Point(ptr noundef nonnull byval(%struct.Point) align 8 %1)
  %47 = getelementptr inbounds i8, ptr %45, i64 16
  store i32 %46, ptr %47, align 8, !tbaa !16
  %indvars.iv.next115 = add nuw nsw i64 %indvars.iv114, 1
  %48 = load i32, ptr @m, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %.not74.not = icmp slt i64 %indvars.iv114, %49
  br i1 %.not74.not, label %.lr.ph97, label %._crit_edge, !llvm.loop !18

..critedge_crit_edge:                             ; preds = %55, %._crit_edge
  %indvars.iv117.lcssa = phi i64 [ 1, %._crit_edge ], [ %indvars.iv.next118, %55 ]
  %.pre = load i32, ptr @m, align 4, !tbaa !5
  br label %.critedge

.lr.ph166:                                        ; preds = %._crit_edge, %55
  %50 = phi ptr [ %56, %55 ], [ getelementptr inbounds (i8, ptr @b, i64 24), %._crit_edge ]
  %indvars.iv117165 = phi i64 [ %indvars.iv.next118, %55 ], [ 1, %._crit_edge ]
  %51 = call noundef i64 @_Z5cross5PointS_S_(ptr noundef nonnull byval(%struct.Point) align 8 @S, ptr noundef nonnull byval(%struct.Point) align 8 getelementptr inbounds (i8, ptr @b, i64 24), ptr noundef nonnull byval(%struct.Point) align 8 %50)
  %52 = icmp slt i64 %51, 0
  %53 = load i32, ptr @m, align 4
  %54 = sext i32 %53 to i64
  %.not75 = icmp sgt i64 %indvars.iv117165, %54
  %or.cond = select i1 %52, i1 true, i1 %.not75
  br i1 %or.cond, label %.critedge, label %55

55:                                               ; preds = %.lr.ph166
  %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117165, 1
  %56 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %indvars.iv.next118
  %57 = call noundef zeroext i1 @_Z2ok5PointS_S_(ptr noundef nonnull byval(%struct.Point) align 8 @S, ptr noundef nonnull byval(%struct.Point) align 8 getelementptr inbounds (i8, ptr @b, i64 24), ptr noundef nonnull byval(%struct.Point) align 8 %56)
  br i1 %57, label %.lr.ph166, label %..critedge_crit_edge, !llvm.loop !19

.critedge:                                        ; preds = %.lr.ph166, %..critedge_crit_edge
  %indvars.iv117156 = phi i64 [ %indvars.iv117.lcssa, %..critedge_crit_edge ], [ %indvars.iv117165, %.lr.ph166 ]
  %58 = phi i32 [ %.pre, %..critedge_crit_edge ], [ %53, %.lr.ph166 ]
  %59 = trunc i64 %indvars.iv117156 to i32
  %60 = add nsw i32 %58, 1
  %61 = icmp eq i32 %60, %59
  br i1 %61, label %.loopexit, label %62

62:                                               ; preds = %.critedge
  %63 = add nsw i32 %59, -1
  br label %64

64:                                               ; preds = %.critedge2, %62
  %65 = phi i32 [ %96, %.critedge2 ], [ %58, %62 ]
  %indvars.iv126 = phi i64 [ %indvars.iv.next127, %.critedge2 ], [ 1, %62 ]
  %.165 = phi i64 [ %.266, %.critedge2 ], [ %.06499, %62 ]
  %.157 = phi i32 [ %97, %.critedge2 ], [ %63, %62 ]
  %.055 = phi i32 [ %spec.select84, %.critedge2 ], [ %59, %62 ]
  %66 = sext i32 %65 to i64
  %.not76 = icmp sgt i64 %indvars.iv126, %66
  br i1 %.not76, label %.loopexit, label %67

67:                                               ; preds = %64
  %68 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %indvars.iv126
  %69 = sext i32 %.055 to i64
  %70 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %69
  %71 = call noundef zeroext i1 @_Z2ok5PointS_S_(ptr noundef nonnull byval(%struct.Point) align 8 @S, ptr noundef nonnull byval(%struct.Point) align 8 %68, ptr noundef nonnull byval(%struct.Point) align 8 %70)
  br i1 %71, label %82, label %.preheader

.preheader:                                       ; preds = %67, %.preheader
  %indvars.iv120 = phi i64 [ %indvars.iv.next121, %.preheader ], [ %69, %67 ]
  %indvars.iv.next121 = add nsw i64 %indvars.iv120, 1
  %72 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %indvars.iv.next121
  %73 = call noundef zeroext i1 @_Z2ok5PointS_S_(ptr noundef nonnull byval(%struct.Point) align 8 @S, ptr noundef nonnull byval(%struct.Point) align 8 %68, ptr noundef nonnull byval(%struct.Point) align 8 %72)
  %74 = load i32, ptr @m, align 4
  %75 = sext i32 %74 to i64
  %76 = icmp sge i64 %indvars.iv120, %75
  %.not78 = select i1 %73, i1 true, i1 %76
  br i1 %.not78, label %77, label %.preheader, !llvm.loop !20

77:                                               ; preds = %.preheader
  %78 = trunc nsw i64 %indvars.iv120 to i32
  %79 = sub nsw i32 %78, %.157
  %80 = sext i32 %79 to i64
  %81 = add nsw i64 %.165, %80
  br label %82

82:                                               ; preds = %77, %67
  %.266 = phi i64 [ %.165, %67 ], [ %81, %77 ]
  %.2 = phi i32 [ %.055, %67 ], [ %78, %77 ]
  %indvars.iv.next127 = add nuw nsw i64 %indvars.iv126, 1
  %83 = sext i32 %.157 to i64
  %.not79 = icmp slt i64 %indvars.iv126, %83
  %84 = trunc nuw i64 %indvars.iv.next127 to i32
  %spec.select = select i1 %.not79, i32 %.157, i32 %84
  %85 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %indvars.iv.next127
  %86 = sext i32 %spec.select to i64
  br label %87

87:                                               ; preds = %90, %82
  %indvars.iv123 = phi i64 [ %indvars.iv.next124, %90 ], [ %86, %82 ]
  %indvars.iv.next124 = add nsw i64 %indvars.iv123, 1
  %88 = getelementptr inbounds [2005 x %struct.Point], ptr @b, i64 0, i64 %indvars.iv.next124
  %89 = call noundef zeroext i1 @_Z2ok5PointS_S_(ptr noundef nonnull byval(%struct.Point) align 8 @S, ptr noundef nonnull byval(%struct.Point) align 8 %85, ptr noundef nonnull byval(%struct.Point) align 8 %88)
  br i1 %89, label %90, label %..critedge2_crit_edge

..critedge2_crit_edge:                            ; preds = %87
  %.pre132 = load i32, ptr @m, align 4, !tbaa !5
  br label %.critedge2

90:                                               ; preds = %87
  %91 = call noundef i64 @_Z5cross5PointS_S_(ptr noundef nonnull byval(%struct.Point) align 8 @S, ptr noundef nonnull byval(%struct.Point) align 8 %85, ptr noundef nonnull byval(%struct.Point) align 8 %88)
  %92 = icmp sgt i64 %91, 0
  %93 = load i32, ptr @m, align 4
  %94 = sext i32 %93 to i64
  %95 = icmp slt i64 %indvars.iv123, %94
  %or.cond83 = select i1 %92, i1 %95, i1 false
  br i1 %or.cond83, label %87, label %.critedge2, !llvm.loop !21

.critedge2:                                       ; preds = %90, %..critedge2_crit_edge
  %96 = phi i32 [ %.pre132, %..critedge2_crit_edge ], [ %93, %90 ]
  %97 = trunc i64 %indvars.iv123 to i32
  %98 = trunc i64 %indvars.iv.next124 to i32
  %.not80 = icmp sgt i32 %.2, %97
  %spec.select84 = select i1 %.not80, i32 %.2, i32 %98
  %99 = icmp sgt i32 %spec.select84, %96
  br i1 %99, label %.loopexit, label %64, !llvm.loop !22

.loopexit:                                        ; preds = %64, %.critedge2, %.critedge
  %.4 = phi i64 [ %.06499, %.critedge ], [ %.165, %64 ], [ %.266, %.critedge2 ]
  %indvars.iv.next130 = add nuw nsw i64 %indvars.iv129, 1
  %100 = load i32, ptr @n, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %.not72.not = icmp slt i64 %indvars.iv129, %101
  br i1 %.not72.not, label %.lr.ph101, label %._crit_edge102, !llvm.loop !23

._crit_edge106:                                   ; preds = %._crit_edge102, %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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3cal5Point(ptr noundef byval(%struct.Point) align 8) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Zmi5PointS_(ptr dead_on_unwind noalias writable sret(%struct.Point) align 8, ptr noundef byval(%struct.Point) align 8, ptr noundef byval(%struct.Point) align 8) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z3cmp5PointS_(ptr noundef byval(%struct.Point) align 8, ptr noundef byval(%struct.Point) align 8) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z2ok5PointS_S_(ptr noundef byval(%struct.Point) align 8, ptr noundef byval(%struct.Point) align 8, ptr noundef byval(%struct.Point) align 8) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z5cross5PointS_S_(ptr noundef byval(%struct.Point) align 8, ptr noundef byval(%struct.Point) align 8, ptr noundef byval(%struct.Point) align 8) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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 = { 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 nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 #5 = { 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" }

!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 = !{i64 0, i64 8, !13, i64 8, i64 8, !13, i64 16, i64 4, !5}
!13 = !{!14, !14, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = distinct !{!15, !10}
!16 = !{!17, !6, i64 16}
!17 = !{!"_ZTS5Point", !14, i64 0, !14, i64 8, !6, i64 16}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass