; LLVM IR from tangjz/acm-icpc :: codeforces/gym (101201E)

; 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
@ord = external dso_local global [100001 x i32], align 16
@sz1 = external dso_local global i32, align 4
@stk1 = external dso_local global [200003 x i32], align 16
@sz2 = external dso_local global i32, align 4
@stk2 = external dso_local global [100001 x i32], align 16
@p = external dso_local global [100001 x %struct.Point], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11convex_hulliPiRiS_(i32 noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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)) #2 align 2

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %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 i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca %struct.Point, align 4
  %9 = alloca %struct.Point, align 4
  %10 = alloca i32, align 4
  %11 = alloca %struct.Point, align 4
  %12 = alloca %struct.Point, align 4
  %13 = alloca %struct.Point, align 4
  %14 = alloca %struct.Point, align 4
  %15 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %36, %0
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %20 = icmp slt i32 %18, %19
  br i1 %20, label %22, label %21

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

22:                                               ; preds = %17
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %24
  %26 = getelementptr inbounds %struct.Point, ptr %25, i32 0, i32 0
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %28
  %30 = getelementptr inbounds %struct.Point, ptr %29, i32 0, i32 1
  %31 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %26, ptr noundef %30)
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %34
  store i32 %32, ptr %35, align 4, !tbaa !5
  br label %36

36:                                               ; preds = %22
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %2, align 4, !tbaa !5
  br label %17, !llvm.loop !9

39:                                               ; preds = %21
  %40 = load i32, ptr @m, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds i32, ptr @ord, i64 %41
  call void @_ZSt4sortIPiPFbRKiS2_EEvT_S5_T0_(ptr noundef @ord, ptr noundef %42, ptr noundef @_Z3cmpRKiS0_)
  %43 = load i32, ptr @m, align 4, !tbaa !5
  call void @_Z11convex_hulliPiRiS_(i32 noundef %43, ptr noundef @ord, ptr noundef nonnull align 4 dereferenceable(4) @sz1, ptr noundef @stk1)
  %44 = load i32, ptr @n, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds i32, ptr @ord, i64 %45
  call void @_ZSt4sortIPiPFbRKiS2_EEvT_S5_T0_(ptr noundef @ord, ptr noundef %46, ptr noundef @_Z3cmpRKiS0_)
  %47 = load i32, ptr @n, align 4, !tbaa !5
  call void @_Z11convex_hulliPiRiS_(i32 noundef %47, ptr noundef @ord, ptr noundef nonnull align 4 dereferenceable(4) @sz2, ptr noundef @stk2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %63, %39
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = load i32, ptr @sz1, align 4, !tbaa !5
  %51 = icmp slt i32 %49, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %66

53:                                               ; preds = %48
  %54 = load i32, ptr %3, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = load i32, ptr @sz1, align 4, !tbaa !5
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = add nsw i32 %58, %59
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %61
  store i32 %57, ptr %62, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %53
  %64 = load i32, ptr %3, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %3, align 4, !tbaa !5
  br label %48, !llvm.loop !11

66:                                               ; preds = %52
  %67 = load i32, ptr @stk1, align 16, !tbaa !5
  %68 = load i32, ptr @sz1, align 4, !tbaa !5
  %69 = shl i32 %68, 1
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %70
  store i32 %67, ptr %71, align 4, !tbaa !5
  %72 = load i32, ptr getelementptr inbounds ([200003 x i32], ptr @stk1, i64 0, i64 1), align 4, !tbaa !5
  %73 = load i32, ptr @sz1, align 4, !tbaa !5
  %74 = shl i32 %73, 1
  %75 = or i32 %74, 1
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %76
  store i32 %72, ptr %77, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  store i64 0, ptr %6, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store i64 0, ptr %7, align 8, !tbaa !12
  br label %78

78:                                               ; preds = %99, %66
  %79 = load i32, ptr %5, align 4, !tbaa !5
  %80 = load i32, ptr @sz1, align 4, !tbaa !5
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %82, label %102

82:                                               ; preds = %78
  %83 = load i32, ptr %5, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %87
  %89 = load i32, ptr %5, align 4, !tbaa !5
  %90 = add nsw i32 %89, 1
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %94
  %96 = call noundef i64 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %88, ptr noundef nonnull align 4 dereferenceable(8) %95)
  %97 = load i64, ptr %7, align 8, !tbaa !12
  %98 = add nsw i64 %97, %96
  store i64 %98, ptr %7, align 8, !tbaa !12
  br label %99

99:                                               ; preds = %82
  %100 = load i32, ptr %5, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %5, align 4, !tbaa !5
  br label %78, !llvm.loop !14

102:                                              ; preds = %78
  br label %103

103:                                              ; preds = %144, %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %104 = load i32, ptr %5, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %108
  %110 = load i32, ptr @stk2, align 16, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %111
  %113 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %109, ptr noundef nonnull align 4 dereferenceable(8) %112)
  store i64 %113, ptr %8, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %114 = load i32, ptr %5, align 4, !tbaa !5
  %115 = sub nsw i32 %114, 1
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %119
  %121 = load i32, ptr @stk2, align 16, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %122
  %124 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %120, ptr noundef nonnull align 4 dereferenceable(8) %123)
  store i64 %124, ptr %9, align 4
  %125 = call noundef i64 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %9)
  %126 = icmp sge i64 %125, 0
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br i1 %126, label %127, label %147

127:                                              ; preds = %103
  %128 = load i32, ptr %5, align 4, !tbaa !5
  %129 = sub nsw i32 %128, 1
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %133
  %135 = load i32, ptr %5, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %136
  %138 = load i32, ptr %137, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %139
  %141 = call noundef i64 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %134, ptr noundef nonnull align 4 dereferenceable(8) %140)
  %142 = load i64, ptr %7, align 8, !tbaa !12
  %143 = sub nsw i64 %142, %141
  store i64 %143, ptr %7, align 8, !tbaa !12
  br label %144

144:                                              ; preds = %127
  %145 = load i32, ptr %5, align 4, !tbaa !5
  %146 = add nsw i32 %145, -1
  store i32 %146, ptr %5, align 4, !tbaa !5
  br label %103, !llvm.loop !15

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

148:                                              ; preds = %287, %147
  %149 = load i32, ptr %10, align 4, !tbaa !5
  %150 = load i32, ptr @sz2, align 4, !tbaa !5
  %151 = icmp slt i32 %149, %150
  br i1 %151, label %153, label %152

152:                                              ; preds = %148
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %290

153:                                              ; preds = %148
  br label %154

154:                                              ; preds = %201, %153
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %155 = load i32, ptr %4, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %156
  %158 = load i32, ptr %157, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %159
  %161 = load i32, ptr %10, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [100001 x i32], ptr @stk2, i64 0, i64 %162
  %164 = load i32, ptr %163, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %165
  %167 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %160, ptr noundef nonnull align 4 dereferenceable(8) %166)
  store i64 %167, ptr %11, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %168 = load i32, ptr %4, align 4, !tbaa !5
  %169 = add nsw i32 %168, 1
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %170
  %172 = load i32, ptr %171, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %173
  %175 = load i32, ptr %10, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [100001 x i32], ptr @stk2, i64 0, i64 %176
  %178 = load i32, ptr %177, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %179
  %181 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %174, ptr noundef nonnull align 4 dereferenceable(8) %180)
  store i64 %181, ptr %12, align 4
  %182 = call noundef i64 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(8) %12)
  %183 = icmp sle i64 %182, 0
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br i1 %183, label %184, label %204

184:                                              ; preds = %154
  %185 = load i32, ptr %4, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %186
  %188 = load i32, ptr %187, align 4, !tbaa !5
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %189
  %191 = load i32, ptr %4, align 4, !tbaa !5
  %192 = add nsw i32 %191, 1
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %193
  %195 = load i32, ptr %194, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %196
  %198 = call noundef i64 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %190, ptr noundef nonnull align 4 dereferenceable(8) %197)
  %199 = load i64, ptr %7, align 8, !tbaa !12
  %200 = sub nsw i64 %199, %198
  store i64 %200, ptr %7, align 8, !tbaa !12
  br label %201

201:                                              ; preds = %184
  %202 = load i32, ptr %4, align 4, !tbaa !5
  %203 = add nsw i32 %202, 1
  store i32 %203, ptr %4, align 4, !tbaa !5
  br label %154, !llvm.loop !16

204:                                              ; preds = %154
  br label %205

205:                                              ; preds = %252, %204
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %206 = load i32, ptr %5, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %207
  %209 = load i32, ptr %208, align 4, !tbaa !5
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %210
  %212 = load i32, ptr %10, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [100001 x i32], ptr @stk2, i64 0, i64 %213
  %215 = load i32, ptr %214, align 4, !tbaa !5
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %216
  %218 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %211, ptr noundef nonnull align 4 dereferenceable(8) %217)
  store i64 %218, ptr %13, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %219 = load i32, ptr %5, align 4, !tbaa !5
  %220 = add nsw i32 %219, 1
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %221
  %223 = load i32, ptr %222, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %224
  %226 = load i32, ptr %10, align 4, !tbaa !5
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds [100001 x i32], ptr @stk2, i64 0, i64 %227
  %229 = load i32, ptr %228, align 4, !tbaa !5
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %230
  %232 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %225, ptr noundef nonnull align 4 dereferenceable(8) %231)
  store i64 %232, ptr %14, align 4
  %233 = call noundef i64 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(8) %14)
  %234 = icmp sgt i64 %233, 0
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br i1 %234, label %235, label %255

235:                                              ; preds = %205
  %236 = load i32, ptr %5, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %237
  %239 = load i32, ptr %238, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %240
  %242 = load i32, ptr %5, align 4, !tbaa !5
  %243 = add nsw i32 %242, 1
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %244
  %246 = load i32, ptr %245, align 4, !tbaa !5
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %247
  %249 = call noundef i64 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %241, ptr noundef nonnull align 4 dereferenceable(8) %248)
  %250 = load i64, ptr %7, align 8, !tbaa !12
  %251 = add nsw i64 %250, %249
  store i64 %251, ptr %7, align 8, !tbaa !12
  br label %252

252:                                              ; preds = %235
  %253 = load i32, ptr %5, align 4, !tbaa !5
  %254 = add nsw i32 %253, 1
  store i32 %254, ptr %5, align 4, !tbaa !5
  br label %205, !llvm.loop !17

255:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %256 = load i64, ptr %7, align 8, !tbaa !12
  %257 = load i32, ptr %5, align 4, !tbaa !5
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %258
  %260 = load i32, ptr %259, align 4, !tbaa !5
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %261
  %263 = load i32, ptr %10, align 4, !tbaa !5
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds [100001 x i32], ptr @stk2, i64 0, i64 %264
  %266 = load i32, ptr %265, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %267
  %269 = call noundef i64 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %262, ptr noundef nonnull align 4 dereferenceable(8) %268)
  %270 = add nsw i64 %256, %269
  %271 = load i32, ptr %10, align 4, !tbaa !5
  %272 = sext i32 %271 to i64
  %273 = getelementptr inbounds [100001 x i32], ptr @stk2, i64 0, i64 %272
  %274 = load i32, ptr %273, align 4, !tbaa !5
  %275 = sext i32 %274 to i64
  %276 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %275
  %277 = load i32, ptr %4, align 4, !tbaa !5
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %278
  %280 = load i32, ptr %279, align 4, !tbaa !5
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %281
  %283 = call noundef i64 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %276, ptr noundef nonnull align 4 dereferenceable(8) %282)
  %284 = add nsw i64 %270, %283
  store i64 %284, ptr %15, align 8, !tbaa !12
  %285 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %15)
  %286 = load i64, ptr %285, align 8, !tbaa !12
  store i64 %286, ptr %6, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %287

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

290:                                              ; preds = %152
  %291 = load i64, ptr %6, align 8, !tbaa !12
  %292 = ashr i64 %291, 1
  %293 = load i64, ptr %6, align 8, !tbaa !12
  %294 = and i64 %293, 1
  %295 = icmp ne i64 %294, 0
  %296 = zext i1 %295 to i64
  %297 = select i1 %295, i8 53, i8 48
  %298 = sext i8 %297 to i32
  %299 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %292, i32 noundef %298)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  ret i32 0
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z3cmpRKiS0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #5

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { "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" }
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 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !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
@ord = external dso_local global [100001 x i32], align 16
@sz1 = external dso_local global i32, align 4
@stk1 = external dso_local global [200003 x i32], align 16
@sz2 = external dso_local global i32, align 4
@stk2 = external dso_local global [100001 x i32], align 16
@p = external dso_local global [100001 x %struct.Point], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11convex_hulliPiRiS_(i32 noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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 #2 align 2

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i64, 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 %struct.Point, align 8
  %8 = alloca i64, align 8
  %9 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %10 = load i32, ptr @n, align 4, !tbaa !5
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %12 = load i32, ptr @m, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds i32, ptr @ord, i64 %13
  tail call void @_ZSt4sortIPiPFbRKiS2_EEvT_S5_T0_(ptr noundef nonnull @ord, ptr noundef nonnull %14, ptr noundef nonnull @_Z3cmpRKiS0_)
  %15 = load i32, ptr @m, align 4, !tbaa !5
  tail call void @_Z11convex_hulliPiRiS_(i32 noundef %15, ptr noundef nonnull @ord, ptr noundef nonnull align 4 dereferenceable(4) @sz1, ptr noundef nonnull @stk1)
  %16 = load i32, ptr @n, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds i32, ptr @ord, i64 %17
  tail call void @_ZSt4sortIPiPFbRKiS2_EEvT_S5_T0_(ptr noundef nonnull @ord, ptr noundef nonnull %18, ptr noundef nonnull @_Z3cmpRKiS0_)
  %19 = load i32, ptr @n, align 4, !tbaa !5
  tail call void @_Z11convex_hulliPiRiS_(i32 noundef %19, ptr noundef nonnull @ord, ptr noundef nonnull align 4 dereferenceable(4) @sz2, ptr noundef nonnull @stk2)
  %20 = load i32, ptr @sz1, align 4, !tbaa !5
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph64.preheader, label %._crit_edge65

.lr.ph64.preheader:                               ; preds = %._crit_edge
  %22 = zext nneg i32 %20 to i64
  %min.iters.check = icmp ult i32 %20, 8
  br i1 %min.iters.check, label %.lr.ph64.preheader111, label %vector.ph

.lr.ph64.preheader111:                            ; preds = %middle.block, %.lr.ph64.preheader
  %indvars.iv82.ph = phi i64 [ 0, %.lr.ph64.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph64

vector.ph:                                        ; preds = %.lr.ph64.preheader
  %n.vec = and i64 %22, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %23 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %index
  %24 = getelementptr inbounds i8, ptr %23, i64 16
  %wide.load = load <4 x i32>, ptr %23, align 16, !tbaa !5
  %wide.load107 = load <4 x i32>, ptr %24, align 16, !tbaa !5
  %25 = add nuw nsw i64 %index, %22
  %26 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %25
  %27 = getelementptr inbounds i8, ptr %26, i64 16
  store <4 x i32> %wide.load, ptr %26, align 4, !tbaa !5
  store <4 x i32> %wide.load107, ptr %27, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %28 = icmp eq i64 %index.next, %n.vec
  br i1 %28, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %22
  br i1 %cmp.n, label %._crit_edge65, label %.lr.ph64.preheader111

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %29 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %indvars.iv
  %30 = getelementptr inbounds i8, ptr %29, i64 4
  %31 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %29, ptr noundef nonnull %30)
  %32 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %indvars.iv
  %33 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %33, ptr %32, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %34 = load i32, ptr @n, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = icmp slt i64 %indvars.iv.next, %35
  br i1 %36, label %.lr.ph, label %._crit_edge, !llvm.loop !13

._crit_edge65:                                    ; preds = %.lr.ph64, %middle.block, %._crit_edge
  %37 = load i32, ptr @stk1, align 16, !tbaa !5
  %38 = shl i32 %20, 1
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %39
  store i32 %37, ptr %40, align 8, !tbaa !5
  %41 = load i32, ptr getelementptr inbounds (i8, ptr @stk1, i64 4), align 4, !tbaa !5
  %42 = or disjoint i32 %38, 1
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %43
  store i32 %41, ptr %44, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  store i64 0, ptr %1, align 8, !tbaa !14
  br i1 %21, label %.lr.ph69, label %.preheader57.preheader

.preheader57.preheader:                           ; preds = %.preheader57.loopexit, %._crit_edge65
  %indvars.iv88.ph = phi i64 [ %49, %.preheader57.loopexit ], [ 0, %._crit_edge65 ]
  %.1.ph = phi i64 [ %59, %.preheader57.loopexit ], [ 0, %._crit_edge65 ]
  br label %.preheader57

.lr.ph64:                                         ; preds = %.lr.ph64.preheader111, %.lr.ph64
  %indvars.iv82 = phi i64 [ %indvars.iv.next83, %.lr.ph64 ], [ %indvars.iv82.ph, %.lr.ph64.preheader111 ]
  %45 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %indvars.iv82
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = add nuw nsw i64 %indvars.iv82, %22
  %48 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %47
  store i32 %46, ptr %48, align 4, !tbaa !5
  %indvars.iv.next83 = add nuw nsw i64 %indvars.iv82, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next83, %22
  br i1 %exitcond.not, label %._crit_edge65, label %.lr.ph64, !llvm.loop !16

.preheader57.loopexit:                            ; preds = %.lr.ph69
  %49 = and i64 %indvars.iv.next86, 4294967295
  br label %.preheader57.preheader

.lr.ph69:                                         ; preds = %._crit_edge65, %.lr.ph69
  %indvars.iv85 = phi i64 [ %indvars.iv.next86, %.lr.ph69 ], [ 0, %._crit_edge65 ]
  %.04467 = phi i64 [ %59, %.lr.ph69 ], [ 0, %._crit_edge65 ]
  %50 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %indvars.iv85
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %52
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %54 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %indvars.iv.next86
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %56
  %58 = tail call noundef i64 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %53, ptr noundef nonnull align 4 dereferenceable(8) %57)
  %59 = add nsw i64 %58, %.04467
  %60 = load i32, ptr @sz1, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = icmp slt i64 %indvars.iv.next86, %61
  br i1 %62, label %.lr.ph69, label %.preheader57.loopexit, !llvm.loop !17

.preheader57:                                     ; preds = %.preheader57.preheader, %83
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %83 ], [ %indvars.iv88.ph, %.preheader57.preheader ]
  %.1 = phi i64 [ %91, %83 ], [ %.1.ph, %.preheader57.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %63 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %indvars.iv88
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %65
  %67 = load i32, ptr @stk2, align 16, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %68
  %70 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %66, ptr noundef nonnull align 4 dereferenceable(8) %69)
  store i64 %70, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %indvars.iv.next89 = add nsw i64 %indvars.iv88, -1
  %71 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %indvars.iv.next89
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %73
  %75 = load i32, ptr @stk2, align 16, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %76
  %78 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %74, ptr noundef nonnull align 4 dereferenceable(8) %77)
  store i64 %78, ptr %3, align 8
  %79 = call noundef i64 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(8) %3)
  %80 = icmp sgt i64 %79, -1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  br i1 %80, label %83, label %.preheader56

.preheader56:                                     ; preds = %.preheader57
  %81 = load i32, ptr @sz2, align 4, !tbaa !5
  %82 = icmp sgt i32 %81, 0
  br i1 %82, label %.preheader55, label %._crit_edge77

83:                                               ; preds = %.preheader57
  %84 = load i32, ptr %71, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %85
  %87 = load i32, ptr %63, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %88
  %90 = call noundef i64 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %86, ptr noundef nonnull align 4 dereferenceable(8) %89)
  %91 = sub nsw i64 %.1, %90
  br label %.preheader57, !llvm.loop !18

.preheader55:                                     ; preds = %.preheader56, %156
  %indvars.iv97 = phi i64 [ %indvars.iv.next98, %156 ], [ 0, %.preheader56 ]
  %.275 = phi i64 [ %.4, %156 ], [ %.1, %.preheader56 ]
  %.24774.in = phi i64 [ %indvars.iv94, %156 ], [ %indvars.iv88, %.preheader56 ]
  %.04973 = phi i64 [ %indvars.iv91, %156 ], [ 0, %.preheader56 ]
  %92 = getelementptr inbounds [100001 x i32], ptr @stk2, i64 0, i64 %indvars.iv97
  %sext = shl i64 %.04973, 32
  %93 = ashr exact i64 %sext, 32
  br label %99

._crit_edge77:                                    ; preds = %156, %.preheader56
  %94 = phi i64 [ 0, %.preheader56 ], [ %174, %156 ]
  %95 = ashr i64 %94, 1
  %96 = and i64 %94, 1
  %.not = icmp eq i64 %96, 0
  %97 = select i1 %.not, i32 48, i32 53
  %98 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %95, i32 noundef %97)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret i32 0

99:                                               ; preds = %.preheader55, %119
  %indvars.iv91 = phi i64 [ %93, %.preheader55 ], [ %indvars.iv.next92, %119 ]
  %.3 = phi i64 [ %.275, %.preheader55 ], [ %127, %119 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %100 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %indvars.iv91
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %102
  %104 = load i32, ptr %92, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %105
  %107 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %103, ptr noundef nonnull align 4 dereferenceable(8) %106)
  store i64 %107, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %indvars.iv.next92 = add nsw i64 %indvars.iv91, 1
  %108 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %indvars.iv.next92
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %110
  %112 = load i32, ptr %92, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %113
  %115 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %111, ptr noundef nonnull align 4 dereferenceable(8) %114)
  store i64 %115, ptr %5, align 8
  %116 = call noundef i64 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %5)
  %117 = icmp slt i64 %116, 1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br i1 %117, label %119, label %.preheader

.preheader:                                       ; preds = %99
  %sext100 = shl i64 %.24774.in, 32
  %118 = ashr exact i64 %sext100, 32
  br label %128

119:                                              ; preds = %99
  %120 = load i32, ptr %100, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %121
  %123 = load i32, ptr %108, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %124
  %126 = call noundef i64 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %122, ptr noundef nonnull align 4 dereferenceable(8) %125)
  %127 = sub nsw i64 %.3, %126
  br label %99, !llvm.loop !19

128:                                              ; preds = %.preheader, %147
  %indvars.iv94 = phi i64 [ %118, %.preheader ], [ %indvars.iv.next95, %147 ]
  %.4 = phi i64 [ %.3, %.preheader ], [ %155, %147 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %129 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %indvars.iv94
  %130 = load i32, ptr %129, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %131
  %133 = load i32, ptr %92, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %134
  %136 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %132, ptr noundef nonnull align 4 dereferenceable(8) %135)
  store i64 %136, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %indvars.iv.next95 = add nsw i64 %indvars.iv94, 1
  %137 = getelementptr inbounds [200003 x i32], ptr @stk1, i64 0, i64 %indvars.iv.next95
  %138 = load i32, ptr %137, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %139
  %141 = load i32, ptr %92, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %142
  %144 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %140, ptr noundef nonnull align 4 dereferenceable(8) %143)
  store i64 %144, ptr %7, align 8
  %145 = call noundef i64 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %7)
  %146 = icmp sgt i64 %145, 0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br i1 %146, label %147, label %156

147:                                              ; preds = %128
  %148 = load i32, ptr %129, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %149
  %151 = load i32, ptr %137, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %152
  %154 = call noundef i64 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %150, ptr noundef nonnull align 4 dereferenceable(8) %153)
  %155 = add nsw i64 %154, %.4
  br label %128, !llvm.loop !20

156:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %157 = load i32, ptr %129, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %158
  %160 = load i32, ptr %92, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %161
  %163 = call noundef i64 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %159, ptr noundef nonnull align 4 dereferenceable(8) %162)
  %164 = add nsw i64 %163, %.4
  %165 = load i32, ptr %92, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %166
  %168 = load i32, ptr %100, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %169
  %171 = call noundef i64 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %167, ptr noundef nonnull align 4 dereferenceable(8) %170)
  %172 = add nsw i64 %164, %171
  store i64 %172, ptr %8, align 8, !tbaa !14
  %173 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %174 = load i64, ptr %173, align 8, !tbaa !14
  store i64 %174, ptr %1, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1
  %175 = load i32, ptr @sz2, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = icmp slt i64 %indvars.iv.next98, %176
  br i1 %177, label %.preheader55, label %._crit_edge77, !llvm.loop !21
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z3cmpRKiS0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #5

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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 #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" }
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, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10}
!14 = !{!15, !15, i64 0}
!15 = !{!"long long", !7, i64 0}
!16 = distinct !{!16, !10, !12, !11}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}


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