; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/363 Division 1/Problem B (B)

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

@g = external dso_local global [200100 x %"class.std::vector"], align 16
@root = external dso_local global [200100 x i32], align 16
@comp = external dso_local global [200100 x %"class.std::vector.0"], align 16
@v = external dso_local global [200100 x i32], align 16
@a = external dso_local global [200100 x i32], align 16
@xx = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsiii(i32 noundef, i32 noundef, i32 noundef) #0

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

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

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

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

19:                                               ; preds = %55, %0
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = load i32, ptr %2, 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 %3) #7
  br label %58

24:                                               ; preds = %19
  %25 = load i32, ptr %3, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [200100 x i32], ptr @a, i64 0, i64 %26
  %28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %27)
  %29 = load i32, ptr %3, align 4, !tbaa !5
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [200100 x i32], ptr @a, i64 0, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = icmp ne i32 %29, %33
  br i1 %34, label %35, label %50

35:                                               ; preds = %24
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [200100 x i32], ptr @a, i64 0, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [200100 x %"class.std::vector"], ptr @g, i64 0, i64 %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %42 = 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) %3)
  store i64 %42, ptr %4, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %41, ptr noundef nonnull align 4 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  %43 = load i32, ptr %3, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [200100 x %"class.std::vector"], ptr @g, i64 0, i64 %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %46 = load i32, ptr %3, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [200100 x i32], ptr @a, i64 0, i64 %47
  %49 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %48, ptr noundef nonnull align 4 dereferenceable(4) %3)
  store i64 %49, ptr %5, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %45, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %54

50:                                               ; preds = %24
  %51 = load i32, ptr %3, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [200100 x i32], ptr @root, i64 0, i64 %52
  store i32 1, ptr %53, align 4, !tbaa !5
  br label %54

54:                                               ; preds = %50, %35
  br label %55

55:                                               ; preds = %54
  %56 = load i32, ptr %3, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %3, align 4, !tbaa !5
  br label %19, !llvm.loop !9

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

59:                                               ; preds = %75, %58
  %60 = load i32, ptr %7, align 4, !tbaa !5
  %61 = load i32, ptr %2, align 4, !tbaa !5
  %62 = icmp sle i32 %60, %61
  br i1 %62, label %64, label %63

63:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %78

64:                                               ; preds = %59
  %65 = load i32, ptr %7, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [200100 x i32], ptr @v, i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %74, label %70

70:                                               ; preds = %64
  %71 = load i32, ptr %7, align 4, !tbaa !5
  %72 = load i32, ptr %6, align 4, !tbaa !5
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %6, align 4, !tbaa !5
  call void @_Z3dfsiii(i32 noundef %71, i32 noundef -1, i32 noundef %72)
  br label %74

74:                                               ; preds = %70, %64
  br label %75

75:                                               ; preds = %74
  %76 = load i32, ptr %7, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %7, align 4, !tbaa !5
  br label %59, !llvm.loop !11

78:                                               ; preds = %63
  call void @llvm.memset.p0.i64(ptr align 16 @v, i8 0, i64 800400, i1 false)
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #7
  store i8 0, ptr %8, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %147, %78
  %80 = load i32, ptr %11, align 4, !tbaa !5
  %81 = load i32, ptr %6, align 4, !tbaa !5
  %82 = icmp slt i32 %80, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %79
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %150

84:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #7
  store i8 0, ptr %13, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %122, %84
  %86 = load i32, ptr %14, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = load i32, ptr %11, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [200100 x %"class.std::vector.0"], ptr @comp, i64 0, i64 %89
  %91 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %90) #7
  %92 = icmp ult i64 %87, %91
  br i1 %92, label %94, label %93

93:                                               ; preds = %85
  store i32 11, ptr %12, align 4
  br label %125

94:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %95 = load i32, ptr %11, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [200100 x %"class.std::vector.0"], ptr @comp, i64 0, i64 %96
  %98 = load i32, ptr %14, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %97, i64 noundef %99) #7
  %101 = load i32, ptr %100, align 4, !tbaa !5
  store i32 %101, ptr %15, align 4, !tbaa !5
  %102 = load i32, ptr %15, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [200100 x i32], ptr @root, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = icmp ne i32 %105, 0
  br i1 %106, label %107, label %118

107:                                              ; preds = %94
  store i8 1, ptr %13, align 1, !tbaa !12
  %108 = load i32, ptr %11, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [200100 x %"class.std::vector.0"], ptr @comp, i64 0, i64 %109
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %110, i64 noundef 0) #7
  %112 = load i32, ptr %11, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [200100 x %"class.std::vector.0"], ptr @comp, i64 0, i64 %113
  %115 = load i32, ptr %14, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %114, i64 noundef %116) #7
  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) %111, ptr noundef nonnull align 4 dereferenceable(4) %117) #7
  store i32 11, ptr %12, align 4
  br label %119

118:                                              ; preds = %94
  store i32 0, ptr %12, align 4
  br label %119

119:                                              ; preds = %118, %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  %120 = load i32, ptr %12, align 4
  switch i32 %120, label %125 [
    i32 0, label %121
  ]

121:                                              ; preds = %119
  br label %122

122:                                              ; preds = %121
  %123 = load i32, ptr %14, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %14, align 4, !tbaa !5
  br label %85, !llvm.loop !14

125:                                              ; preds = %119, %93
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %126

126:                                              ; preds = %125
  %127 = load i8, ptr %13, align 1, !tbaa !12, !range !15, !noundef !16
  %128 = trunc i8 %127 to i1
  br i1 %128, label %144, label %129

129:                                              ; preds = %126
  store i32 -1, ptr @xx, align 4, !tbaa !5
  %130 = load i32, ptr %11, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [200100 x %"class.std::vector.0"], ptr @comp, i64 0, i64 %131
  %133 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %132, i64 noundef 0) #7
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = call noundef zeroext i1 @_Z8getCycleii(i32 noundef %134, i32 noundef -1)
  %136 = load i32, ptr @xx, align 4, !tbaa !5
  %137 = load i32, ptr @xx, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [200100 x i32], ptr @a, i64 0, i64 %138
  store i32 %136, ptr %139, align 4, !tbaa !5
  %140 = load i32, ptr %11, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [200100 x %"class.std::vector.0"], ptr @comp, i64 0, i64 %141
  %143 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %142, i64 noundef 0) #7
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %143, ptr noundef nonnull align 4 dereferenceable(4) @xx) #7
  br label %146

144:                                              ; preds = %126
  store i8 1, ptr %8, align 1, !tbaa !12
  %145 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %145, ptr %9, align 4, !tbaa !5
  br label %146

146:                                              ; preds = %144, %129
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #7
  br label %147

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

150:                                              ; preds = %83
  %151 = load i8, ptr %8, align 1, !tbaa !12, !range !15, !noundef !16
  %152 = trunc i8 %151 to i1
  br i1 %152, label %153, label %157

153:                                              ; preds = %150
  %154 = load i32, ptr %9, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [200100 x %"class.std::vector.0"], ptr @comp, i64 0, i64 %155
  call void @_ZSt4swapIiSaIiEEvRSt6vectorIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(24) @comp, ptr noundef nonnull align 8 dereferenceable(24) %156) #7
  br label %160

157:                                              ; preds = %150
  %158 = load i32, ptr %10, align 4, !tbaa !5
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %10, align 4, !tbaa !5
  br label %160

160:                                              ; preds = %157, %153
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 1, ptr %16, align 4, !tbaa !5
  br label %161

161:                                              ; preds = %178, %160
  %162 = load i32, ptr %16, align 4, !tbaa !5
  %163 = load i32, ptr %6, align 4, !tbaa !5
  %164 = icmp slt i32 %162, %163
  br i1 %164, label %166, label %165

165:                                              ; preds = %161
  store i32 14, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %181

166:                                              ; preds = %161
  %167 = load i32, ptr %10, align 4, !tbaa !5
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %10, align 4, !tbaa !5
  %169 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @comp, i64 noundef 0) #7
  %170 = load i32, ptr %169, align 4, !tbaa !5
  %171 = load i32, ptr %16, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [200100 x %"class.std::vector.0"], ptr @comp, i64 0, i64 %172
  %174 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %173, i64 noundef 0) #7
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [200100 x i32], ptr @a, i64 0, i64 %176
  store i32 %170, ptr %177, align 4, !tbaa !5
  br label %178

178:                                              ; preds = %166
  %179 = load i32, ptr %16, align 4, !tbaa !5
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr %16, align 4, !tbaa !5
  br label %161, !llvm.loop !18

181:                                              ; preds = %165
  %182 = load i32, ptr %10, align 4, !tbaa !5
  %183 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %182)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 1, ptr %17, align 4, !tbaa !5
  br label %184

184:                                              ; preds = %195, %181
  %185 = load i32, ptr %17, align 4, !tbaa !5
  %186 = load i32, ptr %2, align 4, !tbaa !5
  %187 = icmp sle i32 %185, %186
  br i1 %187, label %189, label %188

188:                                              ; preds = %184
  store i32 17, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %198

189:                                              ; preds = %184
  %190 = load i32, ptr %17, align 4, !tbaa !5
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [200100 x i32], ptr @a, i64 0, i64 %191
  %193 = load i32, ptr %192, align 4, !tbaa !5
  %194 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %193)
  br label %195

195:                                              ; preds = %189
  %196 = load i32, ptr %17, align 4, !tbaa !5
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %17, align 4, !tbaa !5
  br label %184, !llvm.loop !19

198:                                              ; preds = %188
  %199 = call i32 @puts(ptr noundef @.str.6)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %200 = load i32, ptr %1, align 4
  ret i32 %200
}

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #5 align 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) #5 align 2

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

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

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

declare i32 @puts(ptr noundef) #3

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

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

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

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

@g = external dso_local global [200100 x %"class.std::vector"], align 16
@root = external dso_local local_unnamed_addr global [200100 x i32], align 16
@comp = external dso_local global [200100 x %"class.std::vector.0"], align 16
@v = external dso_local local_unnamed_addr global [200100 x i32], align 16
@a = external dso_local global [200100 x i32], align 16
@xx = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsiii(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

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

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

._crit_edge.thread:                               ; preds = %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  br label %._crit_edge71.thread

._crit_edge:                                      ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  %.not5266 = icmp slt i32 %28, 1
  br i1 %.not5266, label %._crit_edge71.thread, label %.lr.ph70

.lr.ph:                                           ; preds = %0, %25
  %storemerge65 = phi i32 [ %27, %25 ], [ 1, %0 ]
  %7 = sext i32 %storemerge65 to i64
  %8 = getelementptr inbounds [200100 x i32], ptr @a, i64 0, i64 %7
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %8)
  %10 = load i32, ptr %2, align 4, !tbaa !5
  %11 = sext i32 %10 to i64
  %12 = getelementptr inbounds [200100 x i32], ptr @a, i64 0, i64 %11
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %.not56 = icmp eq i32 %10, %13
  br i1 %.not56, label %23, label %14

14:                                               ; preds = %.lr.ph
  %15 = sext i32 %13 to i64
  %16 = getelementptr inbounds [200100 x %"class.std::vector"], ptr @g, i64 0, i64 %15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %17 = 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) %2)
  store i64 %17, ptr %3, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 4 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [200100 x %"class.std::vector"], ptr @g, i64 0, i64 %19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %21 = getelementptr inbounds [200100 x i32], ptr @a, i64 0, i64 %19
  %22 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i64 %22, ptr %4, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 4 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %.pre = load i32, ptr %2, align 4, !tbaa !5
  br label %25

23:                                               ; preds = %.lr.ph
  %24 = getelementptr inbounds [200100 x i32], ptr @root, i64 0, i64 %11
  store i32 1, ptr %24, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %14, %23
  %26 = phi i32 [ %.pre, %14 ], [ %10, %23 ]
  %27 = add nsw i32 %26, 1
  store i32 %27, ptr %2, align 4, !tbaa !5
  %28 = load i32, ptr %1, align 4, !tbaa !5
  %.not.not = icmp slt i32 %26, %28
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge71.thread:                             ; preds = %._crit_edge, %._crit_edge.thread
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(800400) @v, i8 0, i64 800400, i1 false)
  br label %._crit_edge87

._crit_edge71:                                    ; preds = %36
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(800400) @v, i8 0, i64 800400, i1 false)
  %29 = icmp sgt i32 %.148, 0
  br i1 %29, label %.preheader.preheader, label %._crit_edge87

.preheader.preheader:                             ; preds = %._crit_edge71
  %wide.trip.count = zext nneg i32 %.148 to i64
  br label %.preheader.outer

.preheader.outer:                                 ; preds = %.thread, %.preheader.preheader
  %indvars.iv100.ph = phi i64 [ %indvars.iv.next101120, %.thread ], [ 0, %.preheader.preheader ]
  %.04277.ph = phi i64 [ %indvars.iv100, %.thread ], [ 0, %.preheader.preheader ]
  %.04476.ph = phi i1 [ true, %.thread ], [ false, %.preheader.preheader ]
  br label %.preheader

.lr.ph70:                                         ; preds = %._crit_edge, %36
  %30 = phi i32 [ %37, %36 ], [ %28, %._crit_edge ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %36 ], [ 1, %._crit_edge ]
  %.04767 = phi i32 [ %.148, %36 ], [ 0, %._crit_edge ]
  %31 = getelementptr inbounds [200100 x i32], ptr @v, i64 0, i64 %indvars.iv
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %.not55 = icmp eq i32 %32, 0
  br i1 %.not55, label %33, label %36

33:                                               ; preds = %.lr.ph70
  %34 = add nsw i32 %.04767, 1
  %35 = trunc nuw nsw i64 %indvars.iv to i32
  call void @_Z3dfsiii(i32 noundef %35, i32 noundef -1, i32 noundef %.04767)
  %.pre110 = load i32, ptr %1, align 4, !tbaa !5
  br label %36

36:                                               ; preds = %.lr.ph70, %33
  %37 = phi i32 [ %30, %.lr.ph70 ], [ %.pre110, %33 ]
  %.148 = phi i32 [ %.04767, %.lr.ph70 ], [ %34, %33 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %38 = sext i32 %37 to i64
  %.not52.not = icmp slt i64 %indvars.iv, %38
  br i1 %.not52.not, label %.lr.ph70, label %._crit_edge71, !llvm.loop !11

.preheader:                                       ; preds = %.preheader.outer, %.loopexit
  %indvars.iv100 = phi i64 [ %indvars.iv.next101, %.loopexit ], [ %indvars.iv100.ph, %.preheader.outer ]
  %39 = getelementptr inbounds [200100 x %"class.std::vector.0"], ptr @comp, i64 0, i64 %indvars.iv100
  %40 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %39) #7
  %.not = icmp eq i64 %40, 0
  br i1 %.not, label %.loopexit, label %.lr.ph73

._crit_edge80:                                    ; preds = %.loopexit
  br i1 %.04476.ph, label %._crit_edge80.thread124, label %60

41:                                               ; preds = %.lr.ph73
  %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1
  %42 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %39) #7
  %43 = icmp ugt i64 %42, %indvars.iv.next98
  br i1 %43, label %.lr.ph73, label %.loopexit, !llvm.loop !12

.lr.ph73:                                         ; preds = %.preheader, %41
  %indvars.iv97 = phi i64 [ %indvars.iv.next98, %41 ], [ 0, %.preheader ]
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %indvars.iv97) #7
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [200100 x i32], ptr @root, i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %.not54 = icmp eq i32 %48, 0
  br i1 %.not54, label %41, label %.thread

.loopexit:                                        ; preds = %41, %.preheader
  store i32 -1, ptr @xx, align 4, !tbaa !5
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef 0) #7
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = call noundef zeroext i1 @_Z8getCycleii(i32 noundef %50, i32 noundef -1)
  %52 = load i32, ptr @xx, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [200100 x i32], ptr @a, i64 0, i64 %53
  store i32 %52, ptr %54, align 4, !tbaa !5
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef 0) #7
  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) %55, ptr noundef nonnull align 4 dereferenceable(4) @xx) #7
  %indvars.iv.next101 = add nuw nsw i64 %indvars.iv100, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next101, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge80, label %.preheader, !llvm.loop !13

.thread:                                          ; preds = %.lr.ph73
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef 0) #7
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %indvars.iv97) #7
  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) %56, ptr noundef nonnull align 4 dereferenceable(4) %57) #7
  %indvars.iv.next101120 = add nuw nsw i64 %indvars.iv100, 1
  %exitcond.not121 = icmp eq i64 %indvars.iv.next101120, %wide.trip.count
  br i1 %exitcond.not121, label %._crit_edge80.thread124, label %.preheader.outer, !llvm.loop !13

._crit_edge80.thread124:                          ; preds = %.thread, %._crit_edge80
  %.in.in = phi i64 [ %.04277.ph, %._crit_edge80 ], [ %indvars.iv100, %.thread ]
  %.in = shl i64 %.in.in, 32
  %58 = ashr exact i64 %.in, 32
  %59 = getelementptr inbounds [200100 x %"class.std::vector.0"], ptr @comp, i64 0, i64 %58
  call void @_ZSt4swapIiSaIiEEvRSt6vectorIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(24) @comp, ptr noundef nonnull align 8 dereferenceable(24) %59) #7
  br label %60

60:                                               ; preds = %._crit_edge80, %._crit_edge80.thread124
  %.040 = phi i32 [ 0, %._crit_edge80.thread124 ], [ 1, %._crit_edge80 ]
  %.not138 = icmp eq i32 %.148, 1
  br i1 %.not138, label %._crit_edge87, label %.lr.ph86.preheader

.lr.ph86.preheader:                               ; preds = %60
  %61 = add nuw i32 %.148, %.040
  %wide.trip.count105 = zext nneg i32 %.148 to i64
  br label %.lr.ph86

._crit_edge87.loopexit:                           ; preds = %.lr.ph86
  %62 = add i32 %61, -1
  br label %._crit_edge87

._crit_edge87:                                    ; preds = %._crit_edge71, %._crit_edge71.thread, %._crit_edge87.loopexit, %60
  %.141.lcssa = phi i32 [ %.040, %60 ], [ %62, %._crit_edge87.loopexit ], [ 1, %._crit_edge71.thread ], [ 1, %._crit_edge71 ]
  %63 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %.141.lcssa)
  %64 = load i32, ptr %1, align 4, !tbaa !5
  %.not5389 = icmp slt i32 %64, 1
  br i1 %.not5389, label %._crit_edge93, label %.lr.ph92

.lr.ph86:                                         ; preds = %.lr.ph86.preheader, %.lr.ph86
  %indvars.iv102 = phi i64 [ 1, %.lr.ph86.preheader ], [ %indvars.iv.next103, %.lr.ph86 ]
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @comp, i64 noundef 0) #7
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = getelementptr inbounds [200100 x %"class.std::vector.0"], ptr @comp, i64 0, i64 %indvars.iv102
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %67, i64 noundef 0) #7
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [200100 x i32], ptr @a, i64 0, i64 %70
  store i32 %66, ptr %71, align 4, !tbaa !5
  %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
  %exitcond106.not = icmp eq i64 %indvars.iv.next103, %wide.trip.count105
  br i1 %exitcond106.not, label %._crit_edge87.loopexit, label %.lr.ph86, !llvm.loop !14

._crit_edge93:                                    ; preds = %.lr.ph92, %._crit_edge87
  %72 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

.lr.ph92:                                         ; preds = %._crit_edge87, %.lr.ph92
  %indvars.iv107 = phi i64 [ %indvars.iv.next108, %.lr.ph92 ], [ 1, %._crit_edge87 ]
  %73 = getelementptr inbounds [200100 x i32], ptr @a, i64 0, i64 %indvars.iv107
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %74)
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %76 = load i32, ptr %1, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %.not53.not = icmp slt i64 %indvars.iv107, %77
  br i1 %.not53.not, label %.lr.ph92, label %._crit_edge93, !llvm.loop !15
}

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5 align 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 #5 align 2

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

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

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

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

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

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

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


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