; LLVM IR from tangjz/acm-icpc :: lydsy (1696)

; 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.std::pair" = type { i32, i32 }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair.0" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@x = external dso_local global [10000 x i32], align 16
@y = external dso_local global [10000 x i32], align 16
@x1 = external dso_local global i32, align 4
@x2 = external dso_local global i32, align 4
@y1 = external dso_local global i32, align 4
@y2 = external dso_local global i32, align 4
@sum = external dso_local global i32, align 4
@cnt = external dso_local global i32, align 4
@p = external dso_local global [10000 x %"struct.std::pair"], align 16
@Hash = external dso_local global %"class.std::set", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::pair", align 4
  %4 = alloca %"struct.std::pair.0", align 8
  %5 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %6 = alloca %"struct.std::pair", align 4
  %7 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %11 = alloca %"struct.std::pair", align 4
  %12 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %15 = alloca %"struct.std::pair", align 4
  %16 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %53, %0
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = load i32, ptr @n, align 4, !tbaa !5
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %26, label %25

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

26:                                               ; preds = %21
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds i32, ptr @x, i64 %28
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds i32, ptr @y, i64 %31
  %33 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %29, ptr noundef %32)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [10000 x i32], ptr @x, i64 0, i64 %35
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [10000 x i32], ptr @y, i64 0, i64 %38
  %40 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %36, ptr noundef nonnull align 4 dereferenceable(4) %39)
  store i64 %40, ptr %3, align 4
  %41 = load i32, ptr %2, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [10000 x %"struct.std::pair"], ptr @p, i64 0, i64 %42
  %44 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %43, ptr noundef nonnull align 4 dereferenceable(8) %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  %45 = load i32, ptr %2, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [10000 x %"struct.std::pair"], ptr @p, i64 0, i64 %46
  %48 = call { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) @Hash, ptr noundef nonnull align 4 dereferenceable(8) %47)
  %49 = getelementptr inbounds { ptr, i8 }, ptr %4, i32 0, i32 0
  %50 = extractvalue { ptr, i8 } %48, 0
  store ptr %50, ptr %49, align 8
  %51 = getelementptr inbounds { ptr, i8 }, ptr %4, i32 0, i32 1
  %52 = extractvalue { ptr, i8 } %48, 1
  store i8 %52, ptr %51, align 8
  br label %53

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

56:                                               ; preds = %25
  %57 = load i32, ptr @n, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds i32, ptr @x, i64 %58
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef @x, ptr noundef %59)
  %60 = load i32, ptr @n, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds i32, ptr @y, i64 %61
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef @y, ptr noundef %62)
  %63 = load i32, ptr @n, align 4, !tbaa !5
  %64 = and i32 %63, 1
  %65 = icmp ne i32 %64, 0
  br i1 %65, label %66, label %208

66:                                               ; preds = %56
  %67 = load i32, ptr @n, align 4, !tbaa !5
  %68 = ashr i32 %67, 1
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [10000 x i32], ptr @x, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  store i32 %71, ptr @x1, align 4, !tbaa !5
  %72 = load i32, ptr @n, align 4, !tbaa !5
  %73 = ashr i32 %72, 1
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [10000 x i32], ptr @y, i64 0, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !5
  store i32 %76, ptr @y1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %77 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @x1, ptr noundef nonnull align 4 dereferenceable(4) @y1)
  store i64 %77, ptr %6, align 4
  %78 = call ptr @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE4findERKS1_(ptr noundef nonnull align 8 dereferenceable(48) @Hash, ptr noundef nonnull align 4 dereferenceable(8) %6)
  %79 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %5, i32 0, i32 0
  store ptr %78, ptr %79, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %80 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @Hash) #7
  %81 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %7, i32 0, i32 0
  store ptr %80, ptr %81, align 8
  %82 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  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 8, ptr %5) #7
  br i1 %82, label %83, label %179

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

84:                                               ; preds = %107, %83
  %85 = load i32, ptr %8, align 4, !tbaa !5
  %86 = load i32, ptr @n, align 4, !tbaa !5
  %87 = icmp slt i32 %85, %86
  br i1 %87, label %89, label %88

88:                                               ; preds = %84
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %110

89:                                               ; preds = %84
  %90 = load i32, ptr @x1, align 4, !tbaa !5
  %91 = load i32, ptr %8, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [10000 x i32], ptr @x, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = sub nsw i32 %90, %94
  %96 = call i32 @llvm.abs.i32(i32 %95, i1 true)
  %97 = load i32, ptr @y1, align 4, !tbaa !5
  %98 = load i32, ptr %8, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [10000 x i32], ptr @y, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = sub nsw i32 %97, %101
  %103 = call i32 @llvm.abs.i32(i32 %102, i1 true)
  %104 = add nsw i32 %96, %103
  %105 = load i32, ptr @sum, align 4, !tbaa !5
  %106 = add nsw i32 %105, %104
  store i32 %106, ptr @sum, align 4, !tbaa !5
  br label %107

107:                                              ; preds = %89
  %108 = load i32, ptr %8, align 4, !tbaa !5
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %8, align 4, !tbaa !5
  br label %84, !llvm.loop !11

110:                                              ; preds = %88
  %111 = load i32, ptr @sum, align 4, !tbaa !5
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr @sum, align 4, !tbaa !5
  %113 = load i32, ptr @n, align 4, !tbaa !5
  %114 = ashr i32 %113, 1
  %115 = sub nsw i32 %114, 1
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [10000 x i32], ptr @x, i64 0, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !5
  store i32 %118, ptr @x1, align 4, !tbaa !5
  %119 = load i32, ptr @n, align 4, !tbaa !5
  %120 = ashr i32 %119, 1
  %121 = add nsw i32 %120, 1
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [10000 x i32], ptr @x, i64 0, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !5
  store i32 %124, ptr @x2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %125 = load i32, ptr @x1, align 4, !tbaa !5
  store i32 %125, ptr %9, align 4, !tbaa !5
  br label %126

126:                                              ; preds = %142, %110
  %127 = load i32, ptr %9, align 4, !tbaa !5
  %128 = load i32, ptr @x2, align 4, !tbaa !5
  %129 = icmp sle i32 %127, %128
  br i1 %129, label %131, label %130

130:                                              ; preds = %126
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %145

131:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %132 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) @y1)
  store i64 %132, ptr %11, align 4
  %133 = call ptr @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE4findERKS1_(ptr noundef nonnull align 8 dereferenceable(48) @Hash, ptr noundef nonnull align 4 dereferenceable(8) %11)
  %134 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %10, i32 0, i32 0
  store ptr %133, ptr %134, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %135 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @Hash) #7
  %136 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %12, i32 0, i32 0
  store ptr %135, ptr %136, align 8
  %137 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br i1 %137, label %138, label %141

138:                                              ; preds = %131
  %139 = load i32, ptr @cnt, align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr @cnt, align 4, !tbaa !5
  br label %141

141:                                              ; preds = %138, %131
  br label %142

142:                                              ; preds = %141
  %143 = load i32, ptr %9, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %9, align 4, !tbaa !5
  br label %126, !llvm.loop !12

145:                                              ; preds = %130
  %146 = load i32, ptr @n, align 4, !tbaa !5
  %147 = ashr i32 %146, 1
  %148 = sub nsw i32 %147, 1
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [10000 x i32], ptr @y, i64 0, i64 %149
  %151 = load i32, ptr %150, align 4, !tbaa !5
  store i32 %151, ptr @y1, align 4, !tbaa !5
  %152 = load i32, ptr @n, align 4, !tbaa !5
  %153 = ashr i32 %152, 1
  %154 = add nsw i32 %153, 1
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [10000 x i32], ptr @y, i64 0, i64 %155
  %157 = load i32, ptr %156, align 4, !tbaa !5
  store i32 %157, ptr @y2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %158 = load i32, ptr @y1, align 4, !tbaa !5
  store i32 %158, ptr %13, align 4, !tbaa !5
  br label %159

159:                                              ; preds = %175, %145
  %160 = load i32, ptr %13, align 4, !tbaa !5
  %161 = load i32, ptr @y2, align 4, !tbaa !5
  %162 = icmp sle i32 %160, %161
  br i1 %162, label %164, label %163

163:                                              ; preds = %159
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %178

164:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %165 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @x1, ptr noundef nonnull align 4 dereferenceable(4) %13)
  store i64 %165, ptr %15, align 4
  %166 = call ptr @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE4findERKS1_(ptr noundef nonnull align 8 dereferenceable(48) @Hash, ptr noundef nonnull align 4 dereferenceable(8) %15)
  %167 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %14, i32 0, i32 0
  store ptr %166, ptr %167, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %168 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @Hash) #7
  %169 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %16, i32 0, i32 0
  store ptr %168, ptr %169, align 8
  %170 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br i1 %170, label %171, label %174

171:                                              ; preds = %164
  %172 = load i32, ptr @cnt, align 4, !tbaa !5
  %173 = add nsw i32 %172, 1
  store i32 %173, ptr @cnt, align 4, !tbaa !5
  br label %174

174:                                              ; preds = %171, %164
  br label %175

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

178:                                              ; preds = %163
  br label %207

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

180:                                              ; preds = %203, %179
  %181 = load i32, ptr %17, align 4, !tbaa !5
  %182 = load i32, ptr @n, align 4, !tbaa !5
  %183 = icmp slt i32 %181, %182
  br i1 %183, label %185, label %184

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

185:                                              ; preds = %180
  %186 = load i32, ptr @x1, align 4, !tbaa !5
  %187 = load i32, ptr %17, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [10000 x i32], ptr @x, i64 0, i64 %188
  %190 = load i32, ptr %189, align 4, !tbaa !5
  %191 = sub nsw i32 %186, %190
  %192 = call i32 @llvm.abs.i32(i32 %191, i1 true)
  %193 = load i32, ptr @y1, align 4, !tbaa !5
  %194 = load i32, ptr %17, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [10000 x i32], ptr @y, i64 0, i64 %195
  %197 = load i32, ptr %196, align 4, !tbaa !5
  %198 = sub nsw i32 %193, %197
  %199 = call i32 @llvm.abs.i32(i32 %198, i1 true)
  %200 = add nsw i32 %192, %199
  %201 = load i32, ptr @sum, align 4, !tbaa !5
  %202 = add nsw i32 %201, %200
  store i32 %202, ptr @sum, align 4, !tbaa !5
  br label %203

203:                                              ; preds = %185
  %204 = load i32, ptr %17, align 4, !tbaa !5
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %17, align 4, !tbaa !5
  br label %180, !llvm.loop !14

206:                                              ; preds = %184
  store i32 1, ptr @cnt, align 4, !tbaa !5
  br label %207

207:                                              ; preds = %206, %178
  br label %312

208:                                              ; preds = %56
  %209 = load i32, ptr @n, align 4, !tbaa !5
  %210 = ashr i32 %209, 1
  %211 = sub nsw i32 %210, 1
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [10000 x i32], ptr @x, i64 0, i64 %212
  %214 = load i32, ptr %213, align 4, !tbaa !5
  store i32 %214, ptr @x1, align 4, !tbaa !5
  %215 = load i32, ptr @n, align 4, !tbaa !5
  %216 = ashr i32 %215, 1
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [10000 x i32], ptr @x, i64 0, i64 %217
  %219 = load i32, ptr %218, align 4, !tbaa !5
  store i32 %219, ptr @x2, align 4, !tbaa !5
  %220 = load i32, ptr @n, align 4, !tbaa !5
  %221 = ashr i32 %220, 1
  %222 = sub nsw i32 %221, 1
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [10000 x i32], ptr @y, i64 0, i64 %223
  %225 = load i32, ptr %224, align 4, !tbaa !5
  store i32 %225, ptr @y1, align 4, !tbaa !5
  %226 = load i32, ptr @n, align 4, !tbaa !5
  %227 = ashr i32 %226, 1
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds [10000 x i32], ptr @y, i64 0, i64 %228
  %230 = load i32, ptr %229, align 4, !tbaa !5
  store i32 %230, ptr @y2, align 4, !tbaa !5
  %231 = load i32, ptr @x2, align 4, !tbaa !5
  %232 = load i32, ptr @x1, align 4, !tbaa !5
  %233 = sub nsw i32 %231, %232
  %234 = add nsw i32 %233, 1
  %235 = load i32, ptr @y2, align 4, !tbaa !5
  %236 = load i32, ptr @y1, align 4, !tbaa !5
  %237 = sub nsw i32 %235, %236
  %238 = add nsw i32 %237, 1
  %239 = mul nsw i32 %234, %238
  store i32 %239, ptr @cnt, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %240

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

244:                                              ; preds = %240
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %266

245:                                              ; preds = %240
  %246 = load i32, ptr @x1, align 4, !tbaa !5
  %247 = load i32, ptr %18, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [10000 x i32], ptr @x, i64 0, i64 %248
  %250 = load i32, ptr %249, align 4, !tbaa !5
  %251 = sub nsw i32 %246, %250
  %252 = call i32 @llvm.abs.i32(i32 %251, i1 true)
  %253 = load i32, ptr @y1, align 4, !tbaa !5
  %254 = load i32, ptr %18, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [10000 x i32], ptr @y, i64 0, i64 %255
  %257 = load i32, ptr %256, align 4, !tbaa !5
  %258 = sub nsw i32 %253, %257
  %259 = call i32 @llvm.abs.i32(i32 %258, i1 true)
  %260 = add nsw i32 %252, %259
  %261 = load i32, ptr @sum, align 4, !tbaa !5
  %262 = add nsw i32 %261, %260
  store i32 %262, ptr @sum, align 4, !tbaa !5
  br label %263

263:                                              ; preds = %245
  %264 = load i32, ptr %18, align 4, !tbaa !5
  %265 = add nsw i32 %264, 1
  store i32 %265, ptr %18, align 4, !tbaa !5
  br label %240, !llvm.loop !15

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

267:                                              ; preds = %308, %266
  %268 = load i32, ptr %19, align 4, !tbaa !5
  %269 = load i32, ptr @n, align 4, !tbaa !5
  %270 = icmp slt i32 %268, %269
  br i1 %270, label %272, label %271

271:                                              ; preds = %267
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %311

272:                                              ; preds = %267
  %273 = load i32, ptr %19, align 4, !tbaa !5
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds [10000 x %"struct.std::pair"], ptr @p, i64 0, i64 %274
  %276 = getelementptr inbounds %"struct.std::pair", ptr %275, i32 0, i32 0
  %277 = load i32, ptr %276, align 8, !tbaa !16
  %278 = load i32, ptr @x1, align 4, !tbaa !5
  %279 = icmp sge i32 %277, %278
  br i1 %279, label %280, label %307

280:                                              ; preds = %272
  %281 = load i32, ptr %19, align 4, !tbaa !5
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds [10000 x %"struct.std::pair"], ptr @p, i64 0, i64 %282
  %284 = getelementptr inbounds %"struct.std::pair", ptr %283, i32 0, i32 0
  %285 = load i32, ptr %284, align 8, !tbaa !16
  %286 = load i32, ptr @x2, align 4, !tbaa !5
  %287 = icmp sle i32 %285, %286
  br i1 %287, label %288, label %307

288:                                              ; preds = %280
  %289 = load i32, ptr %19, align 4, !tbaa !5
  %290 = sext i32 %289 to i64
  %291 = getelementptr inbounds [10000 x %"struct.std::pair"], ptr @p, i64 0, i64 %290
  %292 = getelementptr inbounds %"struct.std::pair", ptr %291, i32 0, i32 1
  %293 = load i32, ptr %292, align 4, !tbaa !18
  %294 = load i32, ptr @y1, align 4, !tbaa !5
  %295 = icmp sge i32 %293, %294
  br i1 %295, label %296, label %307

296:                                              ; preds = %288
  %297 = load i32, ptr %19, align 4, !tbaa !5
  %298 = sext i32 %297 to i64
  %299 = getelementptr inbounds [10000 x %"struct.std::pair"], ptr @p, i64 0, i64 %298
  %300 = getelementptr inbounds %"struct.std::pair", ptr %299, i32 0, i32 1
  %301 = load i32, ptr %300, align 4, !tbaa !18
  %302 = load i32, ptr @y2, align 4, !tbaa !5
  %303 = icmp sle i32 %301, %302
  br i1 %303, label %304, label %307

304:                                              ; preds = %296
  %305 = load i32, ptr @cnt, align 4, !tbaa !5
  %306 = add nsw i32 %305, -1
  store i32 %306, ptr @cnt, align 4, !tbaa !5
  br label %307

307:                                              ; preds = %304, %296, %288, %280, %272
  br label %308

308:                                              ; preds = %307
  %309 = load i32, ptr %19, align 4, !tbaa !5
  %310 = add nsw i32 %309, 1
  store i32 %310, ptr %19, align 4, !tbaa !5
  br label %267, !llvm.loop !19

311:                                              ; preds = %271
  br label %312

312:                                              ; preds = %311, %207
  %313 = load i32, ptr @sum, align 4, !tbaa !5
  %314 = load i32, ptr @cnt, align 4, !tbaa !5
  %315 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %313, i32 noundef %314)
  ret i32 0
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) #3 align 2

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

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

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = !{!17, !6, i64 0}
!17 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!18 = !{!17, !6, i64 4}
!19 = distinct !{!19, !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.std::pair" = type { i32, i32 }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@x = external dso_local global [10000 x i32], align 16
@y = external dso_local global [10000 x i32], align 16
@x1 = external dso_local global i32, align 4
@x2 = external dso_local local_unnamed_addr global i32, align 4
@y1 = external dso_local global i32, align 4
@y2 = external dso_local local_unnamed_addr global i32, align 4
@sum = external dso_local local_unnamed_addr global i32, align 4
@cnt = external dso_local local_unnamed_addr global i32, align 4
@p = external dso_local global [10000 x %"struct.std::pair"], align 16
@Hash = external dso_local global %"class.std::set", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca %"struct.std::pair", align 8
  %2 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %7 = alloca %"struct.std::pair", align 8
  %8 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %13 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %14 = load i32, ptr @n, align 4, !tbaa !5
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.lr.ph, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %0
  %.pre105 = sext i32 %14 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.._crit_edge_crit_edge
  %.pre-phi106 = phi i64 [ %.pre105, %.._crit_edge_crit_edge ], [ %31, %.lr.ph ]
  %16 = getelementptr inbounds i32, ptr @x, i64 %.pre-phi106
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull @x, ptr noundef nonnull %16)
  %17 = load i32, ptr @n, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds i32, ptr @y, i64 %18
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull @y, ptr noundef nonnull %19)
  %20 = load i32, ptr @n, align 4, !tbaa !5
  %21 = and i32 %20, 1
  %.not = icmp eq i32 %21, 0
  %22 = ashr i32 %20, 1
  br i1 %.not, label %147, label %33

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %23 = getelementptr inbounds i32, ptr @x, i64 %indvars.iv
  %24 = getelementptr inbounds i32, ptr @y, i64 %indvars.iv
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %23, ptr noundef nonnull %24)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  %26 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24)
  store i64 %26, ptr %1, align 8
  %27 = getelementptr inbounds [10000 x %"struct.std::pair"], ptr @p, i64 0, i64 %indvars.iv
  %28 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %27, ptr noundef nonnull align 4 dereferenceable(8) %1) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  %29 = call { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) @Hash, ptr noundef nonnull align 4 dereferenceable(8) %27)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %30 = load i32, ptr @n, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = icmp slt i64 %indvars.iv.next, %31
  br i1 %32, label %.lr.ph, label %._crit_edge, !llvm.loop !9

33:                                               ; preds = %._crit_edge
  %34 = sext i32 %22 to i64
  %35 = getelementptr inbounds [10000 x i32], ptr @x, i64 0, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !5
  store i32 %36, ptr @x1, align 4, !tbaa !5
  %37 = getelementptr inbounds [10000 x i32], ptr @y, i64 0, i64 %34
  %38 = load i32, ptr %37, align 4, !tbaa !5
  store i32 %38, ptr @y1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %39 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @x1, ptr noundef nonnull align 4 dereferenceable(4) @y1)
  store i64 %39, ptr %3, align 8
  %40 = call ptr @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE4findERKS1_(ptr noundef nonnull align 8 dereferenceable(48) @Hash, ptr noundef nonnull align 4 dereferenceable(8) %3)
  store ptr %40, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %41 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @Hash) #8
  store ptr %41, ptr %4, align 8
  %42 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  %43 = load i32, ptr @n, align 4, !tbaa !5
  %44 = icmp sgt i32 %43, 0
  br i1 %42, label %.preheader42, label %.preheader43

.preheader43:                                     ; preds = %33
  br i1 %44, label %.lr.ph47, label %135

.lr.ph47:                                         ; preds = %.preheader43
  %sum.promoted = load i32, ptr @sum, align 4, !tbaa !5
  %45 = load i32, ptr @x1, align 4, !tbaa !5
  %46 = load i32, ptr @y1, align 4, !tbaa !5
  %wide.trip.count = zext nneg i32 %43 to i64
  %min.iters.check = icmp ult i32 %43, 8
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph47
  %indvars.iv76.ph = phi i64 [ 0, %.lr.ph47 ], [ %n.vec, %middle.block ]
  %.ph175 = phi i32 [ %sum.promoted, %.lr.ph47 ], [ %65, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph47
  %n.vec = and i64 %wide.trip.count, 2147483640
  %47 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %sum.promoted, i64 0
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %45, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert119 = insertelement <4 x i32> poison, i32 %46, i64 0
  %broadcast.splat120 = shufflevector <4 x i32> %broadcast.splatinsert119, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ %47, %vector.ph ], [ %62, %vector.body ]
  %vec.phi115 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %63, %vector.body ]
  %48 = getelementptr inbounds [10000 x i32], ptr @x, i64 0, i64 %index
  %49 = getelementptr inbounds i8, ptr %48, i64 16
  %wide.load = load <4 x i32>, ptr %48, align 16, !tbaa !5
  %wide.load116 = load <4 x i32>, ptr %49, align 16, !tbaa !5
  %50 = sub nsw <4 x i32> %broadcast.splat, %wide.load
  %51 = sub nsw <4 x i32> %broadcast.splat, %wide.load116
  %52 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %50, i1 true)
  %53 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %51, i1 true)
  %54 = getelementptr inbounds [10000 x i32], ptr @y, i64 0, i64 %index
  %55 = getelementptr inbounds i8, ptr %54, i64 16
  %wide.load117 = load <4 x i32>, ptr %54, align 16, !tbaa !5
  %wide.load118 = load <4 x i32>, ptr %55, align 16, !tbaa !5
  %56 = sub nsw <4 x i32> %broadcast.splat120, %wide.load117
  %57 = sub nsw <4 x i32> %broadcast.splat120, %wide.load118
  %58 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %56, i1 true)
  %59 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %57, i1 true)
  %60 = add <4 x i32> %vec.phi, %52
  %61 = add <4 x i32> %vec.phi115, %53
  %62 = add <4 x i32> %60, %58
  %63 = add <4 x i32> %61, %59
  %index.next = add nuw i64 %index, 8
  %64 = icmp eq i64 %index.next, %n.vec
  br i1 %64, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %63, %62
  %65 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge48, label %scalar.ph.preheader

.preheader42:                                     ; preds = %33
  %sum.promoted50 = load i32, ptr @sum, align 4, !tbaa !5
  br i1 %44, label %.lr.ph52, label %._crit_edge53

.lr.ph52:                                         ; preds = %.preheader42
  %66 = load i32, ptr @x1, align 4, !tbaa !5
  %67 = load i32, ptr @y1, align 4, !tbaa !5
  %wide.trip.count82 = zext nneg i32 %43 to i64
  %min.iters.check123 = icmp ult i32 %43, 8
  br i1 %min.iters.check123, label %scalar.ph122.preheader, label %vector.ph124

scalar.ph122.preheader:                           ; preds = %middle.block121, %.lr.ph52
  %indvars.iv79.ph = phi i64 [ 0, %.lr.ph52 ], [ %n.vec126, %middle.block121 ]
  %.ph171 = phi i32 [ %sum.promoted50, %.lr.ph52 ], [ %86, %middle.block121 ]
  br label %scalar.ph122

vector.ph124:                                     ; preds = %.lr.ph52
  %n.vec126 = and i64 %wide.trip.count82, 2147483640
  %68 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %sum.promoted50, i64 0
  %broadcast.splatinsert134 = insertelement <4 x i32> poison, i32 %66, i64 0
  %broadcast.splat135 = shufflevector <4 x i32> %broadcast.splatinsert134, <4 x i32> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert138 = insertelement <4 x i32> poison, i32 %67, i64 0
  %broadcast.splat139 = shufflevector <4 x i32> %broadcast.splatinsert138, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body128

vector.body128:                                   ; preds = %vector.body128, %vector.ph124
  %index129 = phi i64 [ 0, %vector.ph124 ], [ %index.next140, %vector.body128 ]
  %vec.phi130 = phi <4 x i32> [ %68, %vector.ph124 ], [ %83, %vector.body128 ]
  %vec.phi131 = phi <4 x i32> [ zeroinitializer, %vector.ph124 ], [ %84, %vector.body128 ]
  %69 = getelementptr inbounds [10000 x i32], ptr @x, i64 0, i64 %index129
  %70 = getelementptr inbounds i8, ptr %69, i64 16
  %wide.load132 = load <4 x i32>, ptr %69, align 16, !tbaa !5
  %wide.load133 = load <4 x i32>, ptr %70, align 16, !tbaa !5
  %71 = sub nsw <4 x i32> %broadcast.splat135, %wide.load132
  %72 = sub nsw <4 x i32> %broadcast.splat135, %wide.load133
  %73 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %71, i1 true)
  %74 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %72, i1 true)
  %75 = getelementptr inbounds [10000 x i32], ptr @y, i64 0, i64 %index129
  %76 = getelementptr inbounds i8, ptr %75, i64 16
  %wide.load136 = load <4 x i32>, ptr %75, align 16, !tbaa !5
  %wide.load137 = load <4 x i32>, ptr %76, align 16, !tbaa !5
  %77 = sub nsw <4 x i32> %broadcast.splat139, %wide.load136
  %78 = sub nsw <4 x i32> %broadcast.splat139, %wide.load137
  %79 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %77, i1 true)
  %80 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %78, i1 true)
  %81 = add <4 x i32> %vec.phi130, %73
  %82 = add <4 x i32> %vec.phi131, %74
  %83 = add <4 x i32> %81, %79
  %84 = add <4 x i32> %82, %80
  %index.next140 = add nuw i64 %index129, 8
  %85 = icmp eq i64 %index.next140, %n.vec126
  br i1 %85, label %middle.block121, label %vector.body128, !llvm.loop !14

middle.block121:                                  ; preds = %vector.body128
  %bin.rdx141 = add <4 x i32> %84, %83
  %86 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx141)
  %cmp.n142 = icmp eq i64 %n.vec126, %wide.trip.count82
  br i1 %cmp.n142, label %._crit_edge53, label %scalar.ph122.preheader

._crit_edge53:                                    ; preds = %scalar.ph122, %middle.block121, %.preheader42
  %87 = phi i32 [ %sum.promoted50, %.preheader42 ], [ %86, %middle.block121 ], [ %108, %scalar.ph122 ]
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr @sum, align 4, !tbaa !5
  %89 = ashr i32 %43, 1
  %90 = add nsw i32 %89, -1
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [10000 x i32], ptr @x, i64 0, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !5
  store i32 %93, ptr @x1, align 4, !tbaa !5
  %94 = add nsw i32 %89, 1
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [10000 x i32], ptr @x, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !5
  store i32 %97, ptr @x2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  store i32 %93, ptr %5, align 4, !tbaa !5
  %.not3756 = icmp sgt i32 %93, %97
  br i1 %.not3756, label %._crit_edge59, label %.lr.ph58

scalar.ph122:                                     ; preds = %scalar.ph122.preheader, %scalar.ph122
  %indvars.iv79 = phi i64 [ %indvars.iv.next80, %scalar.ph122 ], [ %indvars.iv79.ph, %scalar.ph122.preheader ]
  %98 = phi i32 [ %108, %scalar.ph122 ], [ %.ph171, %scalar.ph122.preheader ]
  %99 = getelementptr inbounds [10000 x i32], ptr @x, i64 0, i64 %indvars.iv79
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = sub nsw i32 %66, %100
  %102 = call i32 @llvm.abs.i32(i32 %101, i1 true)
  %103 = getelementptr inbounds [10000 x i32], ptr @y, i64 0, i64 %indvars.iv79
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = sub nsw i32 %67, %104
  %106 = call i32 @llvm.abs.i32(i32 %105, i1 true)
  %107 = add i32 %98, %102
  %108 = add i32 %107, %106
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %exitcond83.not = icmp eq i64 %indvars.iv.next80, %wide.trip.count82
  br i1 %exitcond83.not, label %._crit_edge53, label %scalar.ph122, !llvm.loop !15

._crit_edge59.loopexit:                           ; preds = %120
  %.pre94 = load i32, ptr @n, align 4, !tbaa !5
  %.pre96 = ashr i32 %.pre94, 1
  %.pre97 = add nsw i32 %.pre96, -1
  %.pre99 = sext i32 %.pre97 to i64
  %.pre101 = add nsw i32 %.pre96, 1
  %.pre103 = sext i32 %.pre101 to i64
  br label %._crit_edge59

._crit_edge59:                                    ; preds = %._crit_edge59.loopexit, %._crit_edge53
  %.pre-phi104 = phi i64 [ %.pre103, %._crit_edge59.loopexit ], [ %95, %._crit_edge53 ]
  %.pre-phi100 = phi i64 [ %.pre99, %._crit_edge59.loopexit ], [ %91, %._crit_edge53 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  %109 = getelementptr inbounds [10000 x i32], ptr @y, i64 0, i64 %.pre-phi100
  %110 = load i32, ptr %109, align 4, !tbaa !5
  store i32 %110, ptr @y1, align 4, !tbaa !5
  %111 = getelementptr inbounds [10000 x i32], ptr @y, i64 0, i64 %.pre-phi104
  %112 = load i32, ptr %111, align 4, !tbaa !5
  store i32 %112, ptr @y2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  store i32 %110, ptr %9, align 4, !tbaa !5
  %.not3960 = icmp sgt i32 %110, %112
  br i1 %.not3960, label %._crit_edge63, label %.lr.ph62

.lr.ph58:                                         ; preds = %._crit_edge53, %120
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %113 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) @y1)
  store i64 %113, ptr %7, align 8
  %114 = call ptr @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE4findERKS1_(ptr noundef nonnull align 8 dereferenceable(48) @Hash, ptr noundef nonnull align 4 dereferenceable(8) %7)
  store ptr %114, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %115 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @Hash) #8
  store ptr %115, ptr %8, align 8
  %116 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br i1 %116, label %117, label %120

117:                                              ; preds = %.lr.ph58
  %118 = load i32, ptr @cnt, align 4, !tbaa !5
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr @cnt, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %.lr.ph58, %117
  %121 = load i32, ptr %5, align 4, !tbaa !5
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %5, align 4, !tbaa !5
  %123 = load i32, ptr @x2, align 4, !tbaa !5
  %.not37.not = icmp slt i32 %121, %123
  br i1 %.not37.not, label %.lr.ph58, label %._crit_edge59.loopexit, !llvm.loop !16

._crit_edge63:                                    ; preds = %131, %._crit_edge59
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  %.pre95 = load i32, ptr @cnt, align 4, !tbaa !5
  br label %.loopexit

.lr.ph62:                                         ; preds = %._crit_edge59, %131
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  %124 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @x1, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i64 %124, ptr %11, align 8
  %125 = call ptr @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE4findERKS1_(ptr noundef nonnull align 8 dereferenceable(48) @Hash, ptr noundef nonnull align 4 dereferenceable(8) %11)
  store ptr %125, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %126 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @Hash) #8
  store ptr %126, ptr %12, align 8
  %127 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  br i1 %127, label %128, label %131

128:                                              ; preds = %.lr.ph62
  %129 = load i32, ptr @cnt, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr @cnt, align 4, !tbaa !5
  br label %131

131:                                              ; preds = %.lr.ph62, %128
  %132 = load i32, ptr %9, align 4, !tbaa !5
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %9, align 4, !tbaa !5
  %134 = load i32, ptr @y2, align 4, !tbaa !5
  %.not39.not = icmp slt i32 %132, %134
  br i1 %.not39.not, label %.lr.ph62, label %._crit_edge63, !llvm.loop !17

._crit_edge48:                                    ; preds = %scalar.ph, %middle.block
  %.lcssa113 = phi i32 [ %65, %middle.block ], [ %146, %scalar.ph ]
  store i32 %.lcssa113, ptr @sum, align 4, !tbaa !5
  br label %135

135:                                              ; preds = %._crit_edge48, %.preheader43
  store i32 1, ptr @cnt, align 4, !tbaa !5
  br label %.loopexit

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv76 = phi i64 [ %indvars.iv.next77, %scalar.ph ], [ %indvars.iv76.ph, %scalar.ph.preheader ]
  %136 = phi i32 [ %146, %scalar.ph ], [ %.ph175, %scalar.ph.preheader ]
  %137 = getelementptr inbounds [10000 x i32], ptr @x, i64 0, i64 %indvars.iv76
  %138 = load i32, ptr %137, align 4, !tbaa !5
  %139 = sub nsw i32 %45, %138
  %140 = call i32 @llvm.abs.i32(i32 %139, i1 true)
  %141 = getelementptr inbounds [10000 x i32], ptr @y, i64 0, i64 %indvars.iv76
  %142 = load i32, ptr %141, align 4, !tbaa !5
  %143 = sub nsw i32 %46, %142
  %144 = call i32 @llvm.abs.i32(i32 %143, i1 true)
  %145 = add i32 %136, %140
  %146 = add i32 %145, %144
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next77, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge48, label %scalar.ph, !llvm.loop !18

147:                                              ; preds = %._crit_edge
  %148 = add nsw i32 %22, -1
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [10000 x i32], ptr @x, i64 0, i64 %149
  %151 = load <2 x i32>, ptr %150, align 4, !tbaa !5
  %152 = extractelement <2 x i32> %151, i64 0
  store i32 %152, ptr @x1, align 4, !tbaa !5
  %153 = extractelement <2 x i32> %151, i64 1
  store i32 %153, ptr @x2, align 4, !tbaa !5
  %154 = getelementptr inbounds [10000 x i32], ptr @y, i64 0, i64 %149
  %155 = load <2 x i32>, ptr %154, align 4, !tbaa !5
  %156 = extractelement <2 x i32> %155, i64 0
  store i32 %156, ptr @y1, align 4, !tbaa !5
  %157 = extractelement <2 x i32> %155, i64 1
  store i32 %157, ptr @y2, align 4, !tbaa !5
  %reass.sub = sub i32 %153, %152
  %158 = add i32 %reass.sub, 1
  %reass.sub71 = sub i32 %157, %156
  %159 = add i32 %reass.sub71, 1
  %160 = mul nsw i32 %159, %158
  store i32 %160, ptr @cnt, align 4, !tbaa !5
  %161 = icmp sgt i32 %20, 0
  br i1 %161, label %.lr.ph67.preheader, label %.loopexit

.lr.ph67.preheader:                               ; preds = %147
  %sum.promoted64 = load i32, ptr @sum, align 4, !tbaa !5
  %wide.trip.count87 = zext nneg i32 %20 to i64
  %min.iters.check146 = icmp ult i32 %20, 8
  br i1 %min.iters.check146, label %.lr.ph67.preheader167, label %vector.ph147

.lr.ph67.preheader167:                            ; preds = %middle.block144, %.lr.ph67.preheader
  %indvars.iv84.ph = phi i64 [ 0, %.lr.ph67.preheader ], [ %n.vec149, %middle.block144 ]
  %.ph = phi i32 [ %sum.promoted64, %.lr.ph67.preheader ], [ %180, %middle.block144 ]
  br label %.lr.ph67

vector.ph147:                                     ; preds = %.lr.ph67.preheader
  %n.vec149 = and i64 %wide.trip.count87, 2147483640
  %162 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %sum.promoted64, i64 0
  %broadcast.splat158 = shufflevector <2 x i32> %151, <2 x i32> poison, <4 x i32> zeroinitializer
  %broadcast.splat162 = shufflevector <2 x i32> %155, <2 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body151

vector.body151:                                   ; preds = %vector.body151, %vector.ph147
  %index152 = phi i64 [ 0, %vector.ph147 ], [ %index.next163, %vector.body151 ]
  %vec.phi153 = phi <4 x i32> [ %162, %vector.ph147 ], [ %177, %vector.body151 ]
  %vec.phi154 = phi <4 x i32> [ zeroinitializer, %vector.ph147 ], [ %178, %vector.body151 ]
  %163 = getelementptr inbounds [10000 x i32], ptr @x, i64 0, i64 %index152
  %164 = getelementptr inbounds i8, ptr %163, i64 16
  %wide.load155 = load <4 x i32>, ptr %163, align 16, !tbaa !5
  %wide.load156 = load <4 x i32>, ptr %164, align 16, !tbaa !5
  %165 = sub nsw <4 x i32> %broadcast.splat158, %wide.load155
  %166 = sub nsw <4 x i32> %broadcast.splat158, %wide.load156
  %167 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %165, i1 true)
  %168 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %166, i1 true)
  %169 = getelementptr inbounds [10000 x i32], ptr @y, i64 0, i64 %index152
  %170 = getelementptr inbounds i8, ptr %169, i64 16
  %wide.load159 = load <4 x i32>, ptr %169, align 16, !tbaa !5
  %wide.load160 = load <4 x i32>, ptr %170, align 16, !tbaa !5
  %171 = sub nsw <4 x i32> %broadcast.splat162, %wide.load159
  %172 = sub nsw <4 x i32> %broadcast.splat162, %wide.load160
  %173 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %171, i1 true)
  %174 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %172, i1 true)
  %175 = add <4 x i32> %vec.phi153, %167
  %176 = add <4 x i32> %vec.phi154, %168
  %177 = add <4 x i32> %175, %173
  %178 = add <4 x i32> %176, %174
  %index.next163 = add nuw i64 %index152, 8
  %179 = icmp eq i64 %index.next163, %n.vec149
  br i1 %179, label %middle.block144, label %vector.body151, !llvm.loop !19

middle.block144:                                  ; preds = %vector.body151
  %bin.rdx164 = add <4 x i32> %178, %177
  %180 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx164)
  %cmp.n165 = icmp eq i64 %n.vec149, %wide.trip.count87
  br i1 %cmp.n165, label %.preheader, label %.lr.ph67.preheader167

.preheader:                                       ; preds = %.lr.ph67, %middle.block144
  %.lcssa111 = phi i32 [ %180, %middle.block144 ], [ %191, %.lr.ph67 ]
  store i32 %.lcssa111, ptr @sum, align 4, !tbaa !5
  br i1 %161, label %.lr.ph70.preheader, label %.loopexit

.lr.ph70.preheader:                               ; preds = %.preheader
  %wide.trip.count92 = zext nneg i32 %20 to i64
  br label %.lr.ph70

.lr.ph67:                                         ; preds = %.lr.ph67.preheader167, %.lr.ph67
  %indvars.iv84 = phi i64 [ %indvars.iv.next85, %.lr.ph67 ], [ %indvars.iv84.ph, %.lr.ph67.preheader167 ]
  %181 = phi i32 [ %191, %.lr.ph67 ], [ %.ph, %.lr.ph67.preheader167 ]
  %182 = getelementptr inbounds [10000 x i32], ptr @x, i64 0, i64 %indvars.iv84
  %183 = load i32, ptr %182, align 4, !tbaa !5
  %184 = sub nsw i32 %152, %183
  %185 = call i32 @llvm.abs.i32(i32 %184, i1 true)
  %186 = getelementptr inbounds [10000 x i32], ptr @y, i64 0, i64 %indvars.iv84
  %187 = load i32, ptr %186, align 4, !tbaa !5
  %188 = sub nsw i32 %156, %187
  %189 = call i32 @llvm.abs.i32(i32 %188, i1 true)
  %190 = add i32 %181, %185
  %191 = add i32 %190, %189
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %exitcond88.not = icmp eq i64 %indvars.iv.next85, %wide.trip.count87
  br i1 %exitcond88.not, label %.preheader, label %.lr.ph67, !llvm.loop !20

.lr.ph70:                                         ; preds = %.lr.ph70.preheader, %200
  %indvars.iv89 = phi i64 [ 0, %.lr.ph70.preheader ], [ %indvars.iv.next90, %200 ]
  %192 = phi i32 [ %160, %.lr.ph70.preheader ], [ %201, %200 ]
  %193 = getelementptr inbounds [10000 x %"struct.std::pair"], ptr @p, i64 0, i64 %indvars.iv89
  %194 = load i32, ptr %193, align 8, !tbaa !21
  %.not33 = icmp slt i32 %194, %152
  %.not34 = icmp sgt i32 %194, %153
  %or.cond = select i1 %.not33, i1 true, i1 %.not34
  br i1 %or.cond, label %200, label %195

195:                                              ; preds = %.lr.ph70
  %196 = getelementptr inbounds i8, ptr %193, i64 4
  %197 = load i32, ptr %196, align 4, !tbaa !23
  %.not35 = icmp slt i32 %197, %156
  %.not36 = icmp sgt i32 %197, %157
  %or.cond40 = select i1 %.not35, i1 true, i1 %.not36
  br i1 %or.cond40, label %200, label %198

198:                                              ; preds = %195
  %199 = add nsw i32 %192, -1
  store i32 %199, ptr @cnt, align 4, !tbaa !5
  br label %200

200:                                              ; preds = %.lr.ph70, %195, %198
  %201 = phi i32 [ %192, %.lr.ph70 ], [ %192, %195 ], [ %199, %198 ]
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %exitcond93.not = icmp eq i64 %indvars.iv.next90, %wide.trip.count92
  br i1 %exitcond93.not, label %.loopexit, label %.lr.ph70, !llvm.loop !24

.loopexit:                                        ; preds = %200, %147, %.preheader, %._crit_edge63, %135
  %202 = phi i32 [ %160, %.preheader ], [ %.pre95, %._crit_edge63 ], [ 1, %135 ], [ %160, %147 ], [ %201, %200 ]
  %203 = load i32, ptr @sum, align 4, !tbaa !5
  %204 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %203, i32 noundef %202)
  ret i32 0
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3 align 2

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x i32> @llvm.abs.v4i32(<4 x i32>, i1 immarg) #7

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #7

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

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

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


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