; LLVM IR from ravireddy07/cpp-book :: src/Code-Chef/JAN2021-Long/TILESQRS.ll (Z4funcv)

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

@c = external dso_local global %"class.std::vector", align 8
@c2 = external dso_local global %"class.std::vector", align 8
@ans = external dso_local global [205 x [205 x i32]], align 16
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_Z3diri(i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_Z7dir_coli(i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_Z7dir_rowi(i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z9set_blockii(i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z3askii(i32 noundef, i32 noundef) #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4funcv() #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 i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"struct.std::pair", align 4
  %19 = alloca %"struct.std::pair", align 4
  %20 = alloca ptr, align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca i32, align 4
  %24 = alloca %"struct.std::pair", align 4
  %25 = alloca %"struct.std::pair", align 4
  %26 = alloca ptr, align 8
  %27 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %29 = alloca i32, align 4
  %30 = alloca %"struct.std::pair", align 4
  %31 = alloca %"struct.std::pair", align 4
  %32 = alloca ptr, align 8
  %33 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %34 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %35 = alloca i32, align 4
  %36 = alloca %"struct.std::pair", align 4
  %37 = alloca %"struct.std::pair", align 4
  %38 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %39 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.7, ptr noundef %1, ptr noundef %2, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %207, %0
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = load i32, ptr %1, align 4, !tbaa !5
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %44, label %210

44:                                               ; preds = %40
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %203, %44
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = load i32, ptr %1, align 4, !tbaa !5
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %49, label %206

49:                                               ; preds = %45
  %50 = load i32, ptr %4, align 4, !tbaa !5
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = call noundef i32 @_Z3askii(i32 noundef %50, i32 noundef %51)
  store i32 %52, ptr %8, align 4, !tbaa !5
  %53 = load i32, ptr %4, align 4, !tbaa !5
  %54 = icmp eq i32 %53, 1
  br i1 %54, label %58, label %55

55:                                               ; preds = %49
  %56 = load i32, ptr %5, align 4, !tbaa !5
  %57 = icmp eq i32 %56, 1
  br i1 %57, label %58, label %129

58:                                               ; preds = %55, %49
  %59 = load i32, ptr %8, align 4, !tbaa !5
  %60 = load i32, ptr %3, align 4, !tbaa !5
  %61 = sub nsw i32 %60, 1
  %62 = icmp eq i32 %59, %61
  br i1 %62, label %63, label %67

63:                                               ; preds = %58
  %64 = load i32, ptr %4, align 4, !tbaa !5
  %65 = load i32, ptr %5, align 4, !tbaa !5
  %66 = call noundef i32 @_Z3askii(i32 noundef %64, i32 noundef %65)
  store i32 %66, ptr %3, align 4, !tbaa !5
  br label %128

67:                                               ; preds = %58
  %68 = load i32, ptr %8, align 4, !tbaa !5
  %69 = load i32, ptr %3, align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  %71 = icmp eq i32 %68, %70
  br i1 %71, label %72, label %74

72:                                               ; preds = %67
  %73 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %73, ptr %3, align 4, !tbaa !5
  br label %127

74:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store ptr @c, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %75 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @c) #6
  %76 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %75, ptr %76, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %77 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @c) #6
  %78 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %77, ptr %78, align 8
  br label %79

79:                                               ; preds = %123, %74
  %80 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  br i1 %80, label %82, label %81

81:                                               ; preds = %79
  store i32 8, ptr %16, align 4
  br label %125

82:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  %84 = load i32, ptr %83, align 4, !tbaa !5
  store i32 %84, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %85 = load i32, ptr %17, align 4, !tbaa !5
  %86 = call i64 @_Z3diri(i32 noundef %85)
  store i64 %86, ptr %18, align 4
  %87 = getelementptr inbounds %"struct.std::pair", ptr %18, i32 0, i32 0
  %88 = load i32, ptr %87, align 4, !tbaa !11
  store i32 %88, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %89 = load i32, ptr %17, align 4, !tbaa !5
  %90 = call i64 @_Z3diri(i32 noundef %89)
  store i64 %90, ptr %19, align 4
  %91 = getelementptr inbounds %"struct.std::pair", ptr %19, i32 0, i32 1
  %92 = load i32, ptr %91, align 4, !tbaa !13
  store i32 %92, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  %93 = load i32, ptr %4, align 4, !tbaa !5
  %94 = load i32, ptr %11, align 4, !tbaa !5
  %95 = add nsw i32 %93, %94
  %96 = load i32, ptr %5, align 4, !tbaa !5
  %97 = load i32, ptr %12, align 4, !tbaa !5
  %98 = add nsw i32 %96, %97
  %99 = call noundef i32 @_Z3askii(i32 noundef %95, i32 noundef %98)
  store i32 %99, ptr %8, align 4, !tbaa !5
  %100 = load i32, ptr %4, align 4, !tbaa !5
  %101 = load i32, ptr %5, align 4, !tbaa !5
  %102 = call noundef i32 @_Z3askii(i32 noundef %100, i32 noundef %101)
  store i32 %102, ptr %9, align 4, !tbaa !5
  %103 = load i32, ptr %9, align 4, !tbaa !5
  %104 = load i32, ptr %8, align 4, !tbaa !5
  %105 = sub nsw i32 %104, 1
  %106 = icmp eq i32 %103, %105
  br i1 %106, label %107, label %111

107:                                              ; preds = %82
  %108 = load i32, ptr %4, align 4, !tbaa !5
  %109 = load i32, ptr %5, align 4, !tbaa !5
  %110 = call noundef i32 @_Z3askii(i32 noundef %108, i32 noundef %109)
  store i32 %110, ptr %3, align 4, !tbaa !5
  store i32 8, ptr %16, align 4
  br label %120

111:                                              ; preds = %82
  %112 = load i32, ptr %9, align 4, !tbaa !5
  %113 = load i32, ptr %8, align 4, !tbaa !5
  %114 = add nsw i32 %113, 1
  %115 = icmp eq i32 %112, %114
  br i1 %115, label %116, label %118

116:                                              ; preds = %111
  %117 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %117, ptr %3, align 4, !tbaa !5
  store i32 8, ptr %16, align 4
  br label %120

118:                                              ; preds = %111
  br label %119

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

120:                                              ; preds = %119, %116, %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  %121 = load i32, ptr %16, align 4
  switch i32 %121, label %125 [
    i32 0, label %122
  ]

122:                                              ; preds = %120
  br label %123

123:                                              ; preds = %122
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  br label %79

125:                                              ; preds = %120, %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %126

126:                                              ; preds = %125
  br label %127

127:                                              ; preds = %126, %72
  br label %128

128:                                              ; preds = %127, %63
  br label %200

129:                                              ; preds = %55
  %130 = load i32, ptr %8, align 4, !tbaa !5
  %131 = load i32, ptr %3, align 4, !tbaa !5
  %132 = sub nsw i32 %131, 2
  %133 = icmp eq i32 %130, %132
  br i1 %133, label %134, label %138

134:                                              ; preds = %129
  %135 = load i32, ptr %4, align 4, !tbaa !5
  %136 = load i32, ptr %5, align 4, !tbaa !5
  %137 = call noundef i32 @_Z3askii(i32 noundef %135, i32 noundef %136)
  store i32 %137, ptr %3, align 4, !tbaa !5
  br label %199

138:                                              ; preds = %129
  %139 = load i32, ptr %8, align 4, !tbaa !5
  %140 = load i32, ptr %3, align 4, !tbaa !5
  %141 = add nsw i32 %140, 2
  %142 = icmp eq i32 %139, %141
  br i1 %142, label %143, label %145

143:                                              ; preds = %138
  %144 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %144, ptr %3, align 4, !tbaa !5
  br label %198

145:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  store ptr @c, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %146 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @c) #6
  %147 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %146, ptr %147, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %148 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @c) #6
  %149 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %148, ptr %149, align 8
  br label %150

150:                                              ; preds = %194, %145
  %151 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  br i1 %151, label %153, label %152

152:                                              ; preds = %150
  store i32 10, ptr %16, align 4
  br label %196

153:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %154 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  %155 = load i32, ptr %154, align 4, !tbaa !5
  store i32 %155, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %156 = load i32, ptr %23, align 4, !tbaa !5
  %157 = call i64 @_Z3diri(i32 noundef %156)
  store i64 %157, ptr %24, align 4
  %158 = getelementptr inbounds %"struct.std::pair", ptr %24, i32 0, i32 0
  %159 = load i32, ptr %158, align 4, !tbaa !11
  store i32 %159, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %160 = load i32, ptr %23, align 4, !tbaa !5
  %161 = call i64 @_Z3diri(i32 noundef %160)
  store i64 %161, ptr %25, align 4
  %162 = getelementptr inbounds %"struct.std::pair", ptr %25, i32 0, i32 1
  %163 = load i32, ptr %162, align 4, !tbaa !13
  store i32 %163, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  %164 = load i32, ptr %4, align 4, !tbaa !5
  %165 = load i32, ptr %11, align 4, !tbaa !5
  %166 = add nsw i32 %164, %165
  %167 = load i32, ptr %5, align 4, !tbaa !5
  %168 = load i32, ptr %12, align 4, !tbaa !5
  %169 = add nsw i32 %167, %168
  %170 = call noundef i32 @_Z3askii(i32 noundef %166, i32 noundef %169)
  store i32 %170, ptr %8, align 4, !tbaa !5
  %171 = load i32, ptr %4, align 4, !tbaa !5
  %172 = load i32, ptr %5, align 4, !tbaa !5
  %173 = call noundef i32 @_Z3askii(i32 noundef %171, i32 noundef %172)
  store i32 %173, ptr %9, align 4, !tbaa !5
  %174 = load i32, ptr %9, align 4, !tbaa !5
  %175 = load i32, ptr %8, align 4, !tbaa !5
  %176 = sub nsw i32 %175, 2
  %177 = icmp eq i32 %174, %176
  br i1 %177, label %178, label %182

178:                                              ; preds = %153
  %179 = load i32, ptr %4, align 4, !tbaa !5
  %180 = load i32, ptr %5, align 4, !tbaa !5
  %181 = call noundef i32 @_Z3askii(i32 noundef %179, i32 noundef %180)
  store i32 %181, ptr %3, align 4, !tbaa !5
  store i32 10, ptr %16, align 4
  br label %191

182:                                              ; preds = %153
  %183 = load i32, ptr %9, align 4, !tbaa !5
  %184 = load i32, ptr %8, align 4, !tbaa !5
  %185 = add nsw i32 %184, 2
  %186 = icmp eq i32 %183, %185
  br i1 %186, label %187, label %189

187:                                              ; preds = %182
  %188 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %188, ptr %3, align 4, !tbaa !5
  store i32 10, ptr %16, align 4
  br label %191

189:                                              ; preds = %182
  br label %190

190:                                              ; preds = %189
  store i32 0, ptr %16, align 4
  br label %191

191:                                              ; preds = %190, %187, %178
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  %192 = load i32, ptr %16, align 4
  switch i32 %192, label %196 [
    i32 0, label %193
  ]

193:                                              ; preds = %191
  br label %194

194:                                              ; preds = %193
  %195 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  br label %150

196:                                              ; preds = %191, %152
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %197

197:                                              ; preds = %196
  br label %198

198:                                              ; preds = %197, %143
  br label %199

199:                                              ; preds = %198, %134
  br label %200

200:                                              ; preds = %199, %128
  %201 = load i32, ptr %4, align 4, !tbaa !5
  %202 = load i32, ptr %5, align 4, !tbaa !5
  call void @_Z9set_blockii(i32 noundef %201, i32 noundef %202)
  br label %203

203:                                              ; preds = %200
  %204 = load i32, ptr %5, align 4, !tbaa !5
  %205 = add nsw i32 %204, 2
  store i32 %205, ptr %5, align 4, !tbaa !5
  br label %45, !llvm.loop !14

206:                                              ; preds = %45
  br label %207

207:                                              ; preds = %206
  %208 = load i32, ptr %4, align 4, !tbaa !5
  %209 = add nsw i32 %208, 2
  store i32 %209, ptr %4, align 4, !tbaa !5
  br label %40, !llvm.loop !16

210:                                              ; preds = %40
  %211 = load i32, ptr %1, align 4, !tbaa !5
  %212 = srem i32 %211, 2
  %213 = icmp eq i32 %212, 1
  br i1 %213, label %214, label %385

214:                                              ; preds = %210
  %215 = load i32, ptr %1, align 4, !tbaa !5
  %216 = sub nsw i32 %215, 1
  store i32 %216, ptr %4, align 4, !tbaa !5
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %217

217:                                              ; preds = %282, %214
  %218 = load i32, ptr %5, align 4, !tbaa !5
  %219 = load i32, ptr %1, align 4, !tbaa !5
  %220 = sub nsw i32 %219, 1
  %221 = icmp sle i32 %218, %220
  br i1 %221, label %222, label %285

222:                                              ; preds = %217
  %223 = load i32, ptr %5, align 4, !tbaa !5
  %224 = srem i32 %223, 2
  %225 = icmp eq i32 %224, 1
  br i1 %225, label %226, label %232

226:                                              ; preds = %222
  %227 = load i32, ptr %4, align 4, !tbaa !5
  %228 = load i32, ptr %5, align 4, !tbaa !5
  call void @_Z9set_blockii(i32 noundef %227, i32 noundef %228)
  %229 = load i32, ptr %4, align 4, !tbaa !5
  %230 = load i32, ptr %5, align 4, !tbaa !5
  %231 = call noundef i32 @_Z3askii(i32 noundef %229, i32 noundef %230)
  store i32 %231, ptr %3, align 4, !tbaa !5
  br label %281

232:                                              ; preds = %222
  %233 = load i32, ptr %4, align 4, !tbaa !5
  %234 = load i32, ptr %5, align 4, !tbaa !5
  %235 = call noundef i32 @_Z3askii(i32 noundef %233, i32 noundef %234)
  store i32 %235, ptr %7, align 4, !tbaa !5
  %236 = load i32, ptr %7, align 4, !tbaa !5
  %237 = load i32, ptr %3, align 4, !tbaa !5
  %238 = icmp sgt i32 %236, %237
  br i1 %238, label %239, label %241

239:                                              ; preds = %232
  %240 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %240, ptr %3, align 4, !tbaa !5
  br label %282

241:                                              ; preds = %232
  %242 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %242, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  store ptr @c2, ptr %26, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %243 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @c2) #6
  %244 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  store ptr %243, ptr %244, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %245 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @c2) #6
  %246 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  store ptr %245, ptr %246, align 8
  br label %247

247:                                              ; preds = %277, %241
  %248 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #6
  br i1 %248, label %250, label %249

249:                                              ; preds = %247
  store i32 15, ptr %16, align 4
  br label %279

250:                                              ; preds = %247
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  %251 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #6
  %252 = load i32, ptr %251, align 4, !tbaa !5
  store i32 %252, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %253 = load i32, ptr %29, align 4, !tbaa !5
  %254 = call i64 @_Z7dir_rowi(i32 noundef %253)
  store i64 %254, ptr %30, align 4
  %255 = getelementptr inbounds %"struct.std::pair", ptr %30, i32 0, i32 0
  %256 = load i32, ptr %255, align 4, !tbaa !11
  store i32 %256, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %257 = load i32, ptr %29, align 4, !tbaa !5
  %258 = call i64 @_Z7dir_rowi(i32 noundef %257)
  store i64 %258, ptr %31, align 4
  %259 = getelementptr inbounds %"struct.std::pair", ptr %31, i32 0, i32 1
  %260 = load i32, ptr %259, align 4, !tbaa !13
  store i32 %260, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  %261 = load i32, ptr %4, align 4, !tbaa !5
  %262 = load i32, ptr %11, align 4, !tbaa !5
  %263 = add nsw i32 %261, %262
  %264 = load i32, ptr %5, align 4, !tbaa !5
  %265 = load i32, ptr %12, align 4, !tbaa !5
  %266 = add nsw i32 %264, %265
  %267 = call noundef i32 @_Z3askii(i32 noundef %263, i32 noundef %266)
  store i32 %267, ptr %7, align 4, !tbaa !5
  %268 = load i32, ptr %7, align 4, !tbaa !5
  %269 = load i32, ptr %3, align 4, !tbaa !5
  %270 = icmp sgt i32 %268, %269
  br i1 %270, label %271, label %273

271:                                              ; preds = %250
  %272 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %272, ptr %3, align 4, !tbaa !5
  store i32 15, ptr %16, align 4
  br label %274

273:                                              ; preds = %250
  store i32 0, ptr %16, align 4
  br label %274

274:                                              ; preds = %273, %271
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  %275 = load i32, ptr %16, align 4
  switch i32 %275, label %279 [
    i32 0, label %276
  ]

276:                                              ; preds = %274
  br label %277

277:                                              ; preds = %276
  %278 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #6
  br label %247

279:                                              ; preds = %274, %249
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %280

280:                                              ; preds = %279
  br label %281

281:                                              ; preds = %280, %226
  br label %282

282:                                              ; preds = %281, %239
  %283 = load i32, ptr %5, align 4, !tbaa !5
  %284 = add nsw i32 %283, 1
  store i32 %284, ptr %5, align 4, !tbaa !5
  br label %217, !llvm.loop !17

285:                                              ; preds = %217
  %286 = load i32, ptr %1, align 4, !tbaa !5
  %287 = sub nsw i32 %286, 1
  store i32 %287, ptr %5, align 4, !tbaa !5
  %288 = load i32, ptr %1, align 4, !tbaa !5
  %289 = sub nsw i32 %288, 2
  store i32 %289, ptr %4, align 4, !tbaa !5
  br label %290

290:                                              ; preds = %353, %285
  %291 = load i32, ptr %4, align 4, !tbaa !5
  %292 = icmp sge i32 %291, 1
  br i1 %292, label %293, label %356

293:                                              ; preds = %290
  %294 = load i32, ptr %4, align 4, !tbaa !5
  %295 = srem i32 %294, 2
  %296 = icmp eq i32 %295, 1
  br i1 %296, label %297, label %348

297:                                              ; preds = %293
  %298 = load i32, ptr %4, align 4, !tbaa !5
  %299 = load i32, ptr %5, align 4, !tbaa !5
  call void @_Z9set_blockii(i32 noundef %298, i32 noundef %299)
  %300 = load i32, ptr %4, align 4, !tbaa !5
  %301 = load i32, ptr %5, align 4, !tbaa !5
  %302 = call noundef i32 @_Z3askii(i32 noundef %300, i32 noundef %301)
  store i32 %302, ptr %7, align 4, !tbaa !5
  %303 = load i32, ptr %7, align 4, !tbaa !5
  %304 = load i32, ptr %3, align 4, !tbaa !5
  %305 = icmp sgt i32 %303, %304
  br i1 %305, label %306, label %308

306:                                              ; preds = %297
  %307 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %307, ptr %3, align 4, !tbaa !5
  br label %353

308:                                              ; preds = %297
  %309 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %309, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  store ptr @c2, ptr %32, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  %310 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @c2) #6
  %311 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %33, i32 0, i32 0
  store ptr %310, ptr %311, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #6
  %312 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @c2) #6
  %313 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %34, i32 0, i32 0
  store ptr %312, ptr %313, align 8
  br label %314

314:                                              ; preds = %344, %308
  %315 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(8) %34) #6
  br i1 %315, label %317, label %316

316:                                              ; preds = %314
  store i32 20, ptr %16, align 4
  br label %346

317:                                              ; preds = %314
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #6
  %318 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #6
  %319 = load i32, ptr %318, align 4, !tbaa !5
  store i32 %319, ptr %35, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #6
  %320 = load i32, ptr %35, align 4, !tbaa !5
  %321 = call i64 @_Z7dir_coli(i32 noundef %320)
  store i64 %321, ptr %36, align 4
  %322 = getelementptr inbounds %"struct.std::pair", ptr %36, i32 0, i32 0
  %323 = load i32, ptr %322, align 4, !tbaa !11
  store i32 %323, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #6
  %324 = load i32, ptr %35, align 4, !tbaa !5
  %325 = call i64 @_Z7dir_coli(i32 noundef %324)
  store i64 %325, ptr %37, align 4
  %326 = getelementptr inbounds %"struct.std::pair", ptr %37, i32 0, i32 1
  %327 = load i32, ptr %326, align 4, !tbaa !13
  store i32 %327, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #6
  %328 = load i32, ptr %4, align 4, !tbaa !5
  %329 = load i32, ptr %11, align 4, !tbaa !5
  %330 = add nsw i32 %328, %329
  %331 = load i32, ptr %5, align 4, !tbaa !5
  %332 = load i32, ptr %12, align 4, !tbaa !5
  %333 = add nsw i32 %331, %332
  %334 = call noundef i32 @_Z3askii(i32 noundef %330, i32 noundef %333)
  store i32 %334, ptr %7, align 4, !tbaa !5
  %335 = load i32, ptr %7, align 4, !tbaa !5
  %336 = load i32, ptr %3, align 4, !tbaa !5
  %337 = icmp sgt i32 %335, %336
  br i1 %337, label %338, label %340

338:                                              ; preds = %317
  %339 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %339, ptr %3, align 4, !tbaa !5
  store i32 20, ptr %16, align 4
  br label %341

340:                                              ; preds = %317
  store i32 0, ptr %16, align 4
  br label %341

341:                                              ; preds = %340, %338
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #6
  %342 = load i32, ptr %16, align 4
  switch i32 %342, label %346 [
    i32 0, label %343
  ]

343:                                              ; preds = %341
  br label %344

344:                                              ; preds = %343
  %345 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #6
  br label %314

346:                                              ; preds = %341, %316
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  br label %347

347:                                              ; preds = %346
  br label %352

348:                                              ; preds = %293
  %349 = load i32, ptr %4, align 4, !tbaa !5
  %350 = load i32, ptr %5, align 4, !tbaa !5
  %351 = call noundef i32 @_Z3askii(i32 noundef %349, i32 noundef %350)
  store i32 %351, ptr %3, align 4, !tbaa !5
  br label %352

352:                                              ; preds = %348, %347
  br label %353

353:                                              ; preds = %352, %306
  %354 = load i32, ptr %4, align 4, !tbaa !5
  %355 = add nsw i32 %354, -1
  store i32 %355, ptr %4, align 4, !tbaa !5
  br label %290, !llvm.loop !18

356:                                              ; preds = %290
  %357 = load i32, ptr %1, align 4, !tbaa !5
  %358 = sub nsw i32 %357, 1
  store i32 %358, ptr %4, align 4, !tbaa !5
  %359 = load i32, ptr %1, align 4, !tbaa !5
  %360 = sub nsw i32 %359, 1
  store i32 %360, ptr %5, align 4, !tbaa !5
  %361 = load i32, ptr %4, align 4, !tbaa !5
  %362 = load i32, ptr %5, align 4, !tbaa !5
  %363 = call noundef i32 @_Z3askii(i32 noundef %361, i32 noundef %362)
  store i32 %363, ptr %3, align 4, !tbaa !5
  %364 = load i32, ptr %4, align 4, !tbaa !5
  %365 = add nsw i32 %364, 1
  %366 = load i32, ptr %5, align 4, !tbaa !5
  %367 = call noundef i32 @_Z3askii(i32 noundef %365, i32 noundef %366)
  store i32 %367, ptr %3, align 4, !tbaa !5
  %368 = load i32, ptr %4, align 4, !tbaa !5
  %369 = load i32, ptr %5, align 4, !tbaa !5
  %370 = add nsw i32 %369, 1
  %371 = call noundef i32 @_Z3askii(i32 noundef %368, i32 noundef %370)
  store i32 %371, ptr %7, align 4, !tbaa !5
  %372 = load i32, ptr %7, align 4, !tbaa !5
  %373 = load i32, ptr %3, align 4, !tbaa !5
  %374 = icmp sgt i32 %372, %373
  br i1 %374, label %375, label %376

375:                                              ; preds = %356
  br label %382

376:                                              ; preds = %356
  %377 = load i32, ptr %4, align 4, !tbaa !5
  %378 = add nsw i32 %377, 1
  %379 = load i32, ptr %5, align 4, !tbaa !5
  %380 = add nsw i32 %379, 1
  %381 = call noundef i32 @_Z3askii(i32 noundef %378, i32 noundef %380)
  store i32 %381, ptr %3, align 4, !tbaa !5
  br label %382

382:                                              ; preds = %376, %375
  %383 = load i32, ptr %4, align 4, !tbaa !5
  %384 = load i32, ptr %5, align 4, !tbaa !5
  call void @_Z9set_blockii(i32 noundef %383, i32 noundef %384)
  br label %385

385:                                              ; preds = %382, %210
  %386 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %387

387:                                              ; preds = %410, %385
  %388 = load i32, ptr %4, align 4, !tbaa !5
  %389 = load i32, ptr %1, align 4, !tbaa !5
  %390 = icmp sle i32 %388, %389
  br i1 %390, label %391, label %413

391:                                              ; preds = %387
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %392

392:                                              ; preds = %405, %391
  %393 = load i32, ptr %5, align 4, !tbaa !5
  %394 = load i32, ptr %1, align 4, !tbaa !5
  %395 = icmp sle i32 %393, %394
  br i1 %395, label %396, label %408

396:                                              ; preds = %392
  %397 = load i32, ptr %4, align 4, !tbaa !5
  %398 = sext i32 %397 to i64
  %399 = getelementptr inbounds [205 x [205 x i32]], ptr @ans, i64 0, i64 %398
  %400 = load i32, ptr %5, align 4, !tbaa !5
  %401 = sext i32 %400 to i64
  %402 = getelementptr inbounds [205 x i32], ptr %399, i64 0, i64 %401
  %403 = load i32, ptr %402, align 4, !tbaa !5
  %404 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, i32 noundef %403)
  br label %405

405:                                              ; preds = %396
  %406 = load i32, ptr %5, align 4, !tbaa !5
  %407 = add nsw i32 %406, 1
  store i32 %407, ptr %5, align 4, !tbaa !5
  br label %392, !llvm.loop !19

408:                                              ; preds = %392
  %409 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  br label %410

410:                                              ; preds = %408
  %411 = load i32, ptr %4, align 4, !tbaa !5
  %412 = add nsw i32 %411, 1
  store i32 %412, ptr %4, align 4, !tbaa !5
  br label %387, !llvm.loop !20

413:                                              ; preds = %387
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #6
  %414 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.6, ptr noundef %38)
  %415 = load i32, ptr %38, align 4, !tbaa !5
  %416 = icmp eq i32 %415, -1
  br i1 %416, label %417, label %418

417:                                              ; preds = %413
  call void @exit(i32 noundef 0) #7
  unreachable

418:                                              ; preds = %413
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  ret void
}

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

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = { 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 #5 = { noreturn 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 #6 = { nounwind }
attributes #7 = { noreturn 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, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!13 = !{!12, !6, i64 4}
!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}


; 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.__gnu_cxx::__normal_iterator" = type { ptr }

@c = external dso_local global %"class.std::vector", align 8
@c2 = external dso_local global %"class.std::vector", align 8
@ans = external dso_local local_unnamed_addr global [205 x [205 x i32]], align 16
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z9set_blockii(i32 noundef, i32 noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4funcv() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.7, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %14 = load i32, ptr %1, align 4, !tbaa !5
  %15 = icmp sgt i32 %14, 1
  br i1 %15, label %.preheader158, label %._crit_edge174

.preheader158:                                    ; preds = %0, %._crit_edge
  %16 = phi i32 [ %91, %._crit_edge ], [ %14, %0 ]
  %.0173 = phi i32 [ %92, %._crit_edge ], [ 1, %0 ]
  %17 = icmp sgt i32 %16, 1
  br i1 %17, label %.lr.ph172, label %._crit_edge

.lr.ph172:                                        ; preds = %.preheader158
  %18 = icmp eq i32 %.0173, 1
  br label %19

19:                                               ; preds = %.lr.ph172, %87
  %.0128168 = phi i32 [ 1, %.lr.ph172 ], [ %88, %87 ]
  %20 = call noundef i32 @_Z3askii(i32 noundef %.0173, i32 noundef %.0128168)
  %21 = icmp eq i32 %.0128168, 1
  %or.cond = or i1 %18, %21
  %22 = load i32, ptr %3, align 4, !tbaa !5
  br i1 %or.cond, label %23, label %55

23:                                               ; preds = %19
  %24 = add nsw i32 %22, -1
  %25 = icmp eq i32 %20, %24
  br i1 %25, label %26, label %28

26:                                               ; preds = %23
  %27 = call noundef i32 @_Z3askii(i32 noundef %.0173, i32 noundef %.0128168)
  store i32 %27, ptr %3, align 4, !tbaa !5
  br label %87

28:                                               ; preds = %23
  %29 = add nsw i32 %22, 1
  %30 = icmp eq i32 %20, %29
  br i1 %30, label %31, label %32

31:                                               ; preds = %28
  store i32 %20, ptr %3, align 4, !tbaa !5
  br label %87

32:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %33 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @c) #6
  store ptr %33, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %34 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @c) #6
  store ptr %34, ptr %5, align 8
  %35 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  br i1 %35, label %.lr.ph167, label %.critedge

.lr.ph167:                                        ; preds = %32, %52
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = call i64 @_Z3diri(i32 noundef %37)
  %.sroa.021.0.extract.trunc = trunc i64 %38 to i32
  %39 = call i64 @_Z3diri(i32 noundef %37)
  %.sroa.320.0.extract.shift = lshr i64 %39, 32
  %.sroa.320.0.extract.trunc = trunc nuw i64 %.sroa.320.0.extract.shift to i32
  %40 = add nsw i32 %.0173, %.sroa.021.0.extract.trunc
  %41 = add nsw i32 %.0128168, %.sroa.320.0.extract.trunc
  %42 = call noundef i32 @_Z3askii(i32 noundef %40, i32 noundef %41)
  %43 = call noundef i32 @_Z3askii(i32 noundef %.0173, i32 noundef %.0128168)
  %44 = add nsw i32 %42, -1
  %45 = icmp eq i32 %43, %44
  br i1 %45, label %46, label %48

46:                                               ; preds = %.lr.ph167
  %47 = call noundef i32 @_Z3askii(i32 noundef %.0173, i32 noundef %.0128168)
  store i32 %47, ptr %3, align 4, !tbaa !5
  br label %.critedge

48:                                               ; preds = %.lr.ph167
  %49 = add nsw i32 %42, 1
  %50 = icmp eq i32 %43, %49
  br i1 %50, label %51, label %52

51:                                               ; preds = %48
  store i32 %43, ptr %3, align 4, !tbaa !5
  br label %.critedge

52:                                               ; preds = %48
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %54 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  br i1 %54, label %.lr.ph167, label %.critedge

.critedge:                                        ; preds = %52, %32, %46, %51
  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 %87

55:                                               ; preds = %19
  %56 = add nsw i32 %22, -2
  %57 = icmp eq i32 %20, %56
  br i1 %57, label %58, label %60

58:                                               ; preds = %55
  %59 = call noundef i32 @_Z3askii(i32 noundef %.0173, i32 noundef %.0128168)
  store i32 %59, ptr %3, align 4, !tbaa !5
  br label %87

60:                                               ; preds = %55
  %61 = add nsw i32 %22, 2
  %62 = icmp eq i32 %20, %61
  br i1 %62, label %63, label %64

63:                                               ; preds = %60
  store i32 %20, ptr %3, align 4, !tbaa !5
  br label %87

64:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %65 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @c) #6
  store ptr %65, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %66 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @c) #6
  store ptr %66, ptr %7, align 8
  %67 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br i1 %67, label %.lr.ph, label %.critedge152

.lr.ph:                                           ; preds = %64, %84
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = call i64 @_Z3diri(i32 noundef %69)
  %.sroa.015.0.extract.trunc = trunc i64 %70 to i32
  %71 = call i64 @_Z3diri(i32 noundef %69)
  %.sroa.314.0.extract.shift = lshr i64 %71, 32
  %.sroa.314.0.extract.trunc = trunc nuw i64 %.sroa.314.0.extract.shift to i32
  %72 = add nsw i32 %.0173, %.sroa.015.0.extract.trunc
  %73 = add nsw i32 %.0128168, %.sroa.314.0.extract.trunc
  %74 = call noundef i32 @_Z3askii(i32 noundef %72, i32 noundef %73)
  %75 = call noundef i32 @_Z3askii(i32 noundef %.0173, i32 noundef %.0128168)
  %76 = add nsw i32 %74, -2
  %77 = icmp eq i32 %75, %76
  br i1 %77, label %78, label %80

78:                                               ; preds = %.lr.ph
  %79 = call noundef i32 @_Z3askii(i32 noundef %.0173, i32 noundef %.0128168)
  store i32 %79, ptr %3, align 4, !tbaa !5
  br label %.critedge152

80:                                               ; preds = %.lr.ph
  %81 = add nsw i32 %74, 2
  %82 = icmp eq i32 %75, %81
  br i1 %82, label %83, label %84

83:                                               ; preds = %80
  store i32 %75, ptr %3, align 4, !tbaa !5
  br label %.critedge152

84:                                               ; preds = %80
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  %86 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br i1 %86, label %.lr.ph, label %.critedge152

.critedge152:                                     ; preds = %84, %64, %78, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %87

87:                                               ; preds = %58, %.critedge152, %63, %26, %.critedge, %31
  call void @_Z9set_blockii(i32 noundef %.0173, i32 noundef %.0128168)
  %88 = add nuw nsw i32 %.0128168, 2
  %89 = load i32, ptr %1, align 4, !tbaa !5
  %90 = icmp slt i32 %88, %89
  br i1 %90, label %19, label %._crit_edge, !llvm.loop !9

._crit_edge:                                      ; preds = %87, %.preheader158
  %91 = phi i32 [ %16, %.preheader158 ], [ %89, %87 ]
  %92 = add nuw nsw i32 %.0173, 2
  %93 = icmp slt i32 %92, %91
  br i1 %93, label %.preheader158, label %._crit_edge174, !llvm.loop !11

._crit_edge174:                                   ; preds = %._crit_edge, %0
  %.lcssa166 = phi i32 [ %14, %0 ], [ %91, %._crit_edge ]
  %94 = and i32 %.lcssa166, -2147483647
  %95 = icmp eq i32 %94, 1
  br i1 %95, label %96, label %160

96:                                               ; preds = %._crit_edge174
  %97 = add nsw i32 %.lcssa166, -1
  %.not.not178 = icmp ugt i32 %.lcssa166, 1
  br i1 %.not.not178, label %.lr.ph181, label %._crit_edge192

.lr.ph181:                                        ; preds = %96, %120
  %.1129179 = phi i32 [ %121, %120 ], [ 1, %96 ]
  %98 = and i32 %.1129179, 1
  %.not149 = icmp eq i32 %98, 0
  br i1 %.not149, label %101, label %99

99:                                               ; preds = %.lr.ph181
  call void @_Z9set_blockii(i32 noundef %97, i32 noundef %.1129179)
  %100 = call noundef i32 @_Z3askii(i32 noundef %97, i32 noundef %.1129179)
  store i32 %100, ptr %3, align 4, !tbaa !5
  br label %120

101:                                              ; preds = %.lr.ph181
  %102 = call noundef i32 @_Z3askii(i32 noundef %97, i32 noundef %.1129179)
  %103 = load i32, ptr %3, align 4, !tbaa !5
  %104 = icmp sgt i32 %102, %103
  store i32 %102, ptr %3, align 4, !tbaa !5
  br i1 %104, label %120, label %105

105:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %106 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @c2) #6
  store ptr %106, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %107 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @c2) #6
  store ptr %107, ptr %9, align 8
  %108 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  br i1 %108, label %.lr.ph176, label %.loopexit157

.lr.ph176:                                        ; preds = %105, %.critedge154
  %109 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = call i64 @_Z7dir_rowi(i32 noundef %110)
  %.sroa.09.0.extract.trunc = trunc i64 %111 to i32
  %112 = call i64 @_Z7dir_rowi(i32 noundef %110)
  %.sroa.38.0.extract.shift = lshr i64 %112, 32
  %.sroa.38.0.extract.trunc = trunc nuw i64 %.sroa.38.0.extract.shift to i32
  %113 = add nsw i32 %97, %.sroa.09.0.extract.trunc
  %114 = add nsw i32 %.1129179, %.sroa.38.0.extract.trunc
  %115 = call noundef i32 @_Z3askii(i32 noundef %113, i32 noundef %114)
  %116 = load i32, ptr %3, align 4, !tbaa !5
  %.not150 = icmp sgt i32 %115, %116
  br i1 %.not150, label %117, label %.critedge154

117:                                              ; preds = %.lr.ph176
  store i32 %115, ptr %3, align 4, !tbaa !5
  br label %.loopexit157

.critedge154:                                     ; preds = %.lr.ph176
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %119 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  br i1 %119, label %.lr.ph176, label %.loopexit157

.loopexit157:                                     ; preds = %.critedge154, %105, %117
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %120

120:                                              ; preds = %101, %99, %.loopexit157
  %121 = add nuw nsw i32 %.1129179, 1
  %122 = load i32, ptr %1, align 4, !tbaa !5
  %.not.not = icmp slt i32 %121, %122
  br i1 %.not.not, label %.lr.ph181, label %._crit_edge182, !llvm.loop !13

._crit_edge182:                                   ; preds = %120
  %123 = add nsw i32 %122, -1
  %124 = icmp sgt i32 %122, 2
  br i1 %124, label %.lr.ph191.preheader, label %._crit_edge192

.lr.ph191.preheader:                              ; preds = %._crit_edge182
  %125 = add nsw i32 %122, -2
  br label %.lr.ph191

.lr.ph191:                                        ; preds = %.lr.ph191.preheader, %148
  %.1187 = phi i32 [ %149, %148 ], [ %125, %.lr.ph191.preheader ]
  %126 = and i32 %.1187, 1
  %.not147 = icmp eq i32 %126, 0
  br i1 %.not147, label %146, label %127

127:                                              ; preds = %.lr.ph191
  call void @_Z9set_blockii(i32 noundef %.1187, i32 noundef %123)
  %128 = call noundef i32 @_Z3askii(i32 noundef %.1187, i32 noundef %123)
  %129 = load i32, ptr %3, align 4, !tbaa !5
  %130 = icmp sgt i32 %128, %129
  store i32 %128, ptr %3, align 4, !tbaa !5
  br i1 %130, label %148, label %131

131:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %132 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @c2) #6
  store ptr %132, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %133 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @c2) #6
  store ptr %133, ptr %11, align 8
  %134 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  br i1 %134, label %.lr.ph186, label %.loopexit

.lr.ph186:                                        ; preds = %131, %.critedge156
  %135 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  %136 = load i32, ptr %135, align 4, !tbaa !5
  %137 = call i64 @_Z7dir_coli(i32 noundef %136)
  %.sroa.05.0.extract.trunc = trunc i64 %137 to i32
  %138 = call i64 @_Z7dir_coli(i32 noundef %136)
  %.sroa.3.0.extract.shift = lshr i64 %138, 32
  %.sroa.3.0.extract.trunc = trunc nuw i64 %.sroa.3.0.extract.shift to i32
  %139 = add nsw i32 %.1187, %.sroa.05.0.extract.trunc
  %140 = add nsw i32 %123, %.sroa.3.0.extract.trunc
  %141 = call noundef i32 @_Z3askii(i32 noundef %139, i32 noundef %140)
  %142 = load i32, ptr %3, align 4, !tbaa !5
  %.not148 = icmp sgt i32 %141, %142
  br i1 %.not148, label %143, label %.critedge156

143:                                              ; preds = %.lr.ph186
  store i32 %141, ptr %3, align 4, !tbaa !5
  br label %.loopexit

.critedge156:                                     ; preds = %.lr.ph186
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  %145 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  br i1 %145, label %.lr.ph186, label %.loopexit

.loopexit:                                        ; preds = %.critedge156, %131, %143
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  br label %148

146:                                              ; preds = %.lr.ph191
  %147 = call noundef i32 @_Z3askii(i32 noundef %.1187, i32 noundef %123)
  store i32 %147, ptr %3, align 4, !tbaa !5
  br label %148

148:                                              ; preds = %127, %.loopexit, %146
  %149 = add nsw i32 %.1187, -1
  %150 = icmp sgt i32 %.1187, 1
  br i1 %150, label %.lr.ph191, label %._crit_edge192.loopexit, !llvm.loop !14

._crit_edge192.loopexit:                          ; preds = %148
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  %.pre217 = add nsw i32 %.pre, -1
  br label %._crit_edge192

._crit_edge192:                                   ; preds = %96, %._crit_edge192.loopexit, %._crit_edge182
  %.pre-phi = phi i32 [ %.pre217, %._crit_edge192.loopexit ], [ %123, %._crit_edge182 ], [ 0, %96 ]
  %151 = phi i32 [ %.pre, %._crit_edge192.loopexit ], [ %122, %._crit_edge182 ], [ 1, %96 ]
  %152 = call noundef i32 @_Z3askii(i32 noundef %.pre-phi, i32 noundef %.pre-phi)
  store i32 %152, ptr %3, align 4, !tbaa !5
  %153 = call noundef i32 @_Z3askii(i32 noundef %151, i32 noundef %.pre-phi)
  store i32 %153, ptr %3, align 4, !tbaa !5
  %154 = call noundef i32 @_Z3askii(i32 noundef %.pre-phi, i32 noundef %151)
  %155 = load i32, ptr %3, align 4, !tbaa !5
  %156 = icmp sgt i32 %154, %155
  br i1 %156, label %159, label %157

157:                                              ; preds = %._crit_edge192
  %158 = call noundef i32 @_Z3askii(i32 noundef %151, i32 noundef %151)
  store i32 %158, ptr %3, align 4, !tbaa !5
  br label %159

159:                                              ; preds = %._crit_edge192, %157
  call void @_Z9set_blockii(i32 noundef %.pre-phi, i32 noundef %.pre-phi)
  br label %160

160:                                              ; preds = %159, %._crit_edge174
  %161 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %162 = load i32, ptr %1, align 4, !tbaa !5
  %.not197 = icmp slt i32 %162, 1
  br i1 %.not197, label %._crit_edge199, label %.preheader

.preheader:                                       ; preds = %160, %._crit_edge196
  %163 = phi i32 [ %170, %._crit_edge196 ], [ %162, %160 ]
  %indvars.iv214 = phi i64 [ %indvars.iv.next215, %._crit_edge196 ], [ 1, %160 ]
  %.not146193 = icmp slt i32 %163, 1
  br i1 %.not146193, label %._crit_edge196, label %.lr.ph195

.lr.ph195:                                        ; preds = %.preheader, %.lr.ph195
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph195 ], [ 1, %.preheader ]
  %164 = getelementptr inbounds [205 x [205 x i32]], ptr @ans, i64 0, i64 %indvars.iv214, i64 %indvars.iv
  %165 = load i32, ptr %164, align 4, !tbaa !5
  %166 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, i32 noundef %165)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %167 = load i32, ptr %1, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %.not146.not = icmp slt i64 %indvars.iv, %168
  br i1 %.not146.not, label %.lr.ph195, label %._crit_edge196, !llvm.loop !15

._crit_edge196:                                   ; preds = %.lr.ph195, %.preheader
  %169 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %indvars.iv.next215 = add nuw nsw i64 %indvars.iv214, 1
  %170 = load i32, ptr %1, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %.not.not200 = icmp slt i64 %indvars.iv214, %171
  br i1 %.not.not200, label %.preheader, label %._crit_edge199, !llvm.loop !16

._crit_edge199:                                   ; preds = %._crit_edge196, %160
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  %172 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.6, ptr noundef nonnull %12)
  %173 = load i32, ptr %12, align 4, !tbaa !5
  %174 = icmp eq i32 %173, -1
  br i1 %174, label %175, label %176

175:                                              ; preds = %._crit_edge199
  call void @exit(i32 noundef 0) #7
  unreachable

176:                                              ; preds = %._crit_edge199
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret void
}

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

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #5

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


; Effective O3 passes: ADCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass