; LLVM IR from Izaron/ACM-ICPC :: Timus Online Judge/Volume 5/1497. Cutting a Square (main)

; 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

@l = external dso_local global [1005 x [1005 x i16]], align 16
@r = external dso_local global [1005 x [1005 x i16]], align 16
@u = external dso_local global [1005 x [1005 x i16]], align 16
@d = external dso_local global [1005 x [1005 x i16]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca ptr, align 8
  %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 i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i8, align 1
  %20 = alloca i8, align 1
  %21 = alloca i8, align 1
  %22 = alloca i8, align 1
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %25 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %26 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %27 = getelementptr i8, ptr %26, i64 -24
  %28 = load i64, ptr %27, align 8
  %29 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %28
  %30 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %29, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #7
  %32 = load i32, ptr %2, align 4, !tbaa !8
  %33 = sext i32 %32 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #7
  call void @_ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2EmRKS6_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %33, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %34 unwind label %40

34:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !8
  br label %35

35:                                               ; preds = %50, %34
  %36 = load i32, ptr %7, align 4, !tbaa !8
  %37 = load i32, ptr %2, align 4, !tbaa !8
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %44, label %39

39:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %57

40:                                               ; preds = %0
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %5, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %6, align 4
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #7
  br label %403

44:                                               ; preds = %35
  %45 = load i32, ptr %7, align 4, !tbaa !8
  %46 = sext i32 %45 to i64
  %47 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %46) #7
  %48 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %47)
          to label %49 unwind label %53

49:                                               ; preds = %44
  br label %50

50:                                               ; preds = %49
  %51 = load i32, ptr %7, align 4, !tbaa !8
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %7, align 4, !tbaa !8
  br label %35, !llvm.loop !11

53:                                               ; preds = %44
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %5, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %402

57:                                               ; preds = %39
  call void @llvm.memset.p0.i64(ptr align 16 @l, i8 0, i64 2020050, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @r, i8 0, i64 2020050, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @d, i8 0, i64 2020050, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @u, i8 0, i64 2020050, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !8
  br label %58

58:                                               ; preds = %114, %57
  %59 = load i32, ptr %8, align 4, !tbaa !8
  %60 = load i32, ptr %2, align 4, !tbaa !8
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %63, label %62

62:                                               ; preds = %58
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %117

63:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !8
  br label %64

64:                                               ; preds = %110, %63
  %65 = load i32, ptr %10, align 4, !tbaa !8
  %66 = load i32, ptr %2, align 4, !tbaa !8
  %67 = icmp slt i32 %65, %66
  br i1 %67, label %69, label %68

68:                                               ; preds = %64
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %113

69:                                               ; preds = %64
  %70 = load i32, ptr %8, align 4, !tbaa !8
  %71 = sext i32 %70 to i64
  %72 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %71) #7
  %73 = load i32, ptr %10, align 4, !tbaa !8
  %74 = sext i32 %73 to i64
  %75 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %72, i64 noundef %74)
          to label %76 unwind label %105

76:                                               ; preds = %69
  %77 = load i8, ptr %75, align 1, !tbaa !13
  %78 = sext i8 %77 to i32
  %79 = icmp eq i32 %78, 49
  br i1 %79, label %80, label %109

80:                                               ; preds = %76
  %81 = load i32, ptr %8, align 4, !tbaa !8
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [1005 x [1005 x i16]], ptr @d, i64 0, i64 %82
  %84 = load i32, ptr %10, align 4, !tbaa !8
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [1005 x i16], ptr %83, i64 0, i64 %85
  store i16 1, ptr %86, align 2, !tbaa !14
  %87 = load i32, ptr %8, align 4, !tbaa !8
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [1005 x [1005 x i16]], ptr @u, i64 0, i64 %88
  %90 = load i32, ptr %10, align 4, !tbaa !8
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [1005 x i16], ptr %89, i64 0, i64 %91
  store i16 1, ptr %92, align 2, !tbaa !14
  %93 = load i32, ptr %8, align 4, !tbaa !8
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [1005 x [1005 x i16]], ptr @r, i64 0, i64 %94
  %96 = load i32, ptr %10, align 4, !tbaa !8
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [1005 x i16], ptr %95, i64 0, i64 %97
  store i16 1, ptr %98, align 2, !tbaa !14
  %99 = load i32, ptr %8, align 4, !tbaa !8
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [1005 x [1005 x i16]], ptr @l, i64 0, i64 %100
  %102 = load i32, ptr %10, align 4, !tbaa !8
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [1005 x i16], ptr %101, i64 0, i64 %103
  store i16 1, ptr %104, align 2, !tbaa !14
  br label %109

105:                                              ; preds = %69
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %5, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %402

109:                                              ; preds = %80, %76
  br label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %10, align 4, !tbaa !8
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %10, align 4, !tbaa !8
  br label %64, !llvm.loop !16

113:                                              ; preds = %68
  br label %114

114:                                              ; preds = %113
  %115 = load i32, ptr %8, align 4, !tbaa !8
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %8, align 4, !tbaa !8
  br label %58, !llvm.loop !17

117:                                              ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !8
  br label %118

118:                                              ; preds = %158, %117
  %119 = load i32, ptr %11, align 4, !tbaa !8
  %120 = load i32, ptr %2, align 4, !tbaa !8
  %121 = icmp slt i32 %119, %120
  br i1 %121, label %123, label %122

122:                                              ; preds = %118
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %161

123:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !8
  br label %124

124:                                              ; preds = %154, %123
  %125 = load i32, ptr %12, align 4, !tbaa !8
  %126 = load i32, ptr %2, align 4, !tbaa !8
  %127 = icmp slt i32 %125, %126
  br i1 %127, label %129, label %128

128:                                              ; preds = %124
  store i32 14, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %157

129:                                              ; preds = %124
  %130 = load i32, ptr %12, align 4, !tbaa !8
  %131 = sub nsw i32 %130, 1
  %132 = icmp sge i32 %131, 0
  br i1 %132, label %133, label %153

133:                                              ; preds = %129
  %134 = load i32, ptr %11, align 4, !tbaa !8
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [1005 x [1005 x i16]], ptr @l, i64 0, i64 %135
  %137 = load i32, ptr %12, align 4, !tbaa !8
  %138 = sub nsw i32 %137, 1
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [1005 x i16], ptr %136, i64 0, i64 %139
  %141 = load i16, ptr %140, align 2, !tbaa !14
  %142 = sext i16 %141 to i32
  %143 = load i32, ptr %11, align 4, !tbaa !8
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [1005 x [1005 x i16]], ptr @l, i64 0, i64 %144
  %146 = load i32, ptr %12, align 4, !tbaa !8
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [1005 x i16], ptr %145, i64 0, i64 %147
  %149 = load i16, ptr %148, align 2, !tbaa !14
  %150 = sext i16 %149 to i32
  %151 = add nsw i32 %150, %142
  %152 = trunc i32 %151 to i16
  store i16 %152, ptr %148, align 2, !tbaa !14
  br label %153

153:                                              ; preds = %133, %129
  br label %154

154:                                              ; preds = %153
  %155 = load i32, ptr %12, align 4, !tbaa !8
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %12, align 4, !tbaa !8
  br label %124, !llvm.loop !18

157:                                              ; preds = %128
  br label %158

158:                                              ; preds = %157
  %159 = load i32, ptr %11, align 4, !tbaa !8
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %11, align 4, !tbaa !8
  br label %118, !llvm.loop !19

161:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !8
  br label %162

162:                                              ; preds = %204, %161
  %163 = load i32, ptr %13, align 4, !tbaa !8
  %164 = load i32, ptr %2, align 4, !tbaa !8
  %165 = icmp slt i32 %163, %164
  br i1 %165, label %167, label %166

166:                                              ; preds = %162
  store i32 17, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %207

167:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %168 = load i32, ptr %2, align 4, !tbaa !8
  %169 = sub nsw i32 %168, 1
  store i32 %169, ptr %14, align 4, !tbaa !8
  br label %170

170:                                              ; preds = %200, %167
  %171 = load i32, ptr %14, align 4, !tbaa !8
  %172 = icmp sge i32 %171, 0
  br i1 %172, label %174, label %173

173:                                              ; preds = %170
  store i32 20, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %203

174:                                              ; preds = %170
  %175 = load i32, ptr %14, align 4, !tbaa !8
  %176 = add nsw i32 %175, 1
  %177 = load i32, ptr %2, align 4, !tbaa !8
  %178 = icmp slt i32 %176, %177
  br i1 %178, label %179, label %199

179:                                              ; preds = %174
  %180 = load i32, ptr %13, align 4, !tbaa !8
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [1005 x [1005 x i16]], ptr @r, i64 0, i64 %181
  %183 = load i32, ptr %14, align 4, !tbaa !8
  %184 = add nsw i32 %183, 1
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [1005 x i16], ptr %182, i64 0, i64 %185
  %187 = load i16, ptr %186, align 2, !tbaa !14
  %188 = sext i16 %187 to i32
  %189 = load i32, ptr %13, align 4, !tbaa !8
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [1005 x [1005 x i16]], ptr @r, i64 0, i64 %190
  %192 = load i32, ptr %14, align 4, !tbaa !8
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [1005 x i16], ptr %191, i64 0, i64 %193
  %195 = load i16, ptr %194, align 2, !tbaa !14
  %196 = sext i16 %195 to i32
  %197 = add nsw i32 %196, %188
  %198 = trunc i32 %197 to i16
  store i16 %198, ptr %194, align 2, !tbaa !14
  br label %199

199:                                              ; preds = %179, %174
  br label %200

200:                                              ; preds = %199
  %201 = load i32, ptr %14, align 4, !tbaa !8
  %202 = add nsw i32 %201, -1
  store i32 %202, ptr %14, align 4, !tbaa !8
  br label %170, !llvm.loop !20

203:                                              ; preds = %173
  br label %204

204:                                              ; preds = %203
  %205 = load i32, ptr %13, align 4, !tbaa !8
  %206 = add nsw i32 %205, 1
  store i32 %206, ptr %13, align 4, !tbaa !8
  br label %162, !llvm.loop !21

207:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !8
  br label %208

208:                                              ; preds = %248, %207
  %209 = load i32, ptr %15, align 4, !tbaa !8
  %210 = load i32, ptr %2, align 4, !tbaa !8
  %211 = icmp slt i32 %209, %210
  br i1 %211, label %213, label %212

212:                                              ; preds = %208
  store i32 23, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %251

213:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !8
  br label %214

214:                                              ; preds = %244, %213
  %215 = load i32, ptr %16, align 4, !tbaa !8
  %216 = load i32, ptr %2, align 4, !tbaa !8
  %217 = icmp slt i32 %215, %216
  br i1 %217, label %219, label %218

218:                                              ; preds = %214
  store i32 26, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %247

219:                                              ; preds = %214
  %220 = load i32, ptr %16, align 4, !tbaa !8
  %221 = sub nsw i32 %220, 1
  %222 = icmp sge i32 %221, 0
  br i1 %222, label %223, label %243

223:                                              ; preds = %219
  %224 = load i32, ptr %16, align 4, !tbaa !8
  %225 = sub nsw i32 %224, 1
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [1005 x [1005 x i16]], ptr @d, i64 0, i64 %226
  %228 = load i32, ptr %15, align 4, !tbaa !8
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [1005 x i16], ptr %227, i64 0, i64 %229
  %231 = load i16, ptr %230, align 2, !tbaa !14
  %232 = sext i16 %231 to i32
  %233 = load i32, ptr %16, align 4, !tbaa !8
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds [1005 x [1005 x i16]], ptr @d, i64 0, i64 %234
  %236 = load i32, ptr %15, align 4, !tbaa !8
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [1005 x i16], ptr %235, i64 0, i64 %237
  %239 = load i16, ptr %238, align 2, !tbaa !14
  %240 = sext i16 %239 to i32
  %241 = add nsw i32 %240, %232
  %242 = trunc i32 %241 to i16
  store i16 %242, ptr %238, align 2, !tbaa !14
  br label %243

243:                                              ; preds = %223, %219
  br label %244

244:                                              ; preds = %243
  %245 = load i32, ptr %16, align 4, !tbaa !8
  %246 = add nsw i32 %245, 1
  store i32 %246, ptr %16, align 4, !tbaa !8
  br label %214, !llvm.loop !22

247:                                              ; preds = %218
  br label %248

248:                                              ; preds = %247
  %249 = load i32, ptr %15, align 4, !tbaa !8
  %250 = add nsw i32 %249, 1
  store i32 %250, ptr %15, align 4, !tbaa !8
  br label %208, !llvm.loop !23

251:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !8
  br label %252

252:                                              ; preds = %294, %251
  %253 = load i32, ptr %17, align 4, !tbaa !8
  %254 = load i32, ptr %2, align 4, !tbaa !8
  %255 = icmp slt i32 %253, %254
  br i1 %255, label %257, label %256

256:                                              ; preds = %252
  store i32 29, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %297

257:                                              ; preds = %252
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %258 = load i32, ptr %2, align 4, !tbaa !8
  %259 = sub nsw i32 %258, 1
  store i32 %259, ptr %18, align 4, !tbaa !8
  br label %260

260:                                              ; preds = %290, %257
  %261 = load i32, ptr %18, align 4, !tbaa !8
  %262 = icmp sge i32 %261, 0
  br i1 %262, label %264, label %263

263:                                              ; preds = %260
  store i32 32, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %293

264:                                              ; preds = %260
  %265 = load i32, ptr %18, align 4, !tbaa !8
  %266 = add nsw i32 %265, 1
  %267 = load i32, ptr %2, align 4, !tbaa !8
  %268 = icmp slt i32 %266, %267
  br i1 %268, label %269, label %289

269:                                              ; preds = %264
  %270 = load i32, ptr %18, align 4, !tbaa !8
  %271 = add nsw i32 %270, 1
  %272 = sext i32 %271 to i64
  %273 = getelementptr inbounds [1005 x [1005 x i16]], ptr @u, i64 0, i64 %272
  %274 = load i32, ptr %17, align 4, !tbaa !8
  %275 = sext i32 %274 to i64
  %276 = getelementptr inbounds [1005 x i16], ptr %273, i64 0, i64 %275
  %277 = load i16, ptr %276, align 2, !tbaa !14
  %278 = sext i16 %277 to i32
  %279 = load i32, ptr %18, align 4, !tbaa !8
  %280 = sext i32 %279 to i64
  %281 = getelementptr inbounds [1005 x [1005 x i16]], ptr @u, i64 0, i64 %280
  %282 = load i32, ptr %17, align 4, !tbaa !8
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds [1005 x i16], ptr %281, i64 0, i64 %283
  %285 = load i16, ptr %284, align 2, !tbaa !14
  %286 = sext i16 %285 to i32
  %287 = add nsw i32 %286, %278
  %288 = trunc i32 %287 to i16
  store i16 %288, ptr %284, align 2, !tbaa !14
  br label %289

289:                                              ; preds = %269, %264
  br label %290

290:                                              ; preds = %289
  %291 = load i32, ptr %18, align 4, !tbaa !8
  %292 = add nsw i32 %291, -1
  store i32 %292, ptr %18, align 4, !tbaa !8
  br label %260, !llvm.loop !24

293:                                              ; preds = %263
  br label %294

294:                                              ; preds = %293
  %295 = load i32, ptr %17, align 4, !tbaa !8
  %296 = add nsw i32 %295, 1
  store i32 %296, ptr %17, align 4, !tbaa !8
  br label %252, !llvm.loop !25

297:                                              ; preds = %256
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #7
  store i8 1, ptr %19, align 1, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #7
  store i8 1, ptr %20, align 1, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #7
  store i8 1, ptr %21, align 1, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #7
  store i8 1, ptr %22, align 1, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !8
  br label %298

298:                                              ; preds = %370, %297
  %299 = load i32, ptr %23, align 4, !tbaa !8
  %300 = load i32, ptr %2, align 4, !tbaa !8
  %301 = icmp slt i32 %299, %300
  br i1 %301, label %303, label %302

302:                                              ; preds = %298
  store i32 35, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %373

303:                                              ; preds = %298
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  store i32 0, ptr %24, align 4, !tbaa !8
  br label %304

304:                                              ; preds = %366, %303
  %305 = load i32, ptr %24, align 4, !tbaa !8
  %306 = load i32, ptr %2, align 4, !tbaa !8
  %307 = icmp slt i32 %305, %306
  br i1 %307, label %309, label %308

308:                                              ; preds = %304
  store i32 38, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %369

309:                                              ; preds = %304
  %310 = load i32, ptr %23, align 4, !tbaa !8
  %311 = sext i32 %310 to i64
  %312 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %311) #7
  %313 = load i32, ptr %24, align 4, !tbaa !8
  %314 = sext i32 %313 to i64
  %315 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %312, i64 noundef %314)
          to label %316 unwind label %321

316:                                              ; preds = %309
  %317 = load i8, ptr %315, align 1, !tbaa !13
  %318 = sext i8 %317 to i32
  %319 = icmp eq i32 %318, 49
  br i1 %319, label %320, label %325

320:                                              ; preds = %316
  br label %366

321:                                              ; preds = %309
  %322 = landingpad { ptr, i32 }
          cleanup
  %323 = extractvalue { ptr, i32 } %322, 0
  store ptr %323, ptr %5, align 8
  %324 = extractvalue { ptr, i32 } %322, 1
  store i32 %324, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %401

325:                                              ; preds = %316
  %326 = load i32, ptr %23, align 4, !tbaa !8
  %327 = sext i32 %326 to i64
  %328 = getelementptr inbounds [1005 x [1005 x i16]], ptr @l, i64 0, i64 %327
  %329 = load i32, ptr %24, align 4, !tbaa !8
  %330 = sext i32 %329 to i64
  %331 = getelementptr inbounds [1005 x i16], ptr %328, i64 0, i64 %330
  %332 = load i16, ptr %331, align 2, !tbaa !14
  %333 = icmp ne i16 %332, 0
  br i1 %333, label %334, label %335

334:                                              ; preds = %325
  store i8 0, ptr %19, align 1, !tbaa !26
  br label %335

335:                                              ; preds = %334, %325
  %336 = load i32, ptr %23, align 4, !tbaa !8
  %337 = sext i32 %336 to i64
  %338 = getelementptr inbounds [1005 x [1005 x i16]], ptr @r, i64 0, i64 %337
  %339 = load i32, ptr %24, align 4, !tbaa !8
  %340 = sext i32 %339 to i64
  %341 = getelementptr inbounds [1005 x i16], ptr %338, i64 0, i64 %340
  %342 = load i16, ptr %341, align 2, !tbaa !14
  %343 = icmp ne i16 %342, 0
  br i1 %343, label %344, label %345

344:                                              ; preds = %335
  store i8 0, ptr %20, align 1, !tbaa !26
  br label %345

345:                                              ; preds = %344, %335
  %346 = load i32, ptr %23, align 4, !tbaa !8
  %347 = sext i32 %346 to i64
  %348 = getelementptr inbounds [1005 x [1005 x i16]], ptr @d, i64 0, i64 %347
  %349 = load i32, ptr %24, align 4, !tbaa !8
  %350 = sext i32 %349 to i64
  %351 = getelementptr inbounds [1005 x i16], ptr %348, i64 0, i64 %350
  %352 = load i16, ptr %351, align 2, !tbaa !14
  %353 = icmp ne i16 %352, 0
  br i1 %353, label %354, label %355

354:                                              ; preds = %345
  store i8 0, ptr %21, align 1, !tbaa !26
  br label %355

355:                                              ; preds = %354, %345
  %356 = load i32, ptr %23, align 4, !tbaa !8
  %357 = sext i32 %356 to i64
  %358 = getelementptr inbounds [1005 x [1005 x i16]], ptr @u, i64 0, i64 %357
  %359 = load i32, ptr %24, align 4, !tbaa !8
  %360 = sext i32 %359 to i64
  %361 = getelementptr inbounds [1005 x i16], ptr %358, i64 0, i64 %360
  %362 = load i16, ptr %361, align 2, !tbaa !14
  %363 = icmp ne i16 %362, 0
  br i1 %363, label %364, label %365

364:                                              ; preds = %355
  store i8 0, ptr %22, align 1, !tbaa !26
  br label %365

365:                                              ; preds = %364, %355
  br label %366

366:                                              ; preds = %365, %320
  %367 = load i32, ptr %24, align 4, !tbaa !8
  %368 = add nsw i32 %367, 1
  store i32 %368, ptr %24, align 4, !tbaa !8
  br label %304, !llvm.loop !28

369:                                              ; preds = %308
  br label %370

370:                                              ; preds = %369
  %371 = load i32, ptr %23, align 4, !tbaa !8
  %372 = add nsw i32 %371, 1
  store i32 %372, ptr %23, align 4, !tbaa !8
  br label %298, !llvm.loop !29

373:                                              ; preds = %302
  %374 = load i8, ptr %19, align 1, !tbaa !26, !range !30, !noundef !31
  %375 = trunc i8 %374 to i1
  br i1 %375, label %385, label %376

376:                                              ; preds = %373
  %377 = load i8, ptr %20, align 1, !tbaa !26, !range !30, !noundef !31
  %378 = trunc i8 %377 to i1
  br i1 %378, label %385, label %379

379:                                              ; preds = %376
  %380 = load i8, ptr %22, align 1, !tbaa !26, !range !30, !noundef !31
  %381 = trunc i8 %380 to i1
  br i1 %381, label %385, label %382

382:                                              ; preds = %379
  %383 = load i8, ptr %21, align 1, !tbaa !26, !range !30, !noundef !31
  %384 = trunc i8 %383 to i1
  br i1 %384, label %385, label %394

385:                                              ; preds = %382, %379, %376, %373
  %386 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %387 unwind label %390

387:                                              ; preds = %385
  %388 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %386, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %389 unwind label %390

389:                                              ; preds = %387
  br label %399

390:                                              ; preds = %396, %394, %387, %385
  %391 = landingpad { ptr, i32 }
          cleanup
  %392 = extractvalue { ptr, i32 } %391, 0
  store ptr %392, ptr %5, align 8
  %393 = extractvalue { ptr, i32 } %391, 1
  store i32 %393, ptr %6, align 4
  br label %401

394:                                              ; preds = %382
  %395 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
          to label %396 unwind label %390

396:                                              ; preds = %394
  %397 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %395, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %398 unwind label %390

398:                                              ; preds = %396
  br label %399

399:                                              ; preds = %398, %389
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #7
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %400 = load i32, ptr %1, align 4
  ret i32 %400

401:                                              ; preds = %390, %321
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #7
  br label %402

402:                                              ; preds = %401, %105, %53
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  br label %403

403:                                              ; preds = %402, %40
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %404

404:                                              ; preds = %403
  %405 = load ptr, ptr %5, align 8
  %406 = load i32, ptr %6, align 4
  %407 = insertvalue { ptr, i32 } poison, ptr %405, 0
  %408 = insertvalue { ptr, i32 } %407, i32 %406, 1
  resume { ptr, i32 } %408
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #1

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!10, !10, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"short", !10, i64 0}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = !{!27, !27, i64 0}
!27 = !{!"bool", !10, i64 0}
!28 = distinct !{!28, !12}
!29 = distinct !{!29, !12}
!30 = !{i8 0, i8 2}
!31 = !{}


; 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

@l = external dso_local local_unnamed_addr global [1005 x [1005 x i16]], align 16
@r = external dso_local local_unnamed_addr global [1005 x [1005 x i16]], align 16
@u = external dso_local local_unnamed_addr global [1005 x [1005 x i16]], align 16
@d = external dso_local local_unnamed_addr global [1005 x [1005 x i16]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %"class.std::allocator", align 1
  %4 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %5 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %6 = getelementptr i8, ptr %5, i64 -24
  %7 = load i64, ptr %6, align 8
  %8 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %7
  %9 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %8, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #7
  %11 = load i32, ptr %1, align 4, !tbaa !8
  %12 = sext i32 %11 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  call void @_ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2EmRKS6_(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %12, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %13 unwind label %18

13:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  %14 = load i32, ptr %1, align 4, !tbaa !8
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %22, %13
  %16 = phi i32 [ %14, %13 ], [ %23, %22 ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(2020050) @l, i8 0, i64 2020050, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(2020050) @r, i8 0, i64 2020050, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(2020050) @d, i8 0, i64 2020050, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(2020050) @u, i8 0, i64 2020050, i1 false)
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.preheader130, label %._crit_edge181.thread

18:                                               ; preds = %0
  %19 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  br label %142

.lr.ph:                                           ; preds = %13, %22
  %indvars.iv = phi i64 [ %indvars.iv.next, %22 ], [ 0, %13 ]
  %20 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv) #7
  %21 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %22 unwind label %26

22:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %23 = load i32, ptr %1, align 4, !tbaa !8
  %24 = sext i32 %23 to i64
  %25 = icmp slt i64 %indvars.iv.next, %24
  br i1 %25, label %.lr.ph, label %._crit_edge, !llvm.loop !11

26:                                               ; preds = %.lr.ph
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %141

.preheader130:                                    ; preds = %._crit_edge, %._crit_edge143
  %28 = phi i32 [ %51, %._crit_edge143 ], [ %16, %._crit_edge ]
  %indvars.iv197 = phi i64 [ %indvars.iv.next198, %._crit_edge143 ], [ 0, %._crit_edge ]
  %29 = icmp sgt i32 %28, 0
  br i1 %29, label %.lr.ph142, label %.preheader130.._crit_edge143_crit_edge

.preheader130.._crit_edge143_crit_edge:           ; preds = %.preheader130
  %.pre = sext i32 %28 to i64
  br label %._crit_edge143

.preheader129:                                    ; preds = %._crit_edge143
  %30 = icmp sgt i32 %51, 0
  br i1 %30, label %.preheader128.us.preheader, label %._crit_edge181.thread

.preheader128.us.preheader:                       ; preds = %.preheader129
  %wide.trip.count207 = zext nneg i32 %51 to i64
  %exitcond.peel.not = icmp eq i32 %51, 1
  %31 = add nsw i64 %wide.trip.count207, -1
  %32 = add nsw i64 %wide.trip.count207, -2
  %xtraiter = and i64 %31, 3
  %33 = icmp ult i64 %32, 3
  %unroll_iter = and i64 %31, -4
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %34

34:                                               ; preds = %._crit_edge147.us, %.preheader128.us.preheader
  %indvars.iv204 = phi i64 [ 0, %.preheader128.us.preheader ], [ %indvars.iv.next205, %._crit_edge147.us ]
  br i1 %exitcond.peel.not, label %._crit_edge147.us, label %.peel.next.preheader

.peel.next.preheader:                             ; preds = %34
  %35 = mul nuw nsw i64 %indvars.iv204, 2010
  %scevgep = getelementptr i8, ptr @l, i64 %35
  %load_initial = load i16, ptr %scevgep, align 2
  br i1 %33, label %._crit_edge147.us.loopexit.unr-lcssa, label %.peel.next

.peel.next:                                       ; preds = %.peel.next.preheader, %.peel.next
  %store_forwarded = phi i16 [ %47, %.peel.next ], [ %load_initial, %.peel.next.preheader ]
  %indvars.iv200 = phi i64 [ %indvars.iv.next201.3, %.peel.next ], [ 1, %.peel.next.preheader ]
  %niter = phi i64 [ %niter.next.3, %.peel.next ], [ 0, %.peel.next.preheader ]
  %36 = getelementptr inbounds [1005 x [1005 x i16]], ptr @l, i64 0, i64 %indvars.iv204, i64 %indvars.iv200
  %37 = load i16, ptr %36, align 2, !tbaa !13
  %38 = add i16 %37, %store_forwarded
  store i16 %38, ptr %36, align 2, !tbaa !13
  %indvars.iv.next201 = add nuw nsw i64 %indvars.iv200, 1
  %39 = getelementptr inbounds [1005 x [1005 x i16]], ptr @l, i64 0, i64 %indvars.iv204, i64 %indvars.iv.next201
  %40 = load i16, ptr %39, align 2, !tbaa !13
  %41 = add i16 %40, %38
  store i16 %41, ptr %39, align 2, !tbaa !13
  %indvars.iv.next201.1 = add nuw nsw i64 %indvars.iv200, 2
  %42 = getelementptr inbounds [1005 x [1005 x i16]], ptr @l, i64 0, i64 %indvars.iv204, i64 %indvars.iv.next201.1
  %43 = load i16, ptr %42, align 2, !tbaa !13
  %44 = add i16 %43, %41
  store i16 %44, ptr %42, align 2, !tbaa !13
  %indvars.iv.next201.2 = add nuw nsw i64 %indvars.iv200, 3
  %45 = getelementptr inbounds [1005 x [1005 x i16]], ptr @l, i64 0, i64 %indvars.iv204, i64 %indvars.iv.next201.2
  %46 = load i16, ptr %45, align 2, !tbaa !13
  %47 = add i16 %46, %44
  store i16 %47, ptr %45, align 2, !tbaa !13
  %indvars.iv.next201.3 = add nuw nsw i64 %indvars.iv200, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge147.us.loopexit.unr-lcssa, label %.peel.next, !llvm.loop !15

._crit_edge147.us.loopexit.unr-lcssa:             ; preds = %.peel.next, %.peel.next.preheader
  %store_forwarded.unr = phi i16 [ %load_initial, %.peel.next.preheader ], [ %47, %.peel.next ]
  %indvars.iv200.unr = phi i64 [ 1, %.peel.next.preheader ], [ %indvars.iv.next201.3, %.peel.next ]
  br i1 %lcmp.mod.not, label %._crit_edge147.us, label %.peel.next.epil

.peel.next.epil:                                  ; preds = %._crit_edge147.us.loopexit.unr-lcssa, %.peel.next.epil
  %store_forwarded.epil = phi i16 [ %50, %.peel.next.epil ], [ %store_forwarded.unr, %._crit_edge147.us.loopexit.unr-lcssa ]
  %indvars.iv200.epil = phi i64 [ %indvars.iv.next201.epil, %.peel.next.epil ], [ %indvars.iv200.unr, %._crit_edge147.us.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.peel.next.epil ], [ 0, %._crit_edge147.us.loopexit.unr-lcssa ]
  %48 = getelementptr inbounds [1005 x [1005 x i16]], ptr @l, i64 0, i64 %indvars.iv204, i64 %indvars.iv200.epil
  %49 = load i16, ptr %48, align 2, !tbaa !13
  %50 = add i16 %49, %store_forwarded.epil
  store i16 %50, ptr %48, align 2, !tbaa !13
  %indvars.iv.next201.epil = add nuw nsw i64 %indvars.iv200.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge147.us, label %.peel.next.epil, !llvm.loop !17

._crit_edge147.us:                                ; preds = %._crit_edge147.us.loopexit.unr-lcssa, %.peel.next.epil, %34
  %indvars.iv.next205 = add nuw nsw i64 %indvars.iv204, 1
  %exitcond208.not = icmp eq i64 %indvars.iv.next205, %wide.trip.count207
  br i1 %exitcond208.not, label %.preheader127, label %34, !llvm.loop !19

._crit_edge143:                                   ; preds = %65, %.preheader130.._crit_edge143_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.preheader130.._crit_edge143_crit_edge ], [ %67, %65 ]
  %51 = phi i32 [ %28, %.preheader130.._crit_edge143_crit_edge ], [ %66, %65 ]
  %indvars.iv.next198 = add nuw nsw i64 %indvars.iv197, 1
  %52 = icmp slt i64 %indvars.iv.next198, %.pre-phi
  br i1 %52, label %.preheader130, label %.preheader129, !llvm.loop !20

.lr.ph142:                                        ; preds = %.preheader130, %65
  %indvars.iv194 = phi i64 [ %indvars.iv.next195, %65 ], [ 0, %.preheader130 ]
  %53 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv197) #7
  %54 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %53, i64 noundef %indvars.iv194)
          to label %55 unwind label %63

55:                                               ; preds = %.lr.ph142
  %56 = load i8, ptr %54, align 1, !tbaa !22
  %57 = icmp eq i8 %56, 49
  br i1 %57, label %58, label %65

58:                                               ; preds = %55
  %59 = getelementptr inbounds [1005 x [1005 x i16]], ptr @d, i64 0, i64 %indvars.iv197, i64 %indvars.iv194
  store i16 1, ptr %59, align 2, !tbaa !13
  %60 = getelementptr inbounds [1005 x [1005 x i16]], ptr @u, i64 0, i64 %indvars.iv197, i64 %indvars.iv194
  store i16 1, ptr %60, align 2, !tbaa !13
  %61 = getelementptr inbounds [1005 x [1005 x i16]], ptr @r, i64 0, i64 %indvars.iv197, i64 %indvars.iv194
  store i16 1, ptr %61, align 2, !tbaa !13
  %62 = getelementptr inbounds [1005 x [1005 x i16]], ptr @l, i64 0, i64 %indvars.iv197, i64 %indvars.iv194
  store i16 1, ptr %62, align 2, !tbaa !13
  br label %65

63:                                               ; preds = %.lr.ph142
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %141

65:                                               ; preds = %55, %58
  %indvars.iv.next195 = add nuw nsw i64 %indvars.iv194, 1
  %66 = load i32, ptr %1, align 4, !tbaa !8
  %67 = sext i32 %66 to i64
  %68 = icmp slt i64 %indvars.iv.next195, %67
  br i1 %68, label %.lr.ph142, label %._crit_edge143, !llvm.loop !23

.preheader127:                                    ; preds = %._crit_edge147.us
  br i1 %30, label %.preheader126.lr.ph, label %.preheader.preheader

.preheader126.lr.ph:                              ; preds = %.preheader127
  %69 = zext nneg i32 %51 to i64
  %70 = zext nneg i32 %51 to i64
  %indvars.iv.next210.peel = add nsw i64 %69, -1
  %.not284 = icmp eq i32 %51, 1
  br label %.preheader126.us

.preheader126.us:                                 ; preds = %._crit_edge153.us, %.preheader126.lr.ph
  %indvars.iv212 = phi i64 [ %indvars.iv.next213, %._crit_edge153.us ], [ 0, %.preheader126.lr.ph ]
  br i1 %.not284, label %._crit_edge153.us, label %.preheader126.us.peel.newph

.preheader126.us.peel.newph:                      ; preds = %.preheader126.us, %78
  %indvars.iv209 = phi i64 [ %indvars.iv.next210, %78 ], [ %indvars.iv.next210.peel, %.preheader126.us ]
  %indvars.iv.next210 = add nsw i64 %indvars.iv209, -1
  %71 = icmp slt i64 %indvars.iv209, %70
  br i1 %71, label %72, label %78

72:                                               ; preds = %.preheader126.us.peel.newph
  %73 = getelementptr inbounds [1005 x [1005 x i16]], ptr @r, i64 0, i64 %indvars.iv212, i64 %indvars.iv209
  %74 = load i16, ptr %73, align 2, !tbaa !13
  %75 = getelementptr inbounds [1005 x [1005 x i16]], ptr @r, i64 0, i64 %indvars.iv212, i64 %indvars.iv.next210
  %76 = load i16, ptr %75, align 2, !tbaa !13
  %77 = add i16 %76, %74
  store i16 %77, ptr %75, align 2, !tbaa !13
  br label %78

78:                                               ; preds = %72, %.preheader126.us.peel.newph
  %79 = icmp sgt i64 %indvars.iv209, 1
  br i1 %79, label %.preheader126.us.peel.newph, label %._crit_edge153.us, !llvm.loop !24

._crit_edge153.us:                                ; preds = %78, %.preheader126.us
  %indvars.iv.next213 = add nuw nsw i64 %indvars.iv212, 1
  %exitcond216.not = icmp eq i64 %indvars.iv.next213, %69
  br i1 %exitcond216.not, label %.preheader125, label %.preheader126.us, !llvm.loop !25

.preheader125:                                    ; preds = %._crit_edge153.us
  br i1 %30, label %.preheader124.us.preheader, label %.preheader.preheader

.preheader124.us.preheader:                       ; preds = %.preheader125
  %wide.trip.count228 = zext nneg i32 %51 to i64
  %exitcond221.peel.not = icmp eq i32 %51, 1
  %xtraiter276 = and i64 %31, 1
  %80 = icmp eq i64 %32, 0
  %unroll_iter279 = and i64 %31, -2
  %lcmp.mod278.not = icmp eq i64 %xtraiter276, 0
  br label %81

81:                                               ; preds = %._crit_edge157.us, %.preheader124.us.preheader
  %indvars.iv225 = phi i64 [ 0, %.preheader124.us.preheader ], [ %indvars.iv.next226, %._crit_edge157.us ]
  br i1 %exitcond221.peel.not, label %._crit_edge157.us, label %.peel.next223.preheader

.peel.next223.preheader:                          ; preds = %81
  br i1 %80, label %._crit_edge157.us.loopexit.unr-lcssa, label %.peel.next223

.peel.next223:                                    ; preds = %.peel.next223.preheader, %.peel.next223
  %indvars.iv217 = phi i64 [ %indvars.iv.next218.1, %.peel.next223 ], [ 1, %.peel.next223.preheader ]
  %niter280 = phi i64 [ %niter280.next.1, %.peel.next223 ], [ 0, %.peel.next223.preheader ]
  %82 = add nsw i64 %indvars.iv217, -1
  %83 = getelementptr inbounds [1005 x [1005 x i16]], ptr @d, i64 0, i64 %82, i64 %indvars.iv225
  %84 = load i16, ptr %83, align 2, !tbaa !13
  %85 = getelementptr inbounds [1005 x [1005 x i16]], ptr @d, i64 0, i64 %indvars.iv217, i64 %indvars.iv225
  %86 = load i16, ptr %85, align 2, !tbaa !13
  %87 = add i16 %86, %84
  store i16 %87, ptr %85, align 2, !tbaa !13
  %indvars.iv.next218 = add nuw nsw i64 %indvars.iv217, 1
  %88 = getelementptr inbounds [1005 x [1005 x i16]], ptr @d, i64 0, i64 %indvars.iv.next218, i64 %indvars.iv225
  %89 = load i16, ptr %88, align 2, !tbaa !13
  %90 = add i16 %89, %87
  store i16 %90, ptr %88, align 2, !tbaa !13
  %indvars.iv.next218.1 = add nuw nsw i64 %indvars.iv217, 2
  %niter280.next.1 = add i64 %niter280, 2
  %niter280.ncmp.1 = icmp eq i64 %niter280.next.1, %unroll_iter279
  br i1 %niter280.ncmp.1, label %._crit_edge157.us.loopexit.unr-lcssa, label %.peel.next223, !llvm.loop !26

._crit_edge157.us.loopexit.unr-lcssa:             ; preds = %.peel.next223, %.peel.next223.preheader
  %indvars.iv217.unr = phi i64 [ 1, %.peel.next223.preheader ], [ %indvars.iv.next218.1, %.peel.next223 ]
  br i1 %lcmp.mod278.not, label %._crit_edge157.us, label %.peel.next223.epil

.peel.next223.epil:                               ; preds = %._crit_edge157.us.loopexit.unr-lcssa
  %91 = add nsw i64 %indvars.iv217.unr, -1
  %92 = getelementptr inbounds [1005 x [1005 x i16]], ptr @d, i64 0, i64 %91, i64 %indvars.iv225
  %93 = load i16, ptr %92, align 2, !tbaa !13
  %94 = getelementptr inbounds [1005 x [1005 x i16]], ptr @d, i64 0, i64 %indvars.iv217.unr, i64 %indvars.iv225
  %95 = load i16, ptr %94, align 2, !tbaa !13
  %96 = add i16 %95, %93
  store i16 %96, ptr %94, align 2, !tbaa !13
  br label %._crit_edge157.us

._crit_edge157.us:                                ; preds = %.peel.next223.epil, %._crit_edge157.us.loopexit.unr-lcssa, %81
  %indvars.iv.next226 = add nuw nsw i64 %indvars.iv225, 1
  %exitcond229.not = icmp eq i64 %indvars.iv.next226, %wide.trip.count228
  br i1 %exitcond229.not, label %.preheader123, label %81, !llvm.loop !27

.preheader123:                                    ; preds = %._crit_edge157.us
  br i1 %30, label %.preheader122.lr.ph, label %.preheader.preheader

.preheader122.lr.ph:                              ; preds = %.preheader123
  %97 = zext nneg i32 %51 to i64
  %98 = zext nneg i32 %51 to i64
  %indvars.iv.next231.peel = add nsw i64 %97, -1
  %.not285 = icmp eq i32 %51, 1
  br label %.preheader122.us

.preheader122.us:                                 ; preds = %._crit_edge163.us, %.preheader122.lr.ph
  %indvars.iv233 = phi i64 [ %indvars.iv.next234, %._crit_edge163.us ], [ 0, %.preheader122.lr.ph ]
  br i1 %.not285, label %._crit_edge163.us, label %.preheader122.us.peel.newph

.preheader122.us.peel.newph:                      ; preds = %.preheader122.us, %106
  %indvars.iv230 = phi i64 [ %indvars.iv.next231, %106 ], [ %indvars.iv.next231.peel, %.preheader122.us ]
  %indvars.iv.next231 = add nsw i64 %indvars.iv230, -1
  %99 = icmp slt i64 %indvars.iv230, %98
  br i1 %99, label %100, label %106

100:                                              ; preds = %.preheader122.us.peel.newph
  %101 = getelementptr inbounds [1005 x [1005 x i16]], ptr @u, i64 0, i64 %indvars.iv230, i64 %indvars.iv233
  %102 = load i16, ptr %101, align 2, !tbaa !13
  %103 = getelementptr inbounds [1005 x [1005 x i16]], ptr @u, i64 0, i64 %indvars.iv.next231, i64 %indvars.iv233
  %104 = load i16, ptr %103, align 2, !tbaa !13
  %105 = add i16 %104, %102
  store i16 %105, ptr %103, align 2, !tbaa !13
  br label %106

106:                                              ; preds = %100, %.preheader122.us.peel.newph
  %107 = icmp sgt i64 %indvars.iv230, 1
  br i1 %107, label %.preheader122.us.peel.newph, label %._crit_edge163.us, !llvm.loop !28

._crit_edge163.us:                                ; preds = %106, %.preheader122.us
  %indvars.iv.next234 = add nuw nsw i64 %indvars.iv233, 1
  %exitcond237.not = icmp eq i64 %indvars.iv.next234, %97
  br i1 %exitcond237.not, label %.preheader.preheader, label %.preheader122.us, !llvm.loop !29

.preheader.preheader:                             ; preds = %._crit_edge163.us, %.preheader127, %.preheader125, %.preheader123
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge171
  %108 = phi i32 [ %113, %._crit_edge171 ], [ %51, %.preheader.preheader ]
  %indvars.iv240 = phi i64 [ %indvars.iv.next241, %._crit_edge171 ], [ 0, %.preheader.preheader ]
  %.074179 = phi i1 [ %.1.lcssa, %._crit_edge171 ], [ true, %.preheader.preheader ]
  %.075178 = phi i1 [ %.176.lcssa, %._crit_edge171 ], [ true, %.preheader.preheader ]
  %.078177 = phi i1 [ %.179.lcssa, %._crit_edge171 ], [ true, %.preheader.preheader ]
  %.082176 = phi i1 [ %.183.lcssa, %._crit_edge171 ], [ true, %.preheader.preheader ]
  %109 = icmp sgt i32 %108, 0
  br i1 %109, label %.lr.ph170, label %.preheader.._crit_edge171_crit_edge

.preheader.._crit_edge171_crit_edge:              ; preds = %.preheader
  %.pre244 = sext i32 %108 to i64
  br label %._crit_edge171

._crit_edge181:                                   ; preds = %._crit_edge171
  %110 = select i1 %.183.lcssa, i1 true, i1 %.179.lcssa
  %111 = select i1 %110, i1 true, i1 %.1.lcssa
  %112 = select i1 %111, i1 true, i1 %.176.lcssa
  br i1 %112, label %._crit_edge181.thread, label %.invoke263

._crit_edge171:                                   ; preds = %131, %.preheader.._crit_edge171_crit_edge
  %.pre-phi245 = phi i64 [ %.pre244, %.preheader.._crit_edge171_crit_edge ], [ %133, %131 ]
  %113 = phi i32 [ %108, %.preheader.._crit_edge171_crit_edge ], [ %132, %131 ]
  %.183.lcssa = phi i1 [ %.082176, %.preheader.._crit_edge171_crit_edge ], [ %.385, %131 ]
  %.179.lcssa = phi i1 [ %.078177, %.preheader.._crit_edge171_crit_edge ], [ %.381, %131 ]
  %.176.lcssa = phi i1 [ %.075178, %.preheader.._crit_edge171_crit_edge ], [ %.3, %131 ]
  %.1.lcssa = phi i1 [ %.074179, %.preheader.._crit_edge171_crit_edge ], [ %.2, %131 ]
  %indvars.iv.next241 = add nuw nsw i64 %indvars.iv240, 1
  %114 = icmp slt i64 %indvars.iv.next241, %.pre-phi245
  br i1 %114, label %.preheader, label %._crit_edge181, !llvm.loop !30

.lr.ph170:                                        ; preds = %.preheader, %131
  %indvars.iv238 = phi i64 [ %indvars.iv.next239, %131 ], [ 0, %.preheader ]
  %.1168 = phi i1 [ %.2, %131 ], [ %.074179, %.preheader ]
  %.176167 = phi i1 [ %.3, %131 ], [ %.075178, %.preheader ]
  %.179166 = phi i1 [ %.381, %131 ], [ %.078177, %.preheader ]
  %.183165 = phi i1 [ %.385, %131 ], [ %.082176, %.preheader ]
  %115 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv240) #7
  %116 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %115, i64 noundef %indvars.iv238)
          to label %117 unwind label %120

117:                                              ; preds = %.lr.ph170
  %118 = load i8, ptr %116, align 1, !tbaa !22
  %119 = icmp eq i8 %118, 49
  br i1 %119, label %131, label %122

120:                                              ; preds = %.lr.ph170
  %121 = landingpad { ptr, i32 }
          cleanup
  br label %141

122:                                              ; preds = %117
  %123 = getelementptr inbounds [1005 x [1005 x i16]], ptr @l, i64 0, i64 %indvars.iv240, i64 %indvars.iv238
  %124 = load i16, ptr %123, align 2, !tbaa !13
  %.not = icmp eq i16 %124, 0
  %spec.select = select i1 %.not, i1 %.183165, i1 false
  %125 = getelementptr inbounds [1005 x [1005 x i16]], ptr @r, i64 0, i64 %indvars.iv240, i64 %indvars.iv238
  %126 = load i16, ptr %125, align 2, !tbaa !13
  %.not110 = icmp eq i16 %126, 0
  %.280 = select i1 %.not110, i1 %.179166, i1 false
  %127 = getelementptr inbounds [1005 x [1005 x i16]], ptr @d, i64 0, i64 %indvars.iv240, i64 %indvars.iv238
  %128 = load i16, ptr %127, align 2, !tbaa !13
  %.not111 = icmp eq i16 %128, 0
  %.277 = select i1 %.not111, i1 %.176167, i1 false
  %129 = getelementptr inbounds [1005 x [1005 x i16]], ptr @u, i64 0, i64 %indvars.iv240, i64 %indvars.iv238
  %130 = load i16, ptr %129, align 2, !tbaa !13
  %.not112 = icmp eq i16 %130, 0
  %spec.select118 = select i1 %.not112, i1 %.1168, i1 false
  br label %131

131:                                              ; preds = %122, %117
  %.385 = phi i1 [ %.183165, %117 ], [ %spec.select, %122 ]
  %.381 = phi i1 [ %.179166, %117 ], [ %.280, %122 ]
  %.3 = phi i1 [ %.176167, %117 ], [ %.277, %122 ]
  %.2 = phi i1 [ %.1168, %117 ], [ %spec.select118, %122 ]
  %indvars.iv.next239 = add nuw nsw i64 %indvars.iv238, 1
  %132 = load i32, ptr %1, align 4, !tbaa !8
  %133 = sext i32 %132 to i64
  %134 = icmp slt i64 %indvars.iv.next239, %133
  br i1 %134, label %.lr.ph170, label %._crit_edge171, !llvm.loop !31

._crit_edge181.thread:                            ; preds = %._crit_edge, %.preheader129, %._crit_edge181
  br label %.invoke263

135:                                              ; preds = %.invoke263, %.invoke
  %136 = landingpad { ptr, i32 }
          cleanup
  br label %141

.invoke263:                                       ; preds = %._crit_edge181, %._crit_edge181.thread
  %137 = phi ptr [ @.str, %._crit_edge181.thread ], [ @.str.1, %._crit_edge181 ]
  %138 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull %137)
          to label %.invoke unwind label %135

.invoke:                                          ; preds = %.invoke263
  %139 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %138, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %140 unwind label %135

140:                                              ; preds = %.invoke
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

141:                                              ; preds = %120, %135, %63, %26
  %.pn115 = phi { ptr, i32 } [ %27, %26 ], [ %64, %63 ], [ %121, %120 ], [ %136, %135 ]
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  br label %142

142:                                              ; preds = %141, %18
  %.pn115.pn = phi { ptr, i32 } [ %.pn115, %141 ], [ %19, %18 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn115.pn
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #1

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #6

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"short", !10, i64 0}
!15 = distinct !{!15, !12, !16}
!16 = !{!"llvm.loop.peeled.count", i32 1}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.unroll.disable"}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12, !21}
!21 = !{!"llvm.loop.unswitch.partial.disable"}
!22 = !{!10, !10, i64 0}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12, !16}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12, !16}
!27 = distinct !{!27, !12}
!28 = distinct !{!28, !12, !16}
!29 = distinct !{!29, !12}
!30 = distinct !{!30, !12, !21}
!31 = distinct !{!31, !12}


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