; LLVM IR from tangjz/acm-icpc :: codeforces/complete (472D)

; 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.Line = type { i32, i32, i32 }
%"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 }
%"struct.std::pair" = type { i32, i32 }

@n = external dso_local global i32, align 4
@g1 = external dso_local global [2001 x [2001 x i32]], align 16
@g2 = external dso_local global [2001 x [2001 x i32]], align 16
@fa = external dso_local global [2001 x i32], align 16
@tot = external dso_local global i32, align 4
@s = external dso_local global i32, align 4
@vis = external dso_local global [2001 x i32], align 16
@line = external dso_local global [4000010 x %struct.Line], align 16
@e = external dso_local global [2001 x %"class.std::vector"], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z4findi(i32 noundef) #0

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

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

21:                                               ; preds = %17
  store i32 2, ptr %3, align 4
  br label %87

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

23:                                               ; preds = %78, %22
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = load i32, ptr @n, align 4, !tbaa !5
  %26 = icmp sle i32 %24, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %23
  store i32 5, ptr %3, align 4
  br label %81

28:                                               ; preds = %23
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g1, i64 0, i64 %30
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [2001 x i32], ptr %31, i64 0, i64 %33
  %35 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %34)
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = load i32, ptr %4, align 4, !tbaa !5
  %38 = icmp ne i32 %36, %37
  br i1 %38, label %39, label %65

39:                                               ; preds = %28
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g1, i64 0, i64 %41
  %43 = load i32, ptr %4, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [2001 x i32], ptr %42, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %48, label %65

48:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 12, ptr %5) #7
  %49 = getelementptr inbounds %struct.Line, ptr %5, i32 0, i32 0
  %50 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %50, ptr %49, align 4, !tbaa !9
  %51 = getelementptr inbounds %struct.Line, ptr %5, i32 0, i32 1
  %52 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %52, ptr %51, align 4, !tbaa !11
  %53 = getelementptr inbounds %struct.Line, ptr %5, i32 0, i32 2
  %54 = load i32, ptr %2, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g1, i64 0, i64 %55
  %57 = load i32, ptr %4, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [2001 x i32], ptr %56, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  store i32 %60, ptr %53, align 4, !tbaa !12
  %61 = load i32, ptr @tot, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr @tot, align 4, !tbaa !5
  %63 = sext i32 %61 to i64
  %64 = getelementptr inbounds [4000010 x %struct.Line], ptr @line, i64 0, i64 %63
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %64, ptr align 4 %5, i64 12, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 12, ptr %5) #7
  br label %77

65:                                               ; preds = %39, %28
  %66 = load i32, ptr %2, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g1, i64 0, i64 %67
  %69 = load i32, ptr %4, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [2001 x i32], ptr %68, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = icmp ne i32 %72, 0
  br i1 %73, label %74, label %76

74:                                               ; preds = %65
  %75 = call i32 @puts(ptr noundef @.str.1)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %3, align 4
  br label %81

76:                                               ; preds = %65
  br label %77

77:                                               ; preds = %76, %48
  br label %78

78:                                               ; preds = %77
  %79 = load i32, ptr %4, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %4, align 4, !tbaa !5
  br label %23, !llvm.loop !14

81:                                               ; preds = %74, %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  %82 = load i32, ptr %3, align 4
  switch i32 %82, label %87 [
    i32 5, label %83
  ]

83:                                               ; preds = %81
  br label %84

84:                                               ; preds = %83
  %85 = load i32, ptr %2, align 4, !tbaa !5
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %2, align 4, !tbaa !5
  br label %17, !llvm.loop !16

87:                                               ; preds = %81, %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %88 = load i32, ptr %3, align 4
  switch i32 %88, label %245 [
    i32 2, label %89
    i32 1, label %243
  ]

89:                                               ; preds = %87
  %90 = load i32, ptr @n, align 4, !tbaa !5
  %91 = icmp eq i32 %90, 1
  br i1 %91, label %92, label %94

92:                                               ; preds = %89
  %93 = call i32 @puts(ptr noundef @.str.2)
  store i32 0, ptr %1, align 4
  br label %243

94:                                               ; preds = %89
  %95 = load i32, ptr @tot, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds %struct.Line, ptr @line, i64 %96
  call void @_ZSt4sortIP4LineEvT_S2_(ptr noundef @line, ptr noundef %97)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %108, %94
  %99 = load i32, ptr %6, align 4, !tbaa !5
  %100 = load i32, ptr @n, align 4, !tbaa !5
  %101 = icmp sle i32 %99, %100
  br i1 %101, label %103, label %102

102:                                              ; preds = %98
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %111

103:                                              ; preds = %98
  %104 = load i32, ptr %6, align 4, !tbaa !5
  %105 = load i32, ptr %6, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [2001 x i32], ptr @fa, i64 0, i64 %106
  store i32 %104, ptr %107, align 4, !tbaa !5
  br label %108

108:                                              ; preds = %103
  %109 = load i32, ptr %6, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %6, align 4, !tbaa !5
  br label %98, !llvm.loop !17

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

112:                                              ; preds = %178, %111
  %113 = load i32, ptr %8, align 4, !tbaa !5
  %114 = load i32, ptr @tot, align 4, !tbaa !5
  %115 = icmp slt i32 %113, %114
  br i1 %115, label %117, label %116

116:                                              ; preds = %112
  store i32 11, ptr %3, align 4
  br label %181

117:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %118 = load i32, ptr %8, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [4000010 x %struct.Line], ptr @line, i64 0, i64 %119
  %121 = getelementptr inbounds %struct.Line, ptr %120, i32 0, i32 0
  %122 = load i32, ptr %121, align 4, !tbaa !9
  %123 = call noundef i32 @_Z4findi(i32 noundef %122)
  store i32 %123, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %124 = load i32, ptr %8, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [4000010 x %struct.Line], ptr @line, i64 0, i64 %125
  %127 = getelementptr inbounds %struct.Line, ptr %126, i32 0, i32 1
  %128 = load i32, ptr %127, align 4, !tbaa !11
  %129 = call noundef i32 @_Z4findi(i32 noundef %128)
  store i32 %129, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %130 = load i32, ptr %8, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [4000010 x %struct.Line], ptr @line, i64 0, i64 %131
  %133 = getelementptr inbounds %struct.Line, ptr %132, i32 0, i32 2
  %134 = load i32, ptr %133, align 4, !tbaa !12
  store i32 %134, ptr %11, align 4, !tbaa !5
  %135 = load i32, ptr %9, align 4, !tbaa !5
  %136 = load i32, ptr %10, align 4, !tbaa !5
  %137 = icmp ne i32 %135, %136
  br i1 %137, label %138, label %174

138:                                              ; preds = %117
  %139 = load i32, ptr %10, align 4, !tbaa !5
  %140 = load i32, ptr %9, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [2001 x i32], ptr @fa, i64 0, i64 %141
  store i32 %139, ptr %142, align 4, !tbaa !5
  %143 = load i32, ptr %7, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %7, align 4, !tbaa !5
  %145 = load i32, ptr %8, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [4000010 x %struct.Line], ptr @line, i64 0, i64 %146
  %148 = getelementptr inbounds %struct.Line, ptr %147, i32 0, i32 0
  %149 = load i32, ptr %148, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [2001 x %"class.std::vector"], ptr @e, i64 0, i64 %150
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %152 = load i32, ptr %8, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [4000010 x %struct.Line], ptr @line, i64 0, i64 %153
  %155 = getelementptr inbounds %struct.Line, ptr %154, i32 0, i32 1
  %156 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %155)
  store i64 %156, ptr %12, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %151, ptr noundef nonnull align 4 dereferenceable(8) %12)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  %157 = load i32, ptr %8, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [4000010 x %struct.Line], ptr @line, i64 0, i64 %158
  %160 = getelementptr inbounds %struct.Line, ptr %159, i32 0, i32 1
  %161 = load i32, ptr %160, align 4, !tbaa !11
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [2001 x %"class.std::vector"], ptr @e, i64 0, i64 %162
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %164 = load i32, ptr %8, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [4000010 x %struct.Line], ptr @line, i64 0, i64 %165
  %167 = getelementptr inbounds %struct.Line, ptr %166, i32 0, i32 0
  %168 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %167)
  store i64 %168, ptr %13, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %163, ptr noundef nonnull align 4 dereferenceable(8) %13)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  %169 = load i32, ptr %7, align 4, !tbaa !5
  %170 = load i32, ptr @n, align 4, !tbaa !5
  %171 = icmp eq i32 %169, %170
  br i1 %171, label %172, label %173

172:                                              ; preds = %138
  store i32 11, ptr %3, align 4
  br label %175

173:                                              ; preds = %138
  br label %174

174:                                              ; preds = %173, %117
  store i32 0, ptr %3, align 4
  br label %175

175:                                              ; preds = %174, %172
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  %176 = load i32, ptr %3, align 4
  switch i32 %176, label %181 [
    i32 0, label %177
  ]

177:                                              ; preds = %175
  br label %178

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

181:                                              ; preds = %175, %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %182

182:                                              ; preds = %181
  %183 = load i32, ptr %7, align 4, !tbaa !5
  %184 = load i32, ptr @n, align 4, !tbaa !5
  %185 = icmp ne i32 %183, %184
  br i1 %185, label %186, label %188

186:                                              ; preds = %182
  %187 = call i32 @puts(ptr noundef @.str.1)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %3, align 4
  br label %242

188:                                              ; preds = %182
  call void @llvm.memset.p0.i64(ptr align 16 @g2, i8 63, i64 16016004, i1 false)
  store i32 1, ptr @s, align 4, !tbaa !5
  br label %189

189:                                              ; preds = %195, %188
  %190 = load i32, ptr @s, align 4, !tbaa !5
  %191 = load i32, ptr @n, align 4, !tbaa !5
  %192 = icmp sle i32 %190, %191
  br i1 %192, label %193, label %198

193:                                              ; preds = %189
  %194 = load i32, ptr @s, align 4, !tbaa !5
  call void @_Z3bfsi(i32 noundef %194)
  call void @llvm.memset.p0.i64(ptr align 16 @vis, i8 0, i64 8004, i1 false)
  br label %195

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

198:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 1, ptr %14, align 4, !tbaa !5
  br label %199

199:                                              ; preds = %235, %198
  %200 = load i32, ptr %14, align 4, !tbaa !5
  %201 = load i32, ptr @n, align 4, !tbaa !5
  %202 = icmp sle i32 %200, %201
  br i1 %202, label %204, label %203

203:                                              ; preds = %199
  store i32 17, ptr %3, align 4
  br label %238

204:                                              ; preds = %199
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 1, ptr %15, align 4, !tbaa !5
  br label %205

205:                                              ; preds = %229, %204
  %206 = load i32, ptr %15, align 4, !tbaa !5
  %207 = load i32, ptr @n, align 4, !tbaa !5
  %208 = icmp sle i32 %206, %207
  br i1 %208, label %210, label %209

209:                                              ; preds = %205
  store i32 20, ptr %3, align 4
  br label %232

210:                                              ; preds = %205
  %211 = load i32, ptr %14, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g1, i64 0, i64 %212
  %214 = load i32, ptr %15, align 4, !tbaa !5
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [2001 x i32], ptr %213, i64 0, i64 %215
  %217 = load i32, ptr %216, align 4, !tbaa !5
  %218 = load i32, ptr %14, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g2, i64 0, i64 %219
  %221 = load i32, ptr %15, align 4, !tbaa !5
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [2001 x i32], ptr %220, i64 0, i64 %222
  %224 = load i32, ptr %223, align 4, !tbaa !5
  %225 = icmp ne i32 %217, %224
  br i1 %225, label %226, label %228

226:                                              ; preds = %210
  %227 = call i32 @puts(ptr noundef @.str.1)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %3, align 4
  br label %232

228:                                              ; preds = %210
  br label %229

229:                                              ; preds = %228
  %230 = load i32, ptr %15, align 4, !tbaa !5
  %231 = add nsw i32 %230, 1
  store i32 %231, ptr %15, align 4, !tbaa !5
  br label %205, !llvm.loop !20

232:                                              ; preds = %226, %209
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  %233 = load i32, ptr %3, align 4
  switch i32 %233, label %238 [
    i32 20, label %234
  ]

234:                                              ; preds = %232
  br label %235

235:                                              ; preds = %234
  %236 = load i32, ptr %14, align 4, !tbaa !5
  %237 = add nsw i32 %236, 1
  store i32 %237, ptr %14, align 4, !tbaa !5
  br label %199, !llvm.loop !21

238:                                              ; preds = %232, %203
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  %239 = load i32, ptr %3, align 4
  switch i32 %239, label %242 [
    i32 17, label %240
  ]

240:                                              ; preds = %238
  %241 = call i32 @puts(ptr noundef @.str.2)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %3, align 4
  br label %242

242:                                              ; preds = %240, %238, %186
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %243

243:                                              ; preds = %242, %92, %87
  %244 = load i32, ptr %1, align 4
  ret i32 %244

245:                                              ; preds = %87
  unreachable
}

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

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

declare i32 @puts(ptr noundef) #3

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

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

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: readwrite) }
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 nounwind willreturn memory(argmem: write) }
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 = !{!10, !6, i64 0}
!10 = !{!"_ZTS4Line", !6, i64 0, !6, i64 4, !6, i64 8}
!11 = !{!10, !6, i64 4}
!12 = !{!10, !6, i64 8}
!13 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !15}


; 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.Line = type { i32, i32, i32 }
%"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 }
%"struct.std::pair" = type { i32, i32 }

@n = external dso_local global i32, align 4
@g1 = external dso_local global [2001 x [2001 x i32]], align 16
@g2 = external dso_local local_unnamed_addr global [2001 x [2001 x i32]], align 16
@fa = external dso_local local_unnamed_addr global [2001 x i32], align 16
@tot = external dso_local local_unnamed_addr global i32, align 4
@s = external dso_local local_unnamed_addr global i32, align 4
@vis = external dso_local local_unnamed_addr global [2001 x i32], align 16
@line = external dso_local global [4000010 x %struct.Line], align 16
@e = external dso_local global [2001 x %"class.std::vector"], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3bfsi(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 norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca %"struct.std::pair", align 8
  %3 = alloca %"struct.std::pair", align 8
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %.not104 = icmp slt i32 %5, 1
  br i1 %.not104, label %._crit_edge106.thread, label %.preheader101

.preheader101:                                    ; preds = %0, %._crit_edge
  %6 = phi i32 [ %21, %._crit_edge ], [ %5, %0 ]
  %indvars.iv128 = phi i64 [ %indvars.iv.next129, %._crit_edge ], [ 1, %0 ]
  %.not74102 = icmp slt i32 %6, 1
  br i1 %.not74102, label %.preheader101.._crit_edge_crit_edge, label %.lr.ph

.preheader101.._crit_edge_crit_edge:              ; preds = %.preheader101
  %.pre148 = sext i32 %6 to i64
  br label %._crit_edge

.lr.ph:                                           ; preds = %.preheader101
  %7 = trunc nuw nsw i64 %indvars.iv128 to i32
  br label %8

8:                                                ; preds = %.lr.ph, %.thread
  %indvars.iv = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next, %.thread ]
  %9 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g1, i64 0, i64 %indvars.iv128, i64 %indvars.iv
  %10 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %9)
  %.not75 = icmp eq i64 %indvars.iv128, %indvars.iv
  %.pr = load i32, ptr %9, align 4, !tbaa !5
  %.not77 = icmp eq i32 %.pr, 0
  br i1 %.not75, label %18, label %11

11:                                               ; preds = %8
  br i1 %.not77, label %.thread, label %12

12:                                               ; preds = %11
  %13 = load i32, ptr @tot, align 4, !tbaa !5
  %14 = add nsw i32 %13, 1
  store i32 %14, ptr @tot, align 4, !tbaa !5
  %15 = sext i32 %13 to i64
  %16 = getelementptr inbounds [4000010 x %struct.Line], ptr @line, i64 0, i64 %15
  store i32 %7, ptr %16, align 4, !tbaa !5
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %16, i64 4
  %17 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %17, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !5
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %16, i64 8
  store i32 %.pr, ptr %.sroa.5.0..sroa_idx, align 4, !tbaa !5
  br label %.thread

18:                                               ; preds = %8
  br i1 %.not77, label %.thread, label %22

.thread:                                          ; preds = %11, %12, %18
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %.not74.not = icmp slt i64 %indvars.iv, %20
  br i1 %.not74.not, label %8, label %._crit_edge, !llvm.loop !9

._crit_edge:                                      ; preds = %.thread, %.preheader101.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre148, %.preheader101.._crit_edge_crit_edge ], [ %20, %.thread ]
  %21 = phi i32 [ %6, %.preheader101.._crit_edge_crit_edge ], [ %19, %.thread ]
  %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1
  %.not.not = icmp slt i64 %indvars.iv128, %.pre-phi
  br i1 %.not.not, label %.preheader101, label %._crit_edge106, !llvm.loop !11

22:                                               ; preds = %18
  %23 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %82

._crit_edge106:                                   ; preds = %._crit_edge
  %24 = icmp eq i32 %21, 1
  br i1 %24, label %25, label %._crit_edge106.thread

25:                                               ; preds = %._crit_edge106
  %26 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %82

._crit_edge106.thread:                            ; preds = %0, %._crit_edge106
  %27 = load i32, ptr @tot, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds %struct.Line, ptr @line, i64 %28
  tail call void @_ZSt4sortIP4LineEvT_S2_(ptr noundef nonnull @line, ptr noundef nonnull %29)
  %30 = load i32, ptr @n, align 4, !tbaa !5
  %.not78107 = icmp slt i32 %30, 1
  br i1 %.not78107, label %.preheader100, label %.lr.ph110.preheader

.lr.ph110.preheader:                              ; preds = %._crit_edge106.thread
  %31 = add nuw i32 %30, 1
  %wide.trip.count = zext i32 %31 to i64
  %32 = zext nneg i32 %30 to i64
  %min.iters.check = icmp ult i32 %30, 8
  br i1 %min.iters.check, label %.lr.ph110.preheader162, label %vector.ph

.lr.ph110.preheader162:                           ; preds = %middle.block, %.lr.ph110.preheader
  %indvars.iv131.ph = phi i64 [ 1, %.lr.ph110.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph110

vector.ph:                                        ; preds = %.lr.ph110.preheader
  %n.vec = and i64 %32, 2147483640
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ <i32 1, i32 2, i32 3, i32 4>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %offset.idx = or disjoint i64 %index, 1
  %33 = getelementptr inbounds [2001 x i32], ptr @fa, i64 0, i64 %offset.idx
  %34 = getelementptr inbounds i8, ptr %33, i64 16
  store <4 x i32> %vec.ind, ptr %33, align 4, !tbaa !5
  store <4 x i32> %step.add, ptr %34, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %35 = icmp eq i64 %index.next, %n.vec
  br i1 %35, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %32
  br i1 %cmp.n, label %.preheader100, label %.lr.ph110.preheader162

.preheader100:                                    ; preds = %.lr.ph110, %middle.block, %._crit_edge106.thread
  %36 = load i32, ptr @tot, align 4, !tbaa !5
  %37 = icmp sgt i32 %36, 0
  br i1 %37, label %.lr.ph113, label %._crit_edge114

.lr.ph110:                                        ; preds = %.lr.ph110.preheader162, %.lr.ph110
  %indvars.iv131 = phi i64 [ %indvars.iv.next132, %.lr.ph110 ], [ %indvars.iv131.ph, %.lr.ph110.preheader162 ]
  %38 = getelementptr inbounds [2001 x i32], ptr @fa, i64 0, i64 %indvars.iv131
  %39 = trunc nuw nsw i64 %indvars.iv131 to i32
  store i32 %39, ptr %38, align 4, !tbaa !5
  %indvars.iv.next132 = add nuw nsw i64 %indvars.iv131, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next132, %wide.trip.count
  br i1 %exitcond.not, label %.preheader100, label %.lr.ph110, !llvm.loop !16

.lr.ph113:                                        ; preds = %.preheader100, %61
  %indvars.iv134 = phi i64 [ %indvars.iv.next135, %61 ], [ 0, %.preheader100 ]
  %.057111 = phi i32 [ %.25997, %61 ], [ 1, %.preheader100 ]
  %40 = getelementptr inbounds [4000010 x %struct.Line], ptr @line, i64 0, i64 %indvars.iv134
  %41 = load i32, ptr %40, align 4, !tbaa !17
  %42 = call noundef i32 @_Z4findi(i32 noundef %41)
  %43 = getelementptr inbounds i8, ptr %40, i64 4
  %44 = load i32, ptr %43, align 4, !tbaa !19
  %45 = call noundef i32 @_Z4findi(i32 noundef %44)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %46 = getelementptr inbounds i8, ptr %40, i64 8
  %47 = load i32, ptr %46, align 4, !tbaa !20
  store i32 %47, ptr %1, align 4, !tbaa !5
  %.not79 = icmp eq i32 %42, %45
  br i1 %.not79, label %.thread94, label %48

.thread94:                                        ; preds = %.lr.ph113
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  br label %61

48:                                               ; preds = %.lr.ph113
  %49 = sext i32 %42 to i64
  %50 = getelementptr inbounds [2001 x i32], ptr @fa, i64 0, i64 %49
  store i32 %45, ptr %50, align 4, !tbaa !5
  %51 = add nsw i32 %.057111, 1
  %52 = load i32, ptr %40, align 4, !tbaa !17
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [2001 x %"class.std::vector"], ptr @e, i64 0, i64 %53
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %55 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %43)
  store i64 %55, ptr %2, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %54, ptr noundef nonnull align 4 dereferenceable(8) %2)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  %56 = load i32, ptr %43, align 4, !tbaa !19
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [2001 x %"class.std::vector"], ptr @e, i64 0, i64 %57
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %59 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %40)
  store i64 %59, ptr %3, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %58, ptr noundef nonnull align 4 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  %60 = load i32, ptr @n, align 4, !tbaa !5
  %.not98 = icmp eq i32 %51, %60
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  br i1 %.not98, label %._crit_edge114.thread, label %61

61:                                               ; preds = %.thread94, %48
  %.25997 = phi i32 [ %.057111, %.thread94 ], [ %51, %48 ]
  %indvars.iv.next135 = add nuw nsw i64 %indvars.iv134, 1
  %62 = load i32, ptr @tot, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = icmp slt i64 %indvars.iv.next135, %63
  br i1 %64, label %.lr.ph113, label %.._crit_edge114.loopexit_crit_edge, !llvm.loop !21

.._crit_edge114.loopexit_crit_edge:               ; preds = %61
  %.pre.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge114

._crit_edge114:                                   ; preds = %.._crit_edge114.loopexit_crit_edge, %.preheader100
  %65 = phi i32 [ %30, %.preheader100 ], [ %.pre.pre, %.._crit_edge114.loopexit_crit_edge ]
  %.360 = phi i32 [ 1, %.preheader100 ], [ %.25997, %.._crit_edge114.loopexit_crit_edge ]
  %.not80 = icmp eq i32 %.360, %65
  br i1 %.not80, label %._crit_edge114.thread, label %66

66:                                               ; preds = %._crit_edge114
  %67 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %82

._crit_edge114.thread:                            ; preds = %48, %._crit_edge114
  %68 = phi i32 [ %65, %._crit_edge114 ], [ %51, %48 ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16016004) @g2, i8 63, i64 16016004, i1 false)
  store i32 1, ptr @s, align 4, !tbaa !5
  %.not81117 = icmp slt i32 %68, 1
  br i1 %.not81117, label %.critedge86, label %.lr.ph120

.preheader99:                                     ; preds = %.lr.ph120
  %.not82124 = icmp slt i32 %72, 1
  br i1 %.not82124, label %.critedge86, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader99
  %69 = add nuw i32 %72, 1
  %wide.trip.count145 = zext i32 %69 to i64
  br label %.preheader

.lr.ph120:                                        ; preds = %._crit_edge114.thread, %.lr.ph120
  %storemerge118 = phi i32 [ %71, %.lr.ph120 ], [ 1, %._crit_edge114.thread ]
  call void @_Z3bfsi(i32 noundef %storemerge118)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(8004) @vis, i8 0, i64 8004, i1 false)
  %70 = load i32, ptr @s, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr @s, align 4, !tbaa !5
  %72 = load i32, ptr @n, align 4, !tbaa !5
  %.not81.not = icmp slt i32 %70, %72
  br i1 %.not81.not, label %.lr.ph120, label %.preheader99, !llvm.loop !22

.preheader:                                       ; preds = %.preheader.preheader, %..critedge_crit_edge
  %indvars.iv142 = phi i64 [ 1, %.preheader.preheader ], [ %indvars.iv.next143, %..critedge_crit_edge ]
  br label %74

73:                                               ; preds = %74
  %indvars.iv.next138 = add nuw nsw i64 %indvars.iv137, 1
  %exitcond141.not = icmp eq i64 %indvars.iv.next138, %wide.trip.count145
  br i1 %exitcond141.not, label %..critedge_crit_edge, label %74, !llvm.loop !23

74:                                               ; preds = %.preheader, %73
  %indvars.iv137 = phi i64 [ 1, %.preheader ], [ %indvars.iv.next138, %73 ]
  %75 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g1, i64 0, i64 %indvars.iv142, i64 %indvars.iv137
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g2, i64 0, i64 %indvars.iv142, i64 %indvars.iv137
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %.not84 = icmp eq i32 %76, %78
  br i1 %.not84, label %73, label %79

..critedge_crit_edge:                             ; preds = %73
  %indvars.iv.next143 = add nuw nsw i64 %indvars.iv142, 1
  %exitcond146.not = icmp eq i64 %indvars.iv.next143, %wide.trip.count145
  br i1 %exitcond146.not, label %.critedge86, label %.preheader, !llvm.loop !24

79:                                               ; preds = %74
  %80 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %82

.critedge86:                                      ; preds = %..critedge_crit_edge, %._crit_edge114.thread, %.preheader99
  %81 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %82

82:                                               ; preds = %79, %22, %66, %.critedge86, %25
  ret i32 0
}

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

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

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

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

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 = { 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 #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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}
!12 = !{!"llvm.loop.unswitch.partial.disable"}
!13 = distinct !{!13, !10, !14, !15}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !10, !15, !14}
!17 = !{!18, !6, i64 0}
!18 = !{!"_ZTS4Line", !6, i64 0, !6, i64 4, !6, i64 8}
!19 = !{!18, !6, i64 4}
!20 = !{!18, !6, i64 8}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}


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