; LLVM IR from tangjz/acm-icpc :: codechef/MAY18 (NONCONVX)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.Point = type { i32, i32 }
%class.anon.2 = type { i8 }

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@lim = external dso_local global i32, align 4
@ord = external dso_local global [201 x i32], align 16
@sz = external dso_local global i32, align 4
@idx = external dso_local global [201 x i32], align 16
@ans = external dso_local global i64, align 8
@p = external dso_local global [201 x %struct.Point], align 16
@q = external dso_local global [201 x %struct.Point], align 16
@out = external dso_local global [201 x %struct.Point], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZZ4mainE3rnk = external hidden global [201 x i32], align 16
@_ZZ4mainE1a = external hidden global [201 x %struct.Point], align 16
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: nounwind
declare i32 @rand() #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z6rand30v() #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: mustprogress nounwind uwtable
declare dso_local i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5checkv() #4

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #5 {
  %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 %struct.Point, align 4
  %7 = alloca %class.anon.2, align 1
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %struct.Point, align 4
  %18 = alloca %struct.Point, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca double, align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca %struct.Point, align 4
  %30 = alloca %struct.Point, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %34 = call i64 @time(ptr noundef null) #10
  %35 = trunc i64 %34 to i32
  call void @srand(i32 noundef %35) #10
  %36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %37

37:                                               ; preds = %470, %0
  %38 = load i32, ptr @t, align 4, !tbaa !5
  %39 = add nsw i32 %38, -1
  store i32 %39, ptr @t, align 4, !tbaa !5
  %40 = icmp ne i32 %38, 0
  br i1 %40, label %41, label %471

41:                                               ; preds = %37
  %42 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @n, ptr noundef @m, ptr noundef @lim)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #10
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #10
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #10
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %73, %41
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = load i32, ptr @n, align 4, !tbaa !5
  %46 = icmp sle i32 %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #10
  br label %76

48:                                               ; preds = %43
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [201 x %struct.Point], ptr @p, i64 0, i64 %50
  call void @_ZN5Point4readEv(ptr noundef nonnull align 4 dereferenceable(8) %51)
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [201 x %struct.Point], ptr @p, i64 0, i64 %53
  %55 = getelementptr inbounds %struct.Point, ptr %54, i32 0, i32 0
  %56 = load i32, ptr %55, align 8, !tbaa !9
  %57 = load i32, ptr %2, align 4, !tbaa !5
  %58 = add nsw i32 %57, %56
  store i32 %58, ptr %2, align 4, !tbaa !5
  %59 = load i32, ptr %4, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [201 x %struct.Point], ptr @p, i64 0, i64 %60
  %62 = getelementptr inbounds %struct.Point, ptr %61, i32 0, i32 1
  %63 = load i32, ptr %62, align 4, !tbaa !11
  %64 = load i32, ptr %3, align 4, !tbaa !5
  %65 = add nsw i32 %64, %63
  store i32 %65, ptr %3, align 4, !tbaa !5
  %66 = load i32, ptr %4, align 4, !tbaa !5
  %67 = load i32, ptr %4, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [201 x i32], ptr @ord, i64 0, i64 %68
  store i32 %66, ptr %69, align 4, !tbaa !5
  %70 = load i32, ptr %4, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [201 x i32], ptr @_ZZ4mainE3rnk, i64 0, i64 %71
  store i32 %66, ptr %72, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %48
  %74 = load i32, ptr %4, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %4, align 4, !tbaa !5
  br label %43, !llvm.loop !12

76:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #10
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %106, %76
  %78 = load i32, ptr %5, align 4, !tbaa !5
  %79 = load i32, ptr @n, align 4, !tbaa !5
  %80 = icmp sle i32 %78, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #10
  br label %109

82:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #10
  %83 = getelementptr inbounds %struct.Point, ptr %6, i32 0, i32 0
  %84 = load i32, ptr %5, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [201 x %struct.Point], ptr @p, i64 0, i64 %85
  %87 = getelementptr inbounds %struct.Point, ptr %86, i32 0, i32 0
  %88 = load i32, ptr %87, align 8, !tbaa !9
  %89 = load i32, ptr @n, align 4, !tbaa !5
  %90 = mul nsw i32 %88, %89
  %91 = load i32, ptr %2, align 4, !tbaa !5
  %92 = sub nsw i32 %90, %91
  store i32 %92, ptr %83, align 4, !tbaa !9
  %93 = getelementptr inbounds %struct.Point, ptr %6, i32 0, i32 1
  %94 = load i32, ptr %5, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [201 x %struct.Point], ptr @p, i64 0, i64 %95
  %97 = getelementptr inbounds %struct.Point, ptr %96, i32 0, i32 1
  %98 = load i32, ptr %97, align 4, !tbaa !11
  %99 = load i32, ptr @n, align 4, !tbaa !5
  %100 = mul nsw i32 %98, %99
  %101 = load i32, ptr %3, align 4, !tbaa !5
  %102 = sub nsw i32 %100, %101
  store i32 %102, ptr %93, align 4, !tbaa !11
  %103 = load i32, ptr %5, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [201 x %struct.Point], ptr @_ZZ4mainE1a, i64 0, i64 %104
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %105, ptr align 4 %6, i64 8, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #10
  br label %106

106:                                              ; preds = %82
  %107 = load i32, ptr %5, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %5, align 4, !tbaa !5
  br label %77, !llvm.loop !15

109:                                              ; preds = %81
  %110 = load i32, ptr @n, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds i32, ptr @_ZZ4mainE3rnk, i64 %111
  %113 = getelementptr inbounds i32, ptr %112, i64 1
  call void @"_ZSt4sortIPiZ4mainE3$_0EvT_S2_T0_"(ptr noundef getelementptr inbounds (i32, ptr @_ZZ4mainE3rnk, i64 1), ptr noundef %113)
  store i64 9223372036854775807, ptr @ans, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #10
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %114

114:                                              ; preds = %126, %109
  %115 = load i32, ptr %8, align 4, !tbaa !5
  %116 = load i32, ptr @n, align 4, !tbaa !5
  %117 = icmp sle i32 %115, %116
  br i1 %117, label %119, label %118

118:                                              ; preds = %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #10
  br label %129

119:                                              ; preds = %114
  %120 = load i32, ptr %8, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [201 x %struct.Point], ptr @p, i64 0, i64 %121
  %123 = load i32, ptr %8, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [201 x %struct.Point], ptr @q, i64 0, i64 %124
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %125, ptr align 8 %122, i64 8, i1 false), !tbaa.struct !14
  br label %126

126:                                              ; preds = %119
  %127 = load i32, ptr %8, align 4, !tbaa !5
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %8, align 4, !tbaa !5
  br label %114, !llvm.loop !18

129:                                              ; preds = %118
  call void @_Z5checkv()
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #10
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %130

130:                                              ; preds = %233, %129
  %131 = load i32, ptr %9, align 4, !tbaa !5
  %132 = icmp slt i32 %131, 2000
  br i1 %132, label %134, label %133

133:                                              ; preds = %130
  store i32 13, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #10
  br label %236

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

135:                                              ; preds = %154, %134
  %136 = load i32, ptr %11, align 4, !tbaa !5
  %137 = load i32, ptr @m, align 4, !tbaa !5
  %138 = icmp sle i32 %136, %137
  br i1 %138, label %140, label %139

139:                                              ; preds = %135
  store i32 16, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #10
  br label %157

140:                                              ; preds = %135
  %141 = load i32, ptr %11, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [201 x i32], ptr @ord, i64 0, i64 %142
  %144 = load i32, ptr %11, align 4, !tbaa !5
  %145 = call i32 @rand() #10
  %146 = load i32, ptr @n, align 4, !tbaa !5
  %147 = load i32, ptr %11, align 4, !tbaa !5
  %148 = sub nsw i32 %146, %147
  %149 = add nsw i32 %148, 1
  %150 = srem i32 %145, %149
  %151 = add nsw i32 %144, %150
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [201 x i32], ptr @ord, i64 0, i64 %152
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %143, ptr noundef nonnull align 4 dereferenceable(4) %153) #10
  br label %154

154:                                              ; preds = %140
  %155 = load i32, ptr %11, align 4, !tbaa !5
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %11, align 4, !tbaa !5
  br label %135, !llvm.loop !19

157:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #10
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %158

158:                                              ; preds = %170, %157
  %159 = load i32, ptr %12, align 4, !tbaa !5
  %160 = load i32, ptr @n, align 4, !tbaa !5
  %161 = icmp sle i32 %159, %160
  br i1 %161, label %163, label %162

162:                                              ; preds = %158
  store i32 19, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #10
  br label %173

163:                                              ; preds = %158
  %164 = load i32, ptr %12, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [201 x %struct.Point], ptr @p, i64 0, i64 %165
  %167 = load i32, ptr %12, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [201 x %struct.Point], ptr @q, i64 0, i64 %168
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %169, ptr align 8 %166, i64 8, i1 false), !tbaa.struct !14
  br label %170

170:                                              ; preds = %163
  %171 = load i32, ptr %12, align 4, !tbaa !5
  %172 = add nsw i32 %171, 1
  store i32 %172, ptr %12, align 4, !tbaa !5
  br label %158, !llvm.loop !20

173:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #10
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %174

174:                                              ; preds = %229, %173
  %175 = load i32, ptr %13, align 4, !tbaa !5
  %176 = load i32, ptr @m, align 4, !tbaa !5
  %177 = icmp sle i32 %175, %176
  br i1 %177, label %179, label %178

178:                                              ; preds = %174
  store i32 22, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  br label %232

179:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #10
  %180 = call noundef i32 @_Z6rand30v()
  %181 = load i32, ptr @lim, align 4, !tbaa !5
  %182 = load i32, ptr @lim, align 4, !tbaa !5
  %183 = mul nsw i32 %181, %182
  %184 = srem i32 %180, %183
  %185 = sitofp i32 %184 to x86_fp80
  %186 = call x86_fp80 @sqrtl(x86_fp80 noundef %185) #10
  %187 = fptosi x86_fp80 %186 to i32
  store i32 %187, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #10
  %188 = call i32 @rand() #10
  %189 = load i32, ptr %14, align 4, !tbaa !5
  %190 = shl i32 %189, 1
  %191 = or i32 %190, 1
  %192 = srem i32 %188, %191
  %193 = load i32, ptr %14, align 4, !tbaa !5
  %194 = sub nsw i32 %192, %193
  store i32 %194, ptr %15, align 4, !tbaa !5
  %195 = load i32, ptr %14, align 4, !tbaa !5
  %196 = load i32, ptr %14, align 4, !tbaa !5
  %197 = mul nsw i32 %195, %196
  %198 = load i32, ptr %15, align 4, !tbaa !5
  %199 = load i32, ptr %15, align 4, !tbaa !5
  %200 = mul nsw i32 %198, %199
  %201 = sub nsw i32 %197, %200
  %202 = sitofp i32 %201 to x86_fp80
  %203 = call x86_fp80 @sqrtl(x86_fp80 noundef %202) #10
  %204 = fptosi x86_fp80 %203 to i32
  store i32 %204, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #10
  %205 = call i32 @rand() #10
  %206 = load i32, ptr %14, align 4, !tbaa !5
  %207 = shl i32 %206, 1
  %208 = or i32 %207, 1
  %209 = srem i32 %205, %208
  %210 = load i32, ptr %14, align 4, !tbaa !5
  %211 = sub nsw i32 %209, %210
  store i32 %211, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #10
  %212 = load i32, ptr %13, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [201 x i32], ptr @ord, i64 0, i64 %213
  %215 = load i32, ptr %214, align 4, !tbaa !5
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [201 x %struct.Point], ptr @p, i64 0, i64 %216
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #10
  %218 = getelementptr inbounds %struct.Point, ptr %18, i32 0, i32 0
  %219 = load i32, ptr %15, align 4, !tbaa !5
  store i32 %219, ptr %218, align 4, !tbaa !9
  %220 = getelementptr inbounds %struct.Point, ptr %18, i32 0, i32 1
  %221 = load i32, ptr %16, align 4, !tbaa !5
  store i32 %221, ptr %220, align 4, !tbaa !11
  %222 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %217, ptr noundef nonnull align 4 dereferenceable(8) %18)
  store i64 %222, ptr %17, align 4
  %223 = load i32, ptr %13, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [201 x i32], ptr @ord, i64 0, i64 %224
  %226 = load i32, ptr %225, align 4, !tbaa !5
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds [201 x %struct.Point], ptr @q, i64 0, i64 %227
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %228, ptr align 4 %17, i64 8, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #10
  br label %229

229:                                              ; preds = %179
  %230 = load i32, ptr %13, align 4, !tbaa !5
  %231 = add nsw i32 %230, 1
  store i32 %231, ptr %13, align 4, !tbaa !5
  br label %174, !llvm.loop !21

232:                                              ; preds = %178
  call void @_Z5checkv()
  br label %233

233:                                              ; preds = %232
  %234 = load i32, ptr %9, align 4, !tbaa !5
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %9, align 4, !tbaa !5
  br label %130, !llvm.loop !22

236:                                              ; preds = %133
  %237 = load i32, ptr @n, align 4, !tbaa !5
  %238 = sext i32 %237 to i64
  %239 = mul i64 %238, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 getelementptr inbounds (i32, ptr @ord, i64 1), ptr align 4 getelementptr inbounds (i32, ptr @_ZZ4mainE3rnk, i64 1), i64 %239, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #10
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %240

240:                                              ; preds = %430, %236
  %241 = load i32, ptr %19, align 4, !tbaa !5
  %242 = icmp slt i32 %241, 3000
  br i1 %242, label %244, label %243

243:                                              ; preds = %240
  store i32 25, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #10
  br label %433

244:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #10
  store i32 1, ptr %20, align 4, !tbaa !5
  br label %245

245:                                              ; preds = %257, %244
  %246 = load i32, ptr %20, align 4, !tbaa !5
  %247 = load i32, ptr @n, align 4, !tbaa !5
  %248 = icmp sle i32 %246, %247
  br i1 %248, label %250, label %249

249:                                              ; preds = %245
  store i32 28, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #10
  br label %260

250:                                              ; preds = %245
  %251 = load i32, ptr %20, align 4, !tbaa !5
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds [201 x %struct.Point], ptr @p, i64 0, i64 %252
  %254 = load i32, ptr %20, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [201 x %struct.Point], ptr @q, i64 0, i64 %255
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %256, ptr align 8 %253, i64 8, i1 false), !tbaa.struct !14
  br label %257

257:                                              ; preds = %250
  %258 = load i32, ptr %20, align 4, !tbaa !5
  %259 = add nsw i32 %258, 1
  store i32 %259, ptr %20, align 4, !tbaa !5
  br label %245, !llvm.loop !23

260:                                              ; preds = %249
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #10
  %261 = load i32, ptr @m, align 4, !tbaa !5
  store i32 %261, ptr %21, align 4, !tbaa !5
  br label %262

262:                                              ; preds = %403, %260
  %263 = load i32, ptr %21, align 4, !tbaa !5
  %264 = icmp sge i32 %263, 1
  br i1 %264, label %266, label %265

265:                                              ; preds = %262
  store i32 31, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #10
  br label %406

266:                                              ; preds = %262
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #10
  %267 = load i32, ptr %21, align 4, !tbaa !5
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds [201 x i32], ptr @_ZZ4mainE3rnk, i64 0, i64 %268
  %270 = load i32, ptr %269, align 4, !tbaa !5
  store i32 %270, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #10
  %271 = load i32, ptr %22, align 4, !tbaa !5
  %272 = sext i32 %271 to i64
  %273 = getelementptr inbounds [201 x %struct.Point], ptr @_ZZ4mainE1a, i64 0, i64 %272
  %274 = getelementptr inbounds %struct.Point, ptr %273, i32 0, i32 0
  %275 = load i32, ptr %274, align 8, !tbaa !9
  %276 = sitofp i32 %275 to double
  %277 = load i32, ptr %22, align 4, !tbaa !5
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds [201 x %struct.Point], ptr @_ZZ4mainE1a, i64 0, i64 %278
  %280 = getelementptr inbounds %struct.Point, ptr %279, i32 0, i32 0
  %281 = load i32, ptr %280, align 8, !tbaa !9
  %282 = sitofp i32 %281 to double
  %283 = fmul double %276, %282
  %284 = load i32, ptr %22, align 4, !tbaa !5
  %285 = sext i32 %284 to i64
  %286 = getelementptr inbounds [201 x %struct.Point], ptr @_ZZ4mainE1a, i64 0, i64 %285
  %287 = call noundef i64 @_ZNK5Point4len2Ev(ptr noundef nonnull align 4 dereferenceable(8) %286)
  %288 = sitofp i64 %287 to double
  %289 = fdiv double %283, %288
  store double %289, ptr %23, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #10
  %290 = load i32, ptr %22, align 4, !tbaa !5
  %291 = sext i32 %290 to i64
  %292 = getelementptr inbounds [201 x %struct.Point], ptr @_ZZ4mainE1a, i64 0, i64 %291
  %293 = call noundef i64 @_ZNK5Point4len2Ev(ptr noundef nonnull align 4 dereferenceable(8) %292)
  store i64 %293, ptr %25, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #10
  %294 = load i32, ptr @lim, align 4, !tbaa !5
  %295 = sext i32 %294 to i64
  %296 = load i32, ptr @lim, align 4, !tbaa !5
  %297 = sext i32 %296 to i64
  %298 = mul nsw i64 %295, %297
  %299 = load i32, ptr @n, align 4, !tbaa !5
  %300 = sext i32 %299 to i64
  %301 = mul nsw i64 %298, %300
  %302 = load i32, ptr @n, align 4, !tbaa !5
  %303 = sext i32 %302 to i64
  %304 = mul nsw i64 %301, %303
  store i64 %304, ptr %26, align 8, !tbaa !16
  %305 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26)
  %306 = load i64, ptr %305, align 8, !tbaa !16
  %307 = load i32, ptr @n, align 4, !tbaa !5
  %308 = sext i32 %307 to i64
  %309 = sdiv i64 %306, %308
  %310 = load i32, ptr @n, align 4, !tbaa !5
  %311 = sext i32 %310 to i64
  %312 = sdiv i64 %309, %311
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #10
  store i64 %312, ptr %24, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #10
  %313 = load i64, ptr %24, align 8, !tbaa !16
  %314 = sitofp i64 %313 to double
  %315 = load double, ptr %23, align 8, !tbaa !24
  %316 = fmul double %314, %315
  %317 = fpext double %316 to x86_fp80
  %318 = call x86_fp80 @sqrtl(x86_fp80 noundef %317) #10
  %319 = call i32 @rand() #10
  %320 = load i32, ptr @n, align 4, !tbaa !5
  %321 = sitofp i32 %320 to x86_fp80
  %322 = call x86_fp80 @sqrtl(x86_fp80 noundef %321) #10
  %323 = fptosi x86_fp80 %322 to i32
  %324 = srem i32 %319, %323
  %325 = sitofp i32 %324 to x86_fp80
  %326 = fsub x86_fp80 %318, %325
  %327 = load i32, ptr %22, align 4, !tbaa !5
  %328 = sext i32 %327 to i64
  %329 = getelementptr inbounds [201 x %struct.Point], ptr @_ZZ4mainE1a, i64 0, i64 %328
  %330 = getelementptr inbounds %struct.Point, ptr %329, i32 0, i32 0
  %331 = load i32, ptr %330, align 8, !tbaa !9
  %332 = call noundef i32 @_Z3sgni(i32 noundef %331)
  %333 = sitofp i32 %332 to x86_fp80
  %334 = fmul x86_fp80 %326, %333
  %335 = fptosi x86_fp80 %334 to i32
  store i32 %335, ptr %27, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #10
  %336 = load i64, ptr %24, align 8, !tbaa !16
  %337 = sitofp i64 %336 to double
  %338 = load double, ptr %23, align 8, !tbaa !24
  %339 = fsub double 1.000000e+00, %338
  %340 = fmul double %337, %339
  %341 = fpext double %340 to x86_fp80
  %342 = call x86_fp80 @sqrtl(x86_fp80 noundef %341) #10
  %343 = call i32 @rand() #10
  %344 = load i32, ptr @n, align 4, !tbaa !5
  %345 = sitofp i32 %344 to x86_fp80
  %346 = call x86_fp80 @sqrtl(x86_fp80 noundef %345) #10
  %347 = fptosi x86_fp80 %346 to i32
  %348 = srem i32 %343, %347
  %349 = sitofp i32 %348 to x86_fp80
  %350 = fsub x86_fp80 %342, %349
  %351 = load i32, ptr %22, align 4, !tbaa !5
  %352 = sext i32 %351 to i64
  %353 = getelementptr inbounds [201 x %struct.Point], ptr @_ZZ4mainE1a, i64 0, i64 %352
  %354 = getelementptr inbounds %struct.Point, ptr %353, i32 0, i32 1
  %355 = load i32, ptr %354, align 4, !tbaa !11
  %356 = call noundef i32 @_Z3sgni(i32 noundef %355)
  %357 = sitofp i32 %356 to x86_fp80
  %358 = fmul x86_fp80 %350, %357
  %359 = fptosi x86_fp80 %358 to i32
  store i32 %359, ptr %28, align 4, !tbaa !5
  br label %360

360:                                              ; preds = %389, %266
  %361 = load i32, ptr %27, align 4, !tbaa !5
  %362 = load i32, ptr %27, align 4, !tbaa !5
  %363 = mul nsw i32 %361, %362
  %364 = load i32, ptr %28, align 4, !tbaa !5
  %365 = load i32, ptr %28, align 4, !tbaa !5
  %366 = mul nsw i32 %364, %365
  %367 = add nsw i32 %363, %366
  %368 = load i32, ptr @lim, align 4, !tbaa !5
  %369 = load i32, ptr @lim, align 4, !tbaa !5
  %370 = mul nsw i32 %368, %369
  %371 = icmp sgt i32 %367, %370
  br i1 %371, label %372, label %391

372:                                              ; preds = %360
  br label %373

373:                                              ; preds = %372
  %374 = load i32, ptr %27, align 4, !tbaa !5
  %375 = call i32 @llvm.abs.i32(i32 %374, i1 true)
  %376 = load i32, ptr %28, align 4, !tbaa !5
  %377 = call i32 @llvm.abs.i32(i32 %376, i1 true)
  %378 = icmp slt i32 %375, %377
  br i1 %378, label %379, label %384

379:                                              ; preds = %373
  %380 = load i32, ptr %28, align 4, !tbaa !5
  %381 = call noundef i32 @_Z3sgni(i32 noundef %380)
  %382 = load i32, ptr %28, align 4, !tbaa !5
  %383 = sub nsw i32 %382, %381
  store i32 %383, ptr %28, align 4, !tbaa !5
  br label %389

384:                                              ; preds = %373
  %385 = load i32, ptr %27, align 4, !tbaa !5
  %386 = call noundef i32 @_Z3sgni(i32 noundef %385)
  %387 = load i32, ptr %27, align 4, !tbaa !5
  %388 = sub nsw i32 %387, %386
  store i32 %388, ptr %27, align 4, !tbaa !5
  br label %389

389:                                              ; preds = %384, %379
  %390 = phi ptr [ %28, %379 ], [ %27, %384 ]
  br label %360, !llvm.loop !26

391:                                              ; preds = %360
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #10
  %392 = load i32, ptr %22, align 4, !tbaa !5
  %393 = sext i32 %392 to i64
  %394 = getelementptr inbounds [201 x %struct.Point], ptr @p, i64 0, i64 %393
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #10
  %395 = getelementptr inbounds %struct.Point, ptr %30, i32 0, i32 0
  %396 = load i32, ptr %27, align 4, !tbaa !5
  store i32 %396, ptr %395, align 4, !tbaa !9
  %397 = getelementptr inbounds %struct.Point, ptr %30, i32 0, i32 1
  %398 = load i32, ptr %28, align 4, !tbaa !5
  store i32 %398, ptr %397, align 4, !tbaa !11
  %399 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %394, ptr noundef nonnull align 4 dereferenceable(8) %30)
  store i64 %399, ptr %29, align 4
  %400 = load i32, ptr %22, align 4, !tbaa !5
  %401 = sext i32 %400 to i64
  %402 = getelementptr inbounds [201 x %struct.Point], ptr @q, i64 0, i64 %401
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %402, ptr align 4 %29, i64 8, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #10
  br label %403

403:                                              ; preds = %391
  %404 = load i32, ptr %21, align 4, !tbaa !5
  %405 = add nsw i32 %404, -1
  store i32 %405, ptr %21, align 4, !tbaa !5
  br label %262, !llvm.loop !27

406:                                              ; preds = %265
  call void @_Z5checkv()
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #10
  store i32 1, ptr %31, align 4, !tbaa !5
  br label %407

407:                                              ; preds = %426, %406
  %408 = load i32, ptr %31, align 4, !tbaa !5
  %409 = load i32, ptr @m, align 4, !tbaa !5
  %410 = icmp sle i32 %408, %409
  br i1 %410, label %412, label %411

411:                                              ; preds = %407
  store i32 37, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #10
  br label %429

412:                                              ; preds = %407
  %413 = load i32, ptr %31, align 4, !tbaa !5
  %414 = sext i32 %413 to i64
  %415 = getelementptr inbounds [201 x i32], ptr @ord, i64 0, i64 %414
  %416 = load i32, ptr %31, align 4, !tbaa !5
  %417 = call i32 @rand() #10
  %418 = load i32, ptr @n, align 4, !tbaa !5
  %419 = load i32, ptr %31, align 4, !tbaa !5
  %420 = sub nsw i32 %418, %419
  %421 = add nsw i32 %420, 1
  %422 = srem i32 %417, %421
  %423 = add nsw i32 %416, %422
  %424 = sext i32 %423 to i64
  %425 = getelementptr inbounds [201 x i32], ptr @ord, i64 0, i64 %424
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %415, ptr noundef nonnull align 4 dereferenceable(4) %425) #10
  br label %426

426:                                              ; preds = %412
  %427 = load i32, ptr %31, align 4, !tbaa !5
  %428 = add nsw i32 %427, 1
  store i32 %428, ptr %31, align 4, !tbaa !5
  br label %407, !llvm.loop !28

429:                                              ; preds = %411
  br label %430

430:                                              ; preds = %429
  %431 = load i32, ptr %19, align 4, !tbaa !5
  %432 = add nsw i32 %431, 1
  store i32 %432, ptr %19, align 4, !tbaa !5
  br label %240, !llvm.loop !29

433:                                              ; preds = %243
  %434 = load i32, ptr @sz, align 4, !tbaa !5
  %435 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %434)
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #10
  store i32 1, ptr %32, align 4, !tbaa !5
  br label %436

436:                                              ; preds = %454, %433
  %437 = load i32, ptr %32, align 4, !tbaa !5
  %438 = load i32, ptr @sz, align 4, !tbaa !5
  %439 = icmp sle i32 %437, %438
  br i1 %439, label %441, label %440

440:                                              ; preds = %436
  store i32 40, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #10
  br label %457

441:                                              ; preds = %436
  %442 = load i32, ptr %32, align 4, !tbaa !5
  %443 = sext i32 %442 to i64
  %444 = getelementptr inbounds [201 x i32], ptr @idx, i64 0, i64 %443
  %445 = load i32, ptr %444, align 4, !tbaa !5
  %446 = load i32, ptr %32, align 4, !tbaa !5
  %447 = load i32, ptr @sz, align 4, !tbaa !5
  %448 = icmp eq i32 %446, %447
  %449 = zext i1 %448 to i64
  %450 = getelementptr inbounds [3 x i8], ptr @.str.4, i64 0, i64 %449
  %451 = load i8, ptr %450, align 1, !tbaa !30
  %452 = sext i8 %451 to i32
  %453 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %445, i32 noundef %452)
  br label %454

454:                                              ; preds = %441
  %455 = load i32, ptr %32, align 4, !tbaa !5
  %456 = add nsw i32 %455, 1
  store i32 %456, ptr %32, align 4, !tbaa !5
  br label %436, !llvm.loop !31

457:                                              ; preds = %440
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #10
  store i32 1, ptr %33, align 4, !tbaa !5
  br label %458

458:                                              ; preds = %467, %457
  %459 = load i32, ptr %33, align 4, !tbaa !5
  %460 = load i32, ptr @n, align 4, !tbaa !5
  %461 = icmp sle i32 %459, %460
  br i1 %461, label %463, label %462

462:                                              ; preds = %458
  store i32 43, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #10
  br label %470

463:                                              ; preds = %458
  %464 = load i32, ptr %33, align 4, !tbaa !5
  %465 = sext i32 %464 to i64
  %466 = getelementptr inbounds [201 x %struct.Point], ptr @out, i64 0, i64 %465
  call void @_ZN5Point5writeEv(ptr noundef nonnull align 4 dereferenceable(8) %466)
  br label %467

467:                                              ; preds = %463
  %468 = load i32, ptr %33, align 4, !tbaa !5
  %469 = add nsw i32 %468, 1
  store i32 %469, ptr %33, align 4, !tbaa !5
  br label %458, !llvm.loop !32

470:                                              ; preds = %462
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #10
  br label %37, !llvm.loop !33

471:                                              ; preds = %37
  ret i32 0
}

; Function Attrs: nounwind
declare void @srand(i32 noundef) #0

; Function Attrs: nounwind
declare i64 @time(ptr noundef) #0

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIPiZ4mainE3$_0EvT_S2_T0_"(ptr noundef, ptr noundef) #7

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

; Function Attrs: nounwind
declare x86_fp80 @sqrtl(x86_fp80 noundef) #0

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3sgni(i32 noundef) #8

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #9

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

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

attributes #0 = { 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 #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress 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 #6 = { "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 = { 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 #8 = { 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 #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #10 = { 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 = !{!10, !6, i64 0}
!10 = !{!"_ZTS5Point", !6, i64 0, !6, i64 4}
!11 = !{!10, !6, i64 4}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{i64 0, i64 4, !5, i64 4, i64 4, !5}
!15 = distinct !{!15, !13}
!16 = !{!17, !17, i64 0}
!17 = !{!"long long", !7, i64 0}
!18 = distinct !{!18, !13}
!19 = distinct !{!19, !13}
!20 = distinct !{!20, !13}
!21 = distinct !{!21, !13}
!22 = distinct !{!22, !13}
!23 = distinct !{!23, !13}
!24 = !{!25, !25, i64 0}
!25 = !{!"double", !7, i64 0}
!26 = distinct !{!26, !13}
!27 = distinct !{!27, !13}
!28 = distinct !{!28, !13}
!29 = distinct !{!29, !13}
!30 = !{!7, !7, i64 0}
!31 = distinct !{!31, !13}
!32 = distinct !{!32, !13}
!33 = distinct !{!33, !13}


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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@lim = external dso_local global i32, align 4
@ord = external dso_local global [201 x i32], align 16
@sz = external dso_local local_unnamed_addr global i32, align 4
@idx = external dso_local local_unnamed_addr global [201 x i32], align 16
@ans = external dso_local local_unnamed_addr global i64, align 8
@p = external dso_local global [201 x %struct.Point], align 16
@q = external dso_local local_unnamed_addr global [201 x %struct.Point], align 16
@out = external dso_local global [201 x %struct.Point], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZZ4mainE3rnk = external hidden global [201 x i32], align 16
@_ZZ4mainE1a = external hidden global [201 x %struct.Point], align 16
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z6rand30v() local_unnamed_addr #1

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5checkv() local_unnamed_addr #4

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #5 {
  %1 = alloca %struct.Point, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %struct.Point, align 4
  %5 = tail call i64 @time(ptr noundef null) #11
  %6 = trunc i64 %5 to i32
  tail call void @srand(i32 noundef %6) #11
  %7 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %8 = load i32, ptr @t, align 4, !tbaa !5
  %9 = add nsw i32 %8, -1
  store i32 %9, ptr @t, align 4, !tbaa !5
  %.not180 = icmp eq i32 %8, 0
  br i1 %.not180, label %._crit_edge183, label %.lr.ph182

.lr.ph182:                                        ; preds = %0
  %10 = getelementptr inbounds i8, ptr %1, i64 4
  %11 = getelementptr inbounds i8, ptr %4, i64 4
  br label %14

.loopexit:                                        ; preds = %.lr.ph179, %.preheader125
  %12 = load i32, ptr @t, align 4, !tbaa !5
  %13 = add nsw i32 %12, -1
  store i32 %13, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %12, 0
  br i1 %.not, label %._crit_edge183, label %14, !llvm.loop !9

14:                                               ; preds = %.lr.ph182, %.loopexit
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @n, ptr noundef nonnull @m, ptr noundef nonnull @lim)
  %16 = load i32, ptr @n, align 4, !tbaa !5
  %.not112127 = icmp slt i32 %16, 1
  br i1 %.not112127, label %._crit_edge, label %.lr.ph

.preheader126:                                    ; preds = %.lr.ph
  %.not113133 = icmp slt i32 %28, 1
  br i1 %.not113133, label %._crit_edge, label %.lr.ph135.preheader

.lr.ph135.preheader:                              ; preds = %.preheader126
  %17 = zext nneg i32 %28 to i64
  %xtraiter = and i64 %17, 1
  %18 = icmp eq i32 %28, 1
  br i1 %18, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph135.preheader.new

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

.lr.ph:                                           ; preds = %14, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %14 ]
  %.094130 = phi i32 [ %21, %.lr.ph ], [ 0, %14 ]
  %.098129 = phi i32 [ %24, %.lr.ph ], [ 0, %14 ]
  %19 = getelementptr inbounds [201 x %struct.Point], ptr @p, i64 0, i64 %indvars.iv
  call void @_ZN5Point4readEv(ptr noundef nonnull align 4 dereferenceable(8) %19)
  %20 = load i32, ptr %19, align 8, !tbaa !11
  %21 = add nsw i32 %20, %.094130
  %22 = getelementptr inbounds i8, ptr %19, i64 4
  %23 = load i32, ptr %22, align 4, !tbaa !13
  %24 = add nsw i32 %23, %.098129
  %25 = getelementptr inbounds [201 x i32], ptr @ord, i64 0, i64 %indvars.iv
  %26 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %26, ptr %25, align 4, !tbaa !5
  %27 = getelementptr inbounds [201 x i32], ptr @_ZZ4mainE3rnk, i64 0, i64 %indvars.iv
  store i32 %26, ptr %27, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %28 = load i32, ptr @n, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %.not112.not = icmp slt i64 %indvars.iv, %29
  br i1 %.not112.not, label %.lr.ph, label %.preheader126, !llvm.loop !14

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph135, %.lr.ph135.preheader
  %indvars.iv189.unr = phi i64 [ 1, %.lr.ph135.preheader ], [ %indvars.iv.next190.1, %.lr.ph135 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph135.epil

.lr.ph135.epil:                                   ; preds = %._crit_edge.loopexit.unr-lcssa
  %30 = getelementptr inbounds [201 x %struct.Point], ptr @p, i64 0, i64 %indvars.iv189.unr
  %31 = load i32, ptr %30, align 8, !tbaa !11
  %32 = mul nsw i32 %31, %28
  %33 = sub nsw i32 %32, %21
  %34 = getelementptr inbounds i8, ptr %30, i64 4
  %35 = load i32, ptr %34, align 4, !tbaa !13
  %36 = mul nsw i32 %35, %28
  %37 = sub nsw i32 %36, %24
  %38 = getelementptr inbounds [201 x %struct.Point], ptr @_ZZ4mainE1a, i64 0, i64 %indvars.iv189.unr
  store i32 %33, ptr %38, align 8, !tbaa !5
  %.sroa.4.0..sroa_idx.epil = getelementptr inbounds i8, ptr %38, i64 4
  store i32 %37, ptr %.sroa.4.0..sroa_idx.epil, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph135.epil, %._crit_edge.loopexit.unr-lcssa, %14, %.preheader126
  %.lcssa225 = phi i32 [ %28, %.preheader126 ], [ %16, %14 ], [ %28, %._crit_edge.loopexit.unr-lcssa ], [ %28, %.lr.ph135.epil ]
  %39 = sext i32 %.lcssa225 to i64
  %gep = getelementptr i32, ptr getelementptr inbounds (i8, ptr @_ZZ4mainE3rnk, i64 4), i64 %39
  call void @"_ZSt4sortIPiZ4mainE3$_0EvT_S2_T0_"(ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZZ4mainE3rnk, i64 4), ptr noundef nonnull %gep)
  store i64 9223372036854775807, ptr @ans, align 8, !tbaa !15
  %40 = load i32, ptr @n, align 4, !tbaa !5
  %.not114136 = icmp slt i32 %40, 1
  br i1 %.not114136, label %._crit_edge140, label %.lr.ph139.preheader

.lr.ph139.preheader:                              ; preds = %._crit_edge
  %41 = zext nneg i32 %40 to i64
  %42 = shl nuw nsw i64 %41, 3
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @q, i64 8), ptr nonnull align 8 getelementptr inbounds (i8, ptr @p, i64 8), i64 %42, i1 false)
  br label %._crit_edge140

.lr.ph135:                                        ; preds = %.lr.ph135, %.lr.ph135.preheader.new
  %indvars.iv189 = phi i64 [ 1, %.lr.ph135.preheader.new ], [ %indvars.iv.next190.1, %.lr.ph135 ]
  %niter = phi i64 [ 0, %.lr.ph135.preheader.new ], [ %niter.next.1, %.lr.ph135 ]
  %43 = getelementptr inbounds [201 x %struct.Point], ptr @p, i64 0, i64 %indvars.iv189
  %44 = load i32, ptr %43, align 8, !tbaa !11
  %45 = mul nsw i32 %44, %28
  %46 = sub nsw i32 %45, %21
  %47 = getelementptr inbounds i8, ptr %43, i64 4
  %48 = load i32, ptr %47, align 4, !tbaa !13
  %49 = mul nsw i32 %48, %28
  %50 = sub nsw i32 %49, %24
  %51 = getelementptr inbounds [201 x %struct.Point], ptr @_ZZ4mainE1a, i64 0, i64 %indvars.iv189
  store i32 %46, ptr %51, align 8, !tbaa !5
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %51, i64 4
  store i32 %50, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !5
  %indvars.iv.next190 = add nuw nsw i64 %indvars.iv189, 1
  %52 = getelementptr inbounds [201 x %struct.Point], ptr @p, i64 0, i64 %indvars.iv.next190
  %53 = load i32, ptr %52, align 8, !tbaa !11
  %54 = mul nsw i32 %53, %28
  %55 = sub nsw i32 %54, %21
  %56 = getelementptr inbounds i8, ptr %52, i64 4
  %57 = load i32, ptr %56, align 4, !tbaa !13
  %58 = mul nsw i32 %57, %28
  %59 = sub nsw i32 %58, %24
  %60 = getelementptr inbounds [201 x %struct.Point], ptr @_ZZ4mainE1a, i64 0, i64 %indvars.iv.next190
  store i32 %55, ptr %60, align 8, !tbaa !5
  %.sroa.4.0..sroa_idx.1 = getelementptr inbounds i8, ptr %60, i64 4
  store i32 %59, ptr %.sroa.4.0..sroa_idx.1, align 4, !tbaa !5
  %indvars.iv.next190.1 = add nuw nsw i64 %indvars.iv189, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph135, !llvm.loop !17

._crit_edge140:                                   ; preds = %.lr.ph139.preheader, %._crit_edge
  call void @_Z5checkv()
  br label %.preheader124

.preheader124:                                    ; preds = %._crit_edge140, %._crit_edge150
  %.0105151 = phi i32 [ 0, %._crit_edge140 ], [ %81, %._crit_edge150 ]
  %61 = load i32, ptr @m, align 4, !tbaa !5
  %.not119141 = icmp slt i32 %61, 1
  br i1 %.not119141, label %.preheader123, label %.lr.ph143

62:                                               ; preds = %._crit_edge150
  %63 = load i32, ptr @n, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = shl nsw i64 %64, 2
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @ord, i64 4), ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ4mainE3rnk, i64 4), i64 %65, i1 false)
  br label %.preheader

.preheader123:                                    ; preds = %.lr.ph143, %.preheader124
  %66 = phi i32 [ %61, %.preheader124 ], [ %79, %.lr.ph143 ]
  %67 = load i32, ptr @n, align 4, !tbaa !5
  %.not120144 = icmp slt i32 %67, 1
  br i1 %.not120144, label %.preheader122, label %.lr.ph146.preheader

.lr.ph146.preheader:                              ; preds = %.preheader123
  %68 = zext nneg i32 %67 to i64
  %69 = shl nuw nsw i64 %68, 3
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @q, i64 8), ptr nonnull align 8 getelementptr inbounds (i8, ptr @p, i64 8), i64 %69, i1 false)
  br label %.preheader122

.lr.ph143:                                        ; preds = %.preheader124, %.lr.ph143
  %indvars.iv195 = phi i64 [ %indvars.iv.next196, %.lr.ph143 ], [ 1, %.preheader124 ]
  %70 = getelementptr inbounds [201 x i32], ptr @ord, i64 0, i64 %indvars.iv195
  %71 = call i32 @rand() #11
  %72 = load i32, ptr @n, align 4, !tbaa !5
  %73 = trunc nuw nsw i64 %indvars.iv195 to i32
  %reass.sub = sub i32 %72, %73
  %74 = add i32 %reass.sub, 1
  %75 = srem i32 %71, %74
  %76 = add nsw i32 %75, %73
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [201 x i32], ptr @ord, i64 0, i64 %77
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %70, ptr noundef nonnull align 4 dereferenceable(4) %78) #11
  %indvars.iv.next196 = add nuw nsw i64 %indvars.iv195, 1
  %79 = load i32, ptr @m, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %.not119.not = icmp slt i64 %indvars.iv195, %80
  br i1 %.not119.not, label %.lr.ph143, label %.preheader123, !llvm.loop !18

.preheader122:                                    ; preds = %.lr.ph146.preheader, %.preheader123
  %.not121147 = icmp slt i32 %66, 1
  br i1 %.not121147, label %._crit_edge150, label %.lr.ph149

._crit_edge150:                                   ; preds = %.lr.ph149, %.preheader122
  call void @_Z5checkv()
  %81 = add nuw nsw i32 %.0105151, 1
  %exitcond204.not = icmp eq i32 %81, 2000
  br i1 %exitcond204.not, label %62, label %.preheader124, !llvm.loop !19

.lr.ph149:                                        ; preds = %.preheader122, %.lr.ph149
  %indvars.iv201 = phi i64 [ %indvars.iv.next202, %.lr.ph149 ], [ 1, %.preheader122 ]
  %82 = call noundef i32 @_Z6rand30v()
  %83 = load i32, ptr @lim, align 4, !tbaa !5
  %84 = mul nsw i32 %83, %83
  %85 = srem i32 %82, %84
  %86 = sitofp i32 %85 to x86_fp80
  %87 = call x86_fp80 @sqrtl(x86_fp80 noundef %86) #11
  %88 = fptosi x86_fp80 %87 to i32
  %89 = call i32 @rand() #11
  %90 = shl i32 %88, 1
  %91 = or disjoint i32 %90, 1
  %92 = srem i32 %89, %91
  %93 = sub nsw i32 %92, %88
  %sub = sub nsw i32 %88, %93
  %94 = mul nsw i32 %sub, %92
  %95 = sitofp i32 %94 to x86_fp80
  %96 = call x86_fp80 @sqrtl(x86_fp80 noundef %95) #11
  %97 = fptosi x86_fp80 %96 to i32
  %98 = call i32 @rand() #11
  %99 = shl i32 %97, 1
  %100 = or disjoint i32 %99, 1
  %101 = srem i32 %98, %100
  %102 = sub nsw i32 %101, %97
  %103 = getelementptr inbounds [201 x i32], ptr @ord, i64 0, i64 %indvars.iv201
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [201 x %struct.Point], ptr @p, i64 0, i64 %105
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #11
  store i32 %93, ptr %1, align 4, !tbaa !11
  store i32 %102, ptr %10, align 4, !tbaa !13
  %107 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %106, ptr noundef nonnull align 4 dereferenceable(8) %1)
  %108 = load i32, ptr %103, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [201 x %struct.Point], ptr @q, i64 0, i64 %109
  store i64 %107, ptr %110, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #11
  %indvars.iv.next202 = add nuw nsw i64 %indvars.iv201, 1
  %111 = load i32, ptr @m, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %.not121.not = icmp slt i64 %indvars.iv201, %112
  br i1 %.not121.not, label %.lr.ph149, label %._crit_edge150, !llvm.loop !20

.preheaderthread-pre-split:                       ; preds = %._crit_edge171
  %.pr = load i32, ptr @n, align 4, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.preheaderthread-pre-split, %62
  %113 = phi i32 [ %.pr, %.preheaderthread-pre-split ], [ %63, %62 ]
  %.0103172 = phi i32 [ %208, %.preheaderthread-pre-split ], [ 0, %62 ]
  %.not117152 = icmp slt i32 %113, 1
  br i1 %.not117152, label %._crit_edge155, label %.lr.ph154.preheader

.lr.ph154.preheader:                              ; preds = %.preheader
  %114 = zext nneg i32 %113 to i64
  %115 = shl nuw nsw i64 %114, 3
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @q, i64 8), ptr nonnull align 8 getelementptr inbounds (i8, ptr @p, i64 8), i64 %115, i1 false)
  br label %._crit_edge155

116:                                              ; preds = %._crit_edge171
  %117 = load i32, ptr @sz, align 4, !tbaa !5
  %118 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %117)
  %119 = load i32, ptr @sz, align 4, !tbaa !5
  %.not115173 = icmp slt i32 %119, 1
  br i1 %.not115173, label %.preheader125, label %.lr.ph176

._crit_edge155:                                   ; preds = %.lr.ph154.preheader, %.preheader
  %120 = load i32, ptr @m, align 4, !tbaa !5
  %121 = icmp sgt i32 %120, 0
  br i1 %121, label %.lr.ph165.preheader, label %._crit_edge166

.lr.ph165.preheader:                              ; preds = %._crit_edge155
  %122 = zext nneg i32 %120 to i64
  br label %.lr.ph165

._crit_edge166:                                   ; preds = %._crit_edge160, %._crit_edge155
  call void @_Z5checkv()
  %123 = load i32, ptr @m, align 4, !tbaa !5
  %.not118167 = icmp slt i32 %123, 1
  br i1 %.not118167, label %._crit_edge171, label %.lr.ph170

.lr.ph165:                                        ; preds = %.lr.ph165.preheader, %._crit_edge160
  %indvars.iv208 = phi i64 [ %122, %.lr.ph165.preheader ], [ %indvars.iv.next209, %._crit_edge160 ]
  %124 = getelementptr inbounds [201 x i32], ptr @_ZZ4mainE3rnk, i64 0, i64 %indvars.iv208
  %125 = load i32, ptr %124, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [201 x %struct.Point], ptr @_ZZ4mainE1a, i64 0, i64 %126
  %128 = load i32, ptr %127, align 8, !tbaa !11
  %129 = sitofp i32 %128 to double
  %130 = fmul double %129, %129
  %131 = call noundef i64 @_ZNK5Point4len2Ev(ptr noundef nonnull align 4 dereferenceable(8) %127)
  %132 = sitofp i64 %131 to double
  %133 = fdiv double %130, %132
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #11
  %134 = call noundef i64 @_ZNK5Point4len2Ev(ptr noundef nonnull align 4 dereferenceable(8) %127)
  store i64 %134, ptr %2, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #11
  %135 = load i32, ptr @lim, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = load i32, ptr @n, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = mul nsw i64 %138, %136
  %140 = mul i64 %139, %139
  store i64 %140, ptr %3, align 8, !tbaa !15
  %141 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %142 = load i64, ptr %141, align 8, !tbaa !15
  %143 = load i32, ptr @n, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = sdiv i64 %142, %144
  %146 = sdiv i64 %145, %144
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #11
  %147 = sitofp i64 %146 to double
  %148 = fmul double %133, %147
  %149 = fpext double %148 to x86_fp80
  %150 = call x86_fp80 @sqrtl(x86_fp80 noundef %149) #11
  %151 = call i32 @rand() #11
  %152 = load i32, ptr @n, align 4, !tbaa !5
  %153 = sitofp i32 %152 to x86_fp80
  %154 = call x86_fp80 @sqrtl(x86_fp80 noundef %153) #11
  %155 = fptosi x86_fp80 %154 to i32
  %156 = srem i32 %151, %155
  %157 = sitofp i32 %156 to x86_fp80
  %158 = fsub x86_fp80 %150, %157
  %159 = load i32, ptr %127, align 8, !tbaa !11
  %160 = call noundef i32 @_Z3sgni(i32 noundef %159)
  %161 = sitofp i32 %160 to x86_fp80
  %162 = fmul x86_fp80 %158, %161
  %163 = fptosi x86_fp80 %162 to i32
  %164 = fsub double 1.000000e+00, %133
  %165 = fmul double %164, %147
  %166 = fpext double %165 to x86_fp80
  %167 = call x86_fp80 @sqrtl(x86_fp80 noundef %166) #11
  %168 = call i32 @rand() #11
  %169 = load i32, ptr @n, align 4, !tbaa !5
  %170 = sitofp i32 %169 to x86_fp80
  %171 = call x86_fp80 @sqrtl(x86_fp80 noundef %170) #11
  %172 = fptosi x86_fp80 %171 to i32
  %173 = srem i32 %168, %172
  %174 = sitofp i32 %173 to x86_fp80
  %175 = fsub x86_fp80 %167, %174
  %176 = getelementptr inbounds i8, ptr %127, i64 4
  %177 = load i32, ptr %176, align 4, !tbaa !13
  %178 = call noundef i32 @_Z3sgni(i32 noundef %177)
  %179 = sitofp i32 %178 to x86_fp80
  %180 = fmul x86_fp80 %175, %179
  %181 = fptosi x86_fp80 %180 to i32
  %182 = mul nsw i32 %163, %163
  %183 = mul nsw i32 %181, %181
  %184 = add nuw nsw i32 %183, %182
  %185 = load i32, ptr @lim, align 4, !tbaa !5
  %186 = mul nsw i32 %185, %185
  %187 = icmp ugt i32 %184, %186
  br i1 %187, label %.lr.ph159, label %._crit_edge160

.lr.ph159:                                        ; preds = %.lr.ph165, %197
  %.095157 = phi i32 [ %.1, %197 ], [ %181, %.lr.ph165 ]
  %.096156 = phi i32 [ %.197, %197 ], [ %163, %.lr.ph165 ]
  %188 = call i32 @llvm.abs.i32(i32 %.096156, i1 true)
  %189 = call i32 @llvm.abs.i32(i32 %.095157, i1 true)
  %190 = icmp ult i32 %188, %189
  br i1 %190, label %191, label %194

191:                                              ; preds = %.lr.ph159
  %192 = call noundef i32 @_Z3sgni(i32 noundef %.095157)
  %193 = sub nsw i32 %.095157, %192
  br label %197

194:                                              ; preds = %.lr.ph159
  %195 = call noundef i32 @_Z3sgni(i32 noundef %.096156)
  %196 = sub nsw i32 %.096156, %195
  br label %197

197:                                              ; preds = %194, %191
  %.197 = phi i32 [ %.096156, %191 ], [ %196, %194 ]
  %.1 = phi i32 [ %193, %191 ], [ %.095157, %194 ]
  %198 = mul nsw i32 %.197, %.197
  %199 = mul nsw i32 %.1, %.1
  %200 = add nuw nsw i32 %199, %198
  %201 = load i32, ptr @lim, align 4, !tbaa !5
  %202 = mul nsw i32 %201, %201
  %203 = icmp ugt i32 %200, %202
  br i1 %203, label %.lr.ph159, label %._crit_edge160, !llvm.loop !21

._crit_edge160:                                   ; preds = %197, %.lr.ph165
  %.096.lcssa = phi i32 [ %163, %.lr.ph165 ], [ %.197, %197 ]
  %.095.lcssa = phi i32 [ %181, %.lr.ph165 ], [ %.1, %197 ]
  %204 = getelementptr inbounds [201 x %struct.Point], ptr @p, i64 0, i64 %126
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #11
  store i32 %.096.lcssa, ptr %4, align 4, !tbaa !11
  store i32 %.095.lcssa, ptr %11, align 4, !tbaa !13
  %205 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %204, ptr noundef nonnull align 4 dereferenceable(8) %4)
  %206 = getelementptr inbounds [201 x %struct.Point], ptr @q, i64 0, i64 %126
  store i64 %205, ptr %206, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #11
  %indvars.iv.next209 = add nsw i64 %indvars.iv208, -1
  %207 = icmp sgt i64 %indvars.iv208, 1
  br i1 %207, label %.lr.ph165, label %._crit_edge166, !llvm.loop !22

._crit_edge171:                                   ; preds = %.lr.ph170, %._crit_edge166
  %208 = add nuw nsw i32 %.0103172, 1
  %exitcond214.not = icmp eq i32 %208, 3000
  br i1 %exitcond214.not, label %116, label %.preheaderthread-pre-split, !llvm.loop !23

.lr.ph170:                                        ; preds = %._crit_edge166, %.lr.ph170
  %indvars.iv211 = phi i64 [ %indvars.iv.next212, %.lr.ph170 ], [ 1, %._crit_edge166 ]
  %209 = getelementptr inbounds [201 x i32], ptr @ord, i64 0, i64 %indvars.iv211
  %210 = call i32 @rand() #11
  %211 = load i32, ptr @n, align 4, !tbaa !5
  %212 = trunc nuw nsw i64 %indvars.iv211 to i32
  %reass.sub184 = sub i32 %211, %212
  %213 = add i32 %reass.sub184, 1
  %214 = srem i32 %210, %213
  %215 = add nsw i32 %214, %212
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [201 x i32], ptr @ord, i64 0, i64 %216
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %209, ptr noundef nonnull align 4 dereferenceable(4) %217) #11
  %indvars.iv.next212 = add nuw nsw i64 %indvars.iv211, 1
  %218 = load i32, ptr @m, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %.not118.not = icmp slt i64 %indvars.iv211, %219
  br i1 %.not118.not, label %.lr.ph170, label %._crit_edge171, !llvm.loop !24

.preheader125:                                    ; preds = %.lr.ph176, %116
  %220 = load i32, ptr @n, align 4, !tbaa !5
  %.not116177 = icmp slt i32 %220, 1
  br i1 %.not116177, label %.loopexit, label %.lr.ph179

.lr.ph176:                                        ; preds = %116, %.lr.ph176
  %indvars.iv215 = phi i64 [ %indvars.iv.next216, %.lr.ph176 ], [ 1, %116 ]
  %221 = phi i32 [ %231, %.lr.ph176 ], [ %119, %116 ]
  %222 = getelementptr inbounds [201 x i32], ptr @idx, i64 0, i64 %indvars.iv215
  %223 = load i32, ptr %222, align 4, !tbaa !5
  %224 = zext i32 %221 to i64
  %225 = icmp eq i64 %indvars.iv215, %224
  %226 = zext i1 %225 to i64
  %227 = getelementptr inbounds [3 x i8], ptr @.str.4, i64 0, i64 %226
  %228 = load i8, ptr %227, align 1, !tbaa !25
  %229 = sext i8 %228 to i32
  %230 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %223, i32 noundef %229)
  %indvars.iv.next216 = add nuw nsw i64 %indvars.iv215, 1
  %231 = load i32, ptr @sz, align 4, !tbaa !5
  %232 = sext i32 %231 to i64
  %.not115.not = icmp slt i64 %indvars.iv215, %232
  br i1 %.not115.not, label %.lr.ph176, label %.preheader125, !llvm.loop !26

.lr.ph179:                                        ; preds = %.preheader125, %.lr.ph179
  %indvars.iv218 = phi i64 [ %indvars.iv.next219, %.lr.ph179 ], [ 1, %.preheader125 ]
  %233 = getelementptr inbounds [201 x %struct.Point], ptr @out, i64 0, i64 %indvars.iv218
  call void @_ZN5Point5writeEv(ptr noundef nonnull align 4 dereferenceable(8) %233)
  %indvars.iv.next219 = add nuw nsw i64 %indvars.iv218, 1
  %234 = load i32, ptr @n, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %.not116.not = icmp slt i64 %indvars.iv218, %235
  br i1 %.not116.not, label %.lr.ph179, label %.loopexit, !llvm.loop !27

._crit_edge183:                                   ; preds = %.loopexit, %0
  ret i32 0
}

; Function Attrs: nounwind
declare void @srand(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind
declare i64 @time(ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIPiZ4mainE3$_0EvT_S2_T0_"(ptr noundef, ptr noundef) local_unnamed_addr #7

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare x86_fp80 @sqrtl(x86_fp80 noundef) local_unnamed_addr #9

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3sgni(i32 noundef) local_unnamed_addr #8

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #10

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

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

attributes #0 = { 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 #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress 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 #6 = { 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 #7 = { 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 #8 = { 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 #9 = { mustprogress nofree nounwind willreturn memory(write) "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 #10 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #11 = { 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, !6, i64 0}
!12 = !{!"_ZTS5Point", !6, i64 0, !6, i64 4}
!13 = !{!12, !6, i64 4}
!14 = distinct !{!14, !10}
!15 = !{!16, !16, i64 0}
!16 = !{!"long long", !7, i64 0}
!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}
!24 = distinct !{!24, !10}
!25 = !{!7, !7, i64 0}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !10}


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