; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/IndiaHacks 2016/Problem C (C)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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" = type { i32, i32 }
%"struct.std::pair.3" = 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
@t = external dso_local global [200100 x i32], align 16
@ind = external dso_local global %"class.std::vector", align 8
@s = external dso_local global %"class.std::set", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z4goodi(i32 noundef) #0

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

19:                                               ; preds = %29, %0
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = load i32, ptr @n, align 4, !tbaa !5
  %22 = icmp sle i32 %20, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %32

24:                                               ; preds = %19
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %26
  %28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %27)
  br label %29

29:                                               ; preds = %24
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %2, align 4, !tbaa !5
  br label %19, !llvm.loop !9

32:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %146, %32
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = load i32, ptr @n, align 4, !tbaa !5
  %36 = icmp sle i32 %34, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %149

38:                                               ; preds = %33
  %39 = load i32, ptr %3, align 4, !tbaa !5
  %40 = icmp eq i32 %39, 1
  br i1 %40, label %41, label %54

41:                                               ; preds = %38
  %42 = load i32, ptr %3, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %43
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = load i32, ptr %3, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = icmp sge i32 %45, %50
  br i1 %51, label %52, label %53

52:                                               ; preds = %41
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @ind, ptr noundef nonnull align 4 dereferenceable(4) %3)
  br label %53

53:                                               ; preds = %52, %41
  br label %145

54:                                               ; preds = %38
  %55 = load i32, ptr %3, align 4, !tbaa !5
  %56 = load i32, ptr @n, align 4, !tbaa !5
  %57 = icmp eq i32 %55, %56
  br i1 %57, label %58, label %91

58:                                               ; preds = %54
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = srem i32 %59, 2
  %61 = icmp eq i32 %60, 1
  br i1 %61, label %62, label %74

62:                                               ; preds = %58
  %63 = load i32, ptr %3, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = load i32, ptr %3, align 4, !tbaa !5
  %68 = sub nsw i32 %67, 1
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = icmp sge i32 %66, %71
  br i1 %72, label %73, label %74

73:                                               ; preds = %62
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @ind, ptr noundef nonnull align 4 dereferenceable(4) %3)
  br label %74

74:                                               ; preds = %73, %62, %58
  %75 = load i32, ptr %3, align 4, !tbaa !5
  %76 = srem i32 %75, 2
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %78, label %90

78:                                               ; preds = %74
  %79 = load i32, ptr %3, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = load i32, ptr %3, align 4, !tbaa !5
  %84 = sub nsw i32 %83, 1
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = icmp sle i32 %82, %87
  br i1 %88, label %89, label %90

89:                                               ; preds = %78
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @ind, ptr noundef nonnull align 4 dereferenceable(4) %3)
  br label %90

90:                                               ; preds = %89, %78, %74
  br label %144

91:                                               ; preds = %54
  %92 = load i32, ptr %3, align 4, !tbaa !5
  %93 = srem i32 %92, 2
  %94 = icmp eq i32 %93, 1
  br i1 %94, label %95, label %119

95:                                               ; preds = %91
  %96 = load i32, ptr %3, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %97
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = load i32, ptr %3, align 4, !tbaa !5
  %101 = sub nsw i32 %100, 1
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = icmp sge i32 %99, %104
  br i1 %105, label %117, label %106

106:                                              ; preds = %95
  %107 = load i32, ptr %3, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = load i32, ptr %3, align 4, !tbaa !5
  %112 = add nsw i32 %111, 1
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = icmp sge i32 %110, %115
  br i1 %116, label %117, label %118

117:                                              ; preds = %106, %95
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @ind, ptr noundef nonnull align 4 dereferenceable(4) %3)
  br label %118

118:                                              ; preds = %117, %106
  br label %143

119:                                              ; preds = %91
  %120 = load i32, ptr %3, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = load i32, ptr %3, align 4, !tbaa !5
  %125 = sub nsw i32 %124, 1
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = icmp sle i32 %123, %128
  br i1 %129, label %141, label %130

130:                                              ; preds = %119
  %131 = load i32, ptr %3, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = load i32, ptr %3, align 4, !tbaa !5
  %136 = add nsw i32 %135, 1
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %137
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %140 = icmp sle i32 %134, %139
  br i1 %140, label %141, label %142

141:                                              ; preds = %130, %119
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @ind, ptr noundef nonnull align 4 dereferenceable(4) %3)
  br label %142

142:                                              ; preds = %141, %130
  br label %143

143:                                              ; preds = %142, %118
  br label %144

144:                                              ; preds = %143, %90
  br label %145

145:                                              ; preds = %144, %53
  br label %146

146:                                              ; preds = %145
  %147 = load i32, ptr %3, align 4, !tbaa !5
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %3, align 4, !tbaa !5
  br label %33, !llvm.loop !11

149:                                              ; preds = %37
  %150 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ind) #6
  %151 = icmp ugt i64 %150, 6
  br i1 %151, label %152, label %154

152:                                              ; preds = %149
  %153 = call i32 @puts(ptr noundef @.str.3)
  store i32 0, ptr %1, align 4
  br label %259

154:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %155

155:                                              ; preds = %253, %154
  %156 = load i32, ptr %5, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ind) #6
  %159 = icmp ult i64 %157, %158
  br i1 %159, label %161, label %160

160:                                              ; preds = %155
  store i32 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %256

161:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %162 = load i32, ptr %5, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ind, i64 noundef %163) #6
  %165 = load i32, ptr %164, align 4, !tbaa !5
  store i32 %165, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %166

166:                                              ; preds = %249, %161
  %167 = load i32, ptr %8, align 4, !tbaa !5
  %168 = load i32, ptr @n, align 4, !tbaa !5
  %169 = icmp sle i32 %167, %168
  br i1 %169, label %171, label %170

170:                                              ; preds = %166
  store i32 11, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %252

171:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %172 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %172, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %173 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i64 %173, ptr %10, align 4
  %174 = call noundef i64 @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5countERKS1_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 4 dereferenceable(8) %10)
  %175 = icmp ne i64 %174, 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  br i1 %175, label %180, label %176

176:                                              ; preds = %171
  %177 = 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) %7)
  store i64 %177, ptr %11, align 4
  %178 = call noundef i64 @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5countERKS1_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 4 dereferenceable(8) %11)
  %179 = icmp ne i64 %178, 0
  br label %180

180:                                              ; preds = %176, %171
  %181 = phi i1 [ true, %171 ], [ %179, %176 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br i1 %181, label %182, label %183

182:                                              ; preds = %180
  store i32 13, ptr %6, align 4
  br label %246

183:                                              ; preds = %180
  %184 = load i32, ptr %7, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %185
  %187 = load i32, ptr %9, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %188
  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) %186, ptr noundef nonnull align 4 dereferenceable(4) %189) #6
  %190 = load i32, ptr %9, align 4, !tbaa !5
  %191 = call noundef zeroext i1 @_Z4goodi(i32 noundef %190)
  br i1 %191, label %192, label %195

192:                                              ; preds = %183
  %193 = load i32, ptr %7, align 4, !tbaa !5
  %194 = call noundef zeroext i1 @_Z4goodi(i32 noundef %193)
  br i1 %194, label %202, label %195

195:                                              ; preds = %192, %183
  %196 = load i32, ptr %7, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %197
  %199 = load i32, ptr %9, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %200
  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) %198, ptr noundef nonnull align 4 dereferenceable(4) %201) #6
  store i32 13, ptr %6, align 4
  br label %246

202:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  store i8 1, ptr %12, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %203

203:                                              ; preds = %217, %202
  %204 = load i32, ptr %13, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ind) #6
  %207 = icmp ult i64 %205, %206
  br i1 %207, label %209, label %208

208:                                              ; preds = %203
  store i32 14, ptr %6, align 4
  br label %220

209:                                              ; preds = %203
  %210 = load i32, ptr %13, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ind, i64 noundef %211) #6
  %213 = load i32, ptr %212, align 4, !tbaa !5
  %214 = call noundef zeroext i1 @_Z4goodi(i32 noundef %213)
  br i1 %214, label %216, label %215

215:                                              ; preds = %209
  store i8 0, ptr %12, align 1, !tbaa !12
  store i32 14, ptr %6, align 4
  br label %220

216:                                              ; preds = %209
  br label %217

217:                                              ; preds = %216
  %218 = load i32, ptr %13, align 4, !tbaa !5
  %219 = add nsw i32 %218, 1
  store i32 %219, ptr %13, align 4, !tbaa !5
  br label %203, !llvm.loop !14

220:                                              ; preds = %215, %208
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %221

221:                                              ; preds = %220
  %222 = load i8, ptr %12, align 1, !tbaa !12, !range !15, !noundef !16
  %223 = trunc i8 %222 to i1
  br i1 %223, label %224, label %239

224:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %225 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i64 %225, ptr %14, align 4
  %226 = call { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 4 dereferenceable(8) %14)
  %227 = getelementptr inbounds { ptr, i8 }, ptr %15, i32 0, i32 0
  %228 = extractvalue { ptr, i8 } %226, 0
  store ptr %228, ptr %227, align 8
  %229 = getelementptr inbounds { ptr, i8 }, ptr %15, i32 0, i32 1
  %230 = extractvalue { ptr, i8 } %226, 1
  store i8 %230, ptr %229, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %231 = 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) %7)
  store i64 %231, ptr %16, align 4
  %232 = call { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 4 dereferenceable(8) %16)
  %233 = getelementptr inbounds { ptr, i8 }, ptr %17, i32 0, i32 0
  %234 = extractvalue { ptr, i8 } %232, 0
  store ptr %234, ptr %233, align 8
  %235 = getelementptr inbounds { ptr, i8 }, ptr %17, i32 0, i32 1
  %236 = extractvalue { ptr, i8 } %232, 1
  store i8 %236, ptr %235, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  %237 = load i32, ptr %4, align 4, !tbaa !5
  %238 = add nsw i32 %237, 1
  store i32 %238, ptr %4, align 4, !tbaa !5
  br label %239

239:                                              ; preds = %224, %221
  %240 = load i32, ptr %7, align 4, !tbaa !5
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %241
  %243 = load i32, ptr %9, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %244
  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) %242, ptr noundef nonnull align 4 dereferenceable(4) %245) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  store i32 0, ptr %6, align 4
  br label %246

246:                                              ; preds = %239, %195, %182
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  %247 = load i32, ptr %6, align 4
  switch i32 %247, label %261 [
    i32 0, label %248
    i32 13, label %249
  ]

248:                                              ; preds = %246
  br label %249

249:                                              ; preds = %248, %246
  %250 = load i32, ptr %8, align 4, !tbaa !5
  %251 = add nsw i32 %250, 1
  store i32 %251, ptr %8, align 4, !tbaa !5
  br label %166, !llvm.loop !17

252:                                              ; preds = %170
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %253

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

256:                                              ; preds = %160
  %257 = load i32, ptr %4, align 4, !tbaa !5
  %258 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %257)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %259

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

261:                                              ; preds = %246
  unreachable
}

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

declare i32 @puts(ptr noundef) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5countERKS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) #4 align 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)) #4

; 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)) #5

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

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

attributes #0 = { 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 #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync 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 = { 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 #6 = { nounwind }

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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" = type { i32, i32 }

@n = external dso_local global i32, align 4
@t = external dso_local global [200100 x i32], align 16
@ind = external dso_local global %"class.std::vector", align 8
@s = external dso_local global %"class.std::set", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z4goodi(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca %"struct.std::pair", align 8
  %8 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %9 = load i32, ptr @n, align 4, !tbaa !5
  %.not44 = icmp slt i32 %9, 1
  br i1 %.not44, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  br label %._crit_edge50

._crit_edge:                                      ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  store i32 1, ptr %1, align 4, !tbaa !5
  %.not2946 = icmp slt i32 %12, 1
  br i1 %.not2946, label %._crit_edge50, label %.lr.ph49

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %10 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %indvars.iv
  %11 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %10)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %.not.not = icmp slt i64 %indvars.iv, %13
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge50:                                    ; preds = %76, %._crit_edge.thread, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  %14 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ind) #6
  %15 = icmp ugt i64 %14, 6
  br i1 %15, label %80, label %.preheader43

.preheader43:                                     ; preds = %._crit_edge50
  %16 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ind) #6
  %.not = icmp eq i64 %16, 0
  br i1 %.not, label %._crit_edge63, label %.lr.ph62

.lr.ph49:                                         ; preds = %._crit_edge, %76
  %17 = phi i32 [ %79, %76 ], [ %12, %._crit_edge ]
  %storemerge47 = phi i32 [ %78, %76 ], [ 1, %._crit_edge ]
  %18 = icmp eq i32 %storemerge47, 1
  br i1 %18, label %19, label %22

19:                                               ; preds = %.lr.ph49
  %20 = load i32, ptr getelementptr inbounds (i8, ptr @t, i64 4), align 4, !tbaa !5
  %21 = load i32, ptr getelementptr inbounds (i8, ptr @t, i64 8), align 8, !tbaa !5
  %.not40 = icmp slt i32 %20, %21
  br i1 %.not40, label %76, label %.sink.split

22:                                               ; preds = %.lr.ph49
  %23 = icmp eq i32 %storemerge47, %17
  br i1 %23, label %24, label %48

24:                                               ; preds = %22
  %25 = and i32 %17, -2147483647
  %26 = icmp eq i32 %25, 1
  br i1 %26, label %27, label %36

27:                                               ; preds = %24
  %28 = zext nneg i32 %17 to i64
  %29 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = add nsw i32 %17, -1
  %32 = zext nneg i32 %31 to i64
  %33 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %.not38 = icmp slt i32 %30, %34
  br i1 %.not38, label %36, label %35

35:                                               ; preds = %27
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @ind, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  br label %36

36:                                               ; preds = %35, %27, %24
  %37 = phi i32 [ %.pre, %35 ], [ %17, %27 ], [ %17, %24 ]
  %38 = and i32 %37, 1
  %39 = icmp eq i32 %38, 0
  br i1 %39, label %40, label %76

40:                                               ; preds = %36
  %41 = sext i32 %37 to i64
  %42 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = add nsw i32 %37, -1
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %.not39 = icmp sgt i32 %43, %47
  br i1 %.not39, label %76, label %.sink.split

48:                                               ; preds = %22
  %49 = and i32 %storemerge47, -2147483647
  %50 = icmp eq i32 %49, 1
  %51 = add nsw i32 %storemerge47, -1
  br i1 %50, label %52, label %64

52:                                               ; preds = %48
  %53 = zext nneg i32 %storemerge47 to i64
  %54 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = zext nneg i32 %51 to i64
  %57 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %.not36 = icmp slt i32 %55, %58
  br i1 %.not36, label %59, label %.sink.split

59:                                               ; preds = %52
  %60 = add nuw nsw i32 %storemerge47, 1
  %61 = zext nneg i32 %60 to i64
  %62 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %.not37 = icmp slt i32 %55, %63
  br i1 %.not37, label %76, label %.sink.split

64:                                               ; preds = %48
  %65 = sext i32 %storemerge47 to i64
  %66 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = sext i32 %51 to i64
  %69 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %.not34 = icmp sgt i32 %67, %70
  br i1 %.not34, label %71, label %.sink.split

71:                                               ; preds = %64
  %72 = add nsw i32 %storemerge47, 1
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %.not35 = icmp sgt i32 %67, %75
  br i1 %.not35, label %76, label %.sink.split

.sink.split:                                      ; preds = %64, %71, %52, %59, %40, %19
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @ind, ptr noundef nonnull align 4 dereferenceable(4) %1)
  br label %76

76:                                               ; preds = %.sink.split, %19, %59, %71, %36, %40
  %77 = load i32, ptr %1, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %1, align 4, !tbaa !5
  %79 = load i32, ptr @n, align 4, !tbaa !5
  %.not29.not = icmp slt i32 %77, %79
  br i1 %.not29.not, label %.lr.ph49, label %._crit_edge50, !llvm.loop !11

80:                                               ; preds = %._crit_edge50
  %81 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %132

._crit_edge63:                                    ; preds = %._crit_edge59, %.preheader43
  %.019.lcssa = phi i32 [ 0, %.preheader43 ], [ %.1.lcssa, %._crit_edge59 ]
  %82 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %.019.lcssa)
  br label %132

.lr.ph62:                                         ; preds = %.preheader43, %._crit_edge59
  %indvars.iv69 = phi i64 [ %indvars.iv.next70, %._crit_edge59 ], [ 0, %.preheader43 ]
  %.01961 = phi i32 [ %.1.lcssa, %._crit_edge59 ], [ 0, %.preheader43 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ind, i64 noundef %indvars.iv69) #6
  %84 = load i32, ptr %83, align 4, !tbaa !5
  store i32 %84, ptr %2, align 4, !tbaa !5
  %85 = load i32, ptr @n, align 4, !tbaa !5
  %.not3054 = icmp slt i32 %85, 1
  br i1 %.not3054, label %._crit_edge59, label %.lr.ph58

._crit_edge59:                                    ; preds = %129, %.lr.ph62
  %.1.lcssa = phi i32 [ %.01961, %.lr.ph62 ], [ %.3, %129 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %86 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ind) #6
  %87 = icmp ugt i64 %86, %indvars.iv.next70
  br i1 %87, label %.lr.ph62, label %._crit_edge63, !llvm.loop !12

.lr.ph58:                                         ; preds = %.lr.ph62, %129
  %.156 = phi i32 [ %.3, %129 ], [ %.01961, %.lr.ph62 ]
  %.02355 = phi i32 [ %130, %129 ], [ 1, %.lr.ph62 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  store i32 %.02355, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %88 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  store i64 %88, ptr %4, align 8
  %89 = call noundef i64 @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5countERKS1_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 4 dereferenceable(8) %4)
  %.not31 = icmp eq i64 %89, 0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  br i1 %.not31, label %90, label %.critedge

90:                                               ; preds = %.lr.ph58
  %91 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i64 %91, ptr %5, align 8
  %92 = call noundef i64 @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5countERKS1_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 4 dereferenceable(8) %5)
  %.not32 = icmp eq i64 %92, 0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br i1 %.not32, label %93, label %129

.critedge:                                        ; preds = %.lr.ph58
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %129

93:                                               ; preds = %90
  %94 = load i32, ptr %2, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %95
  %97 = load i32, ptr %3, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %98
  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) %96, ptr noundef nonnull align 4 dereferenceable(4) %99) #6
  %100 = load i32, ptr %3, align 4, !tbaa !5
  %101 = call noundef zeroext i1 @_Z4goodi(i32 noundef %100)
  br i1 %101, label %102, label %106

102:                                              ; preds = %93
  %103 = load i32, ptr %2, align 4, !tbaa !5
  %104 = call noundef zeroext i1 @_Z4goodi(i32 noundef %103)
  br i1 %104, label %.preheader, label %106

.preheader:                                       ; preds = %102
  %105 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ind) #6
  %.not3351.not = icmp eq i64 %105, 0
  br i1 %.not3351.not, label %.critedge42, label %.lr.ph53

106:                                              ; preds = %102, %93
  %107 = load i32, ptr %2, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %108
  %110 = load i32, ptr %3, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %111
  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) %109, ptr noundef nonnull align 4 dereferenceable(4) %112) #6
  br label %129

113:                                              ; preds = %.lr.ph53
  %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1
  %114 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ind) #6
  %.not33 = icmp ugt i64 %114, %indvars.iv.next67
  br i1 %.not33, label %.lr.ph53, label %.critedge42, !llvm.loop !13

.lr.ph53:                                         ; preds = %.preheader, %113
  %indvars.iv66 = phi i64 [ %indvars.iv.next67, %113 ], [ 0, %.preheader ]
  %115 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ind, i64 noundef %indvars.iv66) #6
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = call noundef zeroext i1 @_Z4goodi(i32 noundef %116)
  br i1 %117, label %113, label %.loopexit

.critedge42:                                      ; preds = %113, %.preheader
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %118 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  store i64 %118, ptr %6, align 8
  %119 = call { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %120 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i64 %120, ptr %7, align 8
  %121 = call { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  %122 = add nsw i32 %.156, 1
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph53, %.critedge42
  %.2 = phi i32 [ %122, %.critedge42 ], [ %.156, %.lr.ph53 ]
  %123 = load i32, ptr %2, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %124
  %126 = load i32, ptr %3, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [200100 x i32], ptr @t, i64 0, i64 %127
  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) %125, ptr noundef nonnull align 4 dereferenceable(4) %128) #6
  br label %129

129:                                              ; preds = %90, %.critedge, %.loopexit, %106
  %.3 = phi i32 [ %.2, %.loopexit ], [ %.156, %106 ], [ %.156, %.critedge ], [ %.156, %90 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  %130 = add nuw nsw i32 %.02355, 1
  %131 = load i32, ptr @n, align 4, !tbaa !5
  %.not30.not = icmp slt i32 %.02355, %131
  br i1 %.not30.not, label %.lr.ph58, label %._crit_edge59, !llvm.loop !14

132:                                              ; preds = %._crit_edge63, %80
  ret i32 0
}

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5countERKS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #4 align 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 #4

; 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 #5

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

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

attributes #0 = { 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 #1 = { 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 #2 = { 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 #3 = { mustprogress nocallback nofree nosync 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 = { 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 #6 = { 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}


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