; LLVM IR from eyangch/competitive-programming :: USACOcontests/gold/2016.01 (radio)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@dx = external dso_local global [128 x i32], align 16
@dy = external dso_local global [128 x i32], align 16
@dp = external dso_local global [1001 x [1001 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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 i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca double, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %23 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %24 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %25 = getelementptr i8, ptr %24, i64 -24
  %26 = load i64, ptr %25, align 8
  %27 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %26
  %28 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %27, ptr noundef null)
  %29 = load ptr, ptr @stdin, align 8, !tbaa !8
  %30 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.1, ptr noundef %29)
  %31 = load ptr, ptr @stdout, align 8, !tbaa !8
  %32 = call ptr @freopen(ptr noundef @.str.2, ptr noundef @.str.3, ptr noundef %31)
  store i32 0, ptr getelementptr inbounds ([128 x i32], ptr @dy, i64 0, i64 69), align 4, !tbaa !11
  store i32 0, ptr getelementptr inbounds ([128 x i32], ptr @dy, i64 0, i64 87), align 4, !tbaa !11
  store i32 0, ptr getelementptr inbounds ([128 x i32], ptr @dx, i64 0, i64 83), align 4, !tbaa !11
  store i32 0, ptr getelementptr inbounds ([128 x i32], ptr @dx, i64 0, i64 78), align 8, !tbaa !11
  store i32 1, ptr getelementptr inbounds ([128 x i32], ptr @dx, i64 0, i64 69), align 4, !tbaa !11
  store i32 1, ptr getelementptr inbounds ([128 x i32], ptr @dy, i64 0, i64 78), align 8, !tbaa !11
  store i32 -1, ptr getelementptr inbounds ([128 x i32], ptr @dx, i64 0, i64 87), align 4, !tbaa !11
  store i32 -1, ptr getelementptr inbounds ([128 x i32], ptr @dy, i64 0, i64 83), align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  %33 = 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)
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %35 = load i32, ptr %2, align 4, !tbaa !11
  %36 = add nsw i32 %35, 1
  %37 = zext i32 %36 to i64
  %38 = call ptr @llvm.stacksave.p0()
  store ptr %38, ptr %4, align 8
  %39 = alloca i32, i64 %37, align 16
  store i64 %37, ptr %5, align 8
  %40 = load i32, ptr %2, align 4, !tbaa !11
  %41 = add nsw i32 %40, 1
  %42 = zext i32 %41 to i64
  %43 = alloca i32, i64 %42, align 16
  store i64 %42, ptr %6, align 8
  %44 = load i32, ptr %3, align 4, !tbaa !11
  %45 = add nsw i32 %44, 1
  %46 = zext i32 %45 to i64
  %47 = alloca i32, i64 %46, align 16
  store i64 %46, ptr %7, align 8
  %48 = load i32, ptr %3, align 4, !tbaa !11
  %49 = add nsw i32 %48, 1
  %50 = zext i32 %49 to i64
  %51 = alloca i32, i64 %50, align 16
  store i64 %50, ptr %8, align 8
  %52 = getelementptr inbounds i32, ptr %39, i64 0
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %52)
  %54 = getelementptr inbounds i32, ptr %43, i64 0
  %55 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %53, ptr noundef nonnull align 4 dereferenceable(4) %54)
  %56 = getelementptr inbounds i32, ptr %47, i64 0
  %57 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %55, ptr noundef nonnull align 4 dereferenceable(4) %56)
  %58 = getelementptr inbounds i32, ptr %51, i64 0
  %59 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %57, ptr noundef nonnull align 4 dereferenceable(4) %58)
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  %60 = 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) %9)
          to label %61 unwind label %69

61:                                               ; preds = %0
  %62 = 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) %60, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %63 unwind label %69

63:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 1, ptr %13, align 4, !tbaa !11
  br label %64

64:                                               ; preds = %110, %63
  %65 = load i32, ptr %13, align 4, !tbaa !11
  %66 = load i32, ptr %2, align 4, !tbaa !11
  %67 = icmp sle i32 %65, %66
  br i1 %67, label %73, label %68

68:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %117

69:                                               ; preds = %341, %332, %61, %0
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %11, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %12, align 4
  br label %346

73:                                               ; preds = %64
  %74 = load i32, ptr %13, align 4, !tbaa !11
  %75 = sub nsw i32 %74, 1
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds i32, ptr %39, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !11
  %79 = load i32, ptr %13, align 4, !tbaa !11
  %80 = sub nsw i32 %79, 1
  %81 = sext i32 %80 to i64
  %82 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %9, i64 noundef %81)
          to label %83 unwind label %113

83:                                               ; preds = %73
  %84 = load i8, ptr %82, align 1, !tbaa !13
  %85 = sext i8 %84 to i64
  %86 = getelementptr inbounds [128 x i32], ptr @dx, i64 0, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !11
  %88 = add nsw i32 %78, %87
  %89 = load i32, ptr %13, align 4, !tbaa !11
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds i32, ptr %39, i64 %90
  store i32 %88, ptr %91, align 4, !tbaa !11
  %92 = load i32, ptr %13, align 4, !tbaa !11
  %93 = sub nsw i32 %92, 1
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds i32, ptr %43, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !11
  %97 = load i32, ptr %13, align 4, !tbaa !11
  %98 = sub nsw i32 %97, 1
  %99 = sext i32 %98 to i64
  %100 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %9, i64 noundef %99)
          to label %101 unwind label %113

101:                                              ; preds = %83
  %102 = load i8, ptr %100, align 1, !tbaa !13
  %103 = sext i8 %102 to i64
  %104 = getelementptr inbounds [128 x i32], ptr @dy, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !11
  %106 = add nsw i32 %96, %105
  %107 = load i32, ptr %13, align 4, !tbaa !11
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds i32, ptr %43, i64 %108
  store i32 %106, ptr %109, align 4, !tbaa !11
  br label %110

110:                                              ; preds = %101
  %111 = load i32, ptr %13, align 4, !tbaa !11
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %13, align 4, !tbaa !11
  br label %64, !llvm.loop !14

113:                                              ; preds = %83, %73
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %11, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %346

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

118:                                              ; preds = %160, %117
  %119 = load i32, ptr %14, align 4, !tbaa !11
  %120 = load i32, ptr %3, align 4, !tbaa !11
  %121 = icmp sle i32 %119, %120
  br i1 %121, label %123, label %122

122:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %167

123:                                              ; preds = %118
  %124 = load i32, ptr %14, align 4, !tbaa !11
  %125 = sub nsw i32 %124, 1
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds i32, ptr %47, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !11
  %129 = load i32, ptr %14, align 4, !tbaa !11
  %130 = sub nsw i32 %129, 1
  %131 = sext i32 %130 to i64
  %132 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %10, i64 noundef %131)
          to label %133 unwind label %163

133:                                              ; preds = %123
  %134 = load i8, ptr %132, align 1, !tbaa !13
  %135 = sext i8 %134 to i64
  %136 = getelementptr inbounds [128 x i32], ptr @dx, i64 0, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !11
  %138 = add nsw i32 %128, %137
  %139 = load i32, ptr %14, align 4, !tbaa !11
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds i32, ptr %47, i64 %140
  store i32 %138, ptr %141, align 4, !tbaa !11
  %142 = load i32, ptr %14, align 4, !tbaa !11
  %143 = sub nsw i32 %142, 1
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds i32, ptr %51, i64 %144
  %146 = load i32, ptr %145, align 4, !tbaa !11
  %147 = load i32, ptr %14, align 4, !tbaa !11
  %148 = sub nsw i32 %147, 1
  %149 = sext i32 %148 to i64
  %150 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %10, i64 noundef %149)
          to label %151 unwind label %163

151:                                              ; preds = %133
  %152 = load i8, ptr %150, align 1, !tbaa !13
  %153 = sext i8 %152 to i64
  %154 = getelementptr inbounds [128 x i32], ptr @dy, i64 0, i64 %153
  %155 = load i32, ptr %154, align 4, !tbaa !11
  %156 = add nsw i32 %146, %155
  %157 = load i32, ptr %14, align 4, !tbaa !11
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds i32, ptr %51, i64 %158
  store i32 %156, ptr %159, align 4, !tbaa !11
  br label %160

160:                                              ; preds = %151
  %161 = load i32, ptr %14, align 4, !tbaa !11
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %14, align 4, !tbaa !11
  br label %118, !llvm.loop !16

163:                                              ; preds = %133, %123
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %11, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %346

167:                                              ; preds = %122
  %168 = load i32, ptr %2, align 4, !tbaa !11
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [1001 x [1001 x i32]], ptr @dp, i64 0, i64 %169
  %171 = getelementptr inbounds [1001 x i32], ptr %170, i64 0, i64 0
  %172 = load i32, ptr %3, align 4, !tbaa !11
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds i32, ptr %171, i64 %173
  %175 = getelementptr inbounds i32, ptr %174, i64 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  store double 1.000000e+09, ptr %15, align 8, !tbaa !17
  invoke void @_ZSt4fillIPidEvT_S1_RKT0_(ptr noundef @dp, ptr noundef %175, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %176 unwind label %182

176:                                              ; preds = %167
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  store i32 0, ptr @dp, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !11
  br label %177

177:                                              ; preds = %329, %176
  %178 = load i32, ptr %16, align 4, !tbaa !11
  %179 = load i32, ptr %2, align 4, !tbaa !11
  %180 = icmp sle i32 %178, %179
  br i1 %180, label %186, label %181

181:                                              ; preds = %177
  store i32 8, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %332

182:                                              ; preds = %167
  %183 = landingpad { ptr, i32 }
          cleanup
  %184 = extractvalue { ptr, i32 } %183, 0
  store ptr %184, ptr %11, align 8
  %185 = extractvalue { ptr, i32 } %183, 1
  store i32 %185, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %346

186:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 0, ptr %18, align 4, !tbaa !11
  br label %187

187:                                              ; preds = %324, %186
  %188 = load i32, ptr %18, align 4, !tbaa !11
  %189 = load i32, ptr %3, align 4, !tbaa !11
  %190 = icmp sle i32 %188, %189
  br i1 %190, label %192, label %191

191:                                              ; preds = %187
  store i32 11, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %328

192:                                              ; preds = %187
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  %193 = load i32, ptr %16, align 4, !tbaa !11
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds i32, ptr %39, i64 %194
  %196 = load i32, ptr %195, align 4, !tbaa !11
  %197 = load i32, ptr %18, align 4, !tbaa !11
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds i32, ptr %47, i64 %198
  %200 = load i32, ptr %199, align 4, !tbaa !11
  %201 = sub nsw i32 %196, %200
  %202 = invoke noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef %201, i32 noundef 2)
          to label %203 unwind label %245

203:                                              ; preds = %192
  %204 = load i32, ptr %16, align 4, !tbaa !11
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds i32, ptr %43, i64 %205
  %207 = load i32, ptr %206, align 4, !tbaa !11
  %208 = load i32, ptr %18, align 4, !tbaa !11
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds i32, ptr %51, i64 %209
  %211 = load i32, ptr %210, align 4, !tbaa !11
  %212 = sub nsw i32 %207, %211
  %213 = invoke noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef %212, i32 noundef 2)
          to label %214 unwind label %245

214:                                              ; preds = %203
  %215 = fadd double %202, %213
  %216 = fptosi double %215 to i32
  store i32 %216, ptr %19, align 4, !tbaa !11
  %217 = load i32, ptr %16, align 4, !tbaa !11
  %218 = icmp sgt i32 %217, 0
  br i1 %218, label %219, label %253

219:                                              ; preds = %214
  %220 = load i32, ptr %16, align 4, !tbaa !11
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [1001 x [1001 x i32]], ptr @dp, i64 0, i64 %221
  %223 = load i32, ptr %18, align 4, !tbaa !11
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [1001 x i32], ptr %222, i64 0, i64 %224
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %226 = load i32, ptr %19, align 4, !tbaa !11
  %227 = load i32, ptr %16, align 4, !tbaa !11
  %228 = sub nsw i32 %227, 1
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [1001 x [1001 x i32]], ptr @dp, i64 0, i64 %229
  %231 = load i32, ptr %18, align 4, !tbaa !11
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [1001 x i32], ptr %230, i64 0, i64 %232
  %234 = load i32, ptr %233, align 4, !tbaa !11
  %235 = add nsw i32 %226, %234
  store i32 %235, ptr %20, align 4, !tbaa !11
  %236 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %225, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %237 unwind label %249

237:                                              ; preds = %219
  %238 = load i32, ptr %236, align 4, !tbaa !11
  %239 = load i32, ptr %16, align 4, !tbaa !11
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [1001 x [1001 x i32]], ptr @dp, i64 0, i64 %240
  %242 = load i32, ptr %18, align 4, !tbaa !11
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds [1001 x i32], ptr %241, i64 0, i64 %243
  store i32 %238, ptr %244, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %253

245:                                              ; preds = %203, %192
  %246 = landingpad { ptr, i32 }
          cleanup
  %247 = extractvalue { ptr, i32 } %246, 0
  store ptr %247, ptr %11, align 8
  %248 = extractvalue { ptr, i32 } %246, 1
  store i32 %248, ptr %12, align 4
  br label %327

249:                                              ; preds = %219
  %250 = landingpad { ptr, i32 }
          cleanup
  %251 = extractvalue { ptr, i32 } %250, 0
  store ptr %251, ptr %11, align 8
  %252 = extractvalue { ptr, i32 } %250, 1
  store i32 %252, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %327

253:                                              ; preds = %237, %214
  %254 = load i32, ptr %18, align 4, !tbaa !11
  %255 = icmp sgt i32 %254, 0
  br i1 %255, label %256, label %286

256:                                              ; preds = %253
  %257 = load i32, ptr %16, align 4, !tbaa !11
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds [1001 x [1001 x i32]], ptr @dp, i64 0, i64 %258
  %260 = load i32, ptr %18, align 4, !tbaa !11
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds [1001 x i32], ptr %259, i64 0, i64 %261
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  %263 = load i32, ptr %19, align 4, !tbaa !11
  %264 = load i32, ptr %16, align 4, !tbaa !11
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds [1001 x [1001 x i32]], ptr @dp, i64 0, i64 %265
  %267 = load i32, ptr %18, align 4, !tbaa !11
  %268 = sub nsw i32 %267, 1
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds [1001 x i32], ptr %266, i64 0, i64 %269
  %271 = load i32, ptr %270, align 4, !tbaa !11
  %272 = add nsw i32 %263, %271
  store i32 %272, ptr %21, align 4, !tbaa !11
  %273 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %262, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %274 unwind label %282

274:                                              ; preds = %256
  %275 = load i32, ptr %273, align 4, !tbaa !11
  %276 = load i32, ptr %16, align 4, !tbaa !11
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds [1001 x [1001 x i32]], ptr @dp, i64 0, i64 %277
  %279 = load i32, ptr %18, align 4, !tbaa !11
  %280 = sext i32 %279 to i64
  %281 = getelementptr inbounds [1001 x i32], ptr %278, i64 0, i64 %280
  store i32 %275, ptr %281, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %286

282:                                              ; preds = %256
  %283 = landingpad { ptr, i32 }
          cleanup
  %284 = extractvalue { ptr, i32 } %283, 0
  store ptr %284, ptr %11, align 8
  %285 = extractvalue { ptr, i32 } %283, 1
  store i32 %285, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %327

286:                                              ; preds = %274, %253
  %287 = load i32, ptr %16, align 4, !tbaa !11
  %288 = icmp sgt i32 %287, 0
  br i1 %288, label %289, label %323

289:                                              ; preds = %286
  %290 = load i32, ptr %18, align 4, !tbaa !11
  %291 = icmp sgt i32 %290, 0
  br i1 %291, label %292, label %323

292:                                              ; preds = %289
  %293 = load i32, ptr %16, align 4, !tbaa !11
  %294 = sext i32 %293 to i64
  %295 = getelementptr inbounds [1001 x [1001 x i32]], ptr @dp, i64 0, i64 %294
  %296 = load i32, ptr %18, align 4, !tbaa !11
  %297 = sext i32 %296 to i64
  %298 = getelementptr inbounds [1001 x i32], ptr %295, i64 0, i64 %297
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %299 = load i32, ptr %19, align 4, !tbaa !11
  %300 = load i32, ptr %16, align 4, !tbaa !11
  %301 = sub nsw i32 %300, 1
  %302 = sext i32 %301 to i64
  %303 = getelementptr inbounds [1001 x [1001 x i32]], ptr @dp, i64 0, i64 %302
  %304 = load i32, ptr %18, align 4, !tbaa !11
  %305 = sub nsw i32 %304, 1
  %306 = sext i32 %305 to i64
  %307 = getelementptr inbounds [1001 x i32], ptr %303, i64 0, i64 %306
  %308 = load i32, ptr %307, align 4, !tbaa !11
  %309 = add nsw i32 %299, %308
  store i32 %309, ptr %22, align 4, !tbaa !11
  %310 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %298, ptr noundef nonnull align 4 dereferenceable(4) %22)
          to label %311 unwind label %319

311:                                              ; preds = %292
  %312 = load i32, ptr %310, align 4, !tbaa !11
  %313 = load i32, ptr %16, align 4, !tbaa !11
  %314 = sext i32 %313 to i64
  %315 = getelementptr inbounds [1001 x [1001 x i32]], ptr @dp, i64 0, i64 %314
  %316 = load i32, ptr %18, align 4, !tbaa !11
  %317 = sext i32 %316 to i64
  %318 = getelementptr inbounds [1001 x i32], ptr %315, i64 0, i64 %317
  store i32 %312, ptr %318, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %323

319:                                              ; preds = %292
  %320 = landingpad { ptr, i32 }
          cleanup
  %321 = extractvalue { ptr, i32 } %320, 0
  store ptr %321, ptr %11, align 8
  %322 = extractvalue { ptr, i32 } %320, 1
  store i32 %322, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %327

323:                                              ; preds = %311, %289, %286
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %324

324:                                              ; preds = %323
  %325 = load i32, ptr %18, align 4, !tbaa !11
  %326 = add nsw i32 %325, 1
  store i32 %326, ptr %18, align 4, !tbaa !11
  br label %187, !llvm.loop !19

327:                                              ; preds = %319, %282, %249, %245
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %346

328:                                              ; preds = %191
  br label %329

329:                                              ; preds = %328
  %330 = load i32, ptr %16, align 4, !tbaa !11
  %331 = add nsw i32 %330, 1
  store i32 %331, ptr %16, align 4, !tbaa !11
  br label %177, !llvm.loop !20

332:                                              ; preds = %181
  %333 = load i32, ptr %2, align 4, !tbaa !11
  %334 = sext i32 %333 to i64
  %335 = getelementptr inbounds [1001 x [1001 x i32]], ptr @dp, i64 0, i64 %334
  %336 = load i32, ptr %3, align 4, !tbaa !11
  %337 = sext i32 %336 to i64
  %338 = getelementptr inbounds [1001 x i32], ptr %335, i64 0, i64 %337
  %339 = load i32, ptr %338, align 4, !tbaa !11
  %340 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %339)
          to label %341 unwind label %69

341:                                              ; preds = %332
  %342 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %340, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %343 unwind label %69

343:                                              ; preds = %341
  store i32 0, ptr %1, align 4
  store i32 1, ptr %17, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #8
  %344 = load ptr, ptr %4, align 8
  call void @llvm.stackrestore.p0(ptr %344)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %345 = load i32, ptr %1, align 4
  ret i32 %345

346:                                              ; preds = %327, %182, %163, %113, %69
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %347

347:                                              ; preds = %346
  %348 = load ptr, ptr %11, align 8
  %349 = load i32, ptr %12, align 4
  %350 = insertvalue { ptr, i32 } poison, ptr %348, 0
  %351 = insertvalue { ptr, i32 } %350, i32 %349, 1
  resume { ptr, i32 } %351
}

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #1

; 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: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPidEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef, i32 noundef) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #6

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #7 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)) #5

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

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 = { nocallback nofree nosync nounwind willreturn }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { 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 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = !{!10, !10, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !10, i64 0}
!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::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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@dx = external dso_local local_unnamed_addr global [128 x i32], align 16
@dy = external dso_local local_unnamed_addr global [128 x i32], align 16
@dp = external dso_local global [1001 x [1001 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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 i32, align 4
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca double, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %10 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %11 = getelementptr i8, ptr %10, i64 -24
  %12 = load i64, ptr %11, align 8
  %13 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %12
  %14 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %13, ptr noundef null)
  %15 = load ptr, ptr @stdin, align 8, !tbaa !8
  %16 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %15)
  %17 = load ptr, ptr @stdout, align 8, !tbaa !8
  %18 = tail call ptr @freopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef %17)
  store i32 0, ptr getelementptr inbounds (i8, ptr @dy, i64 276), align 4, !tbaa !11
  store i32 0, ptr getelementptr inbounds (i8, ptr @dy, i64 348), align 4, !tbaa !11
  store i32 0, ptr getelementptr inbounds (i8, ptr @dx, i64 332), align 4, !tbaa !11
  store i32 0, ptr getelementptr inbounds (i8, ptr @dx, i64 312), align 8, !tbaa !11
  store i32 1, ptr getelementptr inbounds (i8, ptr @dx, i64 276), align 4, !tbaa !11
  store i32 1, ptr getelementptr inbounds (i8, ptr @dy, i64 312), align 8, !tbaa !11
  store i32 -1, ptr getelementptr inbounds (i8, ptr @dx, i64 348), align 4, !tbaa !11
  store i32 -1, ptr getelementptr inbounds (i8, ptr @dy, i64 332), align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %19 = 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)
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %21 = load i32, ptr %1, align 4, !tbaa !11
  %22 = add nsw i32 %21, 1
  %23 = zext i32 %22 to i64
  %24 = call ptr @llvm.stacksave.p0()
  %25 = alloca i32, i64 %23, align 16
  %26 = load i32, ptr %1, align 4, !tbaa !11
  %27 = add nsw i32 %26, 1
  %28 = zext i32 %27 to i64
  %29 = alloca i32, i64 %28, align 16
  %30 = load i32, ptr %2, align 4, !tbaa !11
  %31 = add nsw i32 %30, 1
  %32 = zext i32 %31 to i64
  %33 = alloca i32, i64 %32, align 16
  %34 = alloca i32, i64 %32, align 16
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %25)
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 4 dereferenceable(4) %29)
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %36, ptr noundef nonnull align 4 dereferenceable(4) %33)
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 4 dereferenceable(4) %34)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  %39 = 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) %3)
          to label %40 unwind label %45

40:                                               ; preds = %0
  %41 = 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) %39, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %.preheader66 unwind label %45

.preheader66:                                     ; preds = %40
  %42 = load i32, ptr %1, align 4, !tbaa !11
  %.not68 = icmp slt i32 %42, 1
  br i1 %.not68, label %.preheader65, label %.lr.ph

.preheader65:                                     ; preds = %.lr.ph, %.preheader66
  %43 = phi i32 [ %42, %.preheader66 ], [ %66, %.lr.ph ]
  %44 = load i32, ptr %2, align 4, !tbaa !11
  %.not6070 = icmp slt i32 %44, 1
  br i1 %.not6070, label %.preheader65.._crit_edge_crit_edge, label %.lr.ph72

.preheader65.._crit_edge_crit_edge:               ; preds = %.preheader65
  %.pre102 = sext i32 %44 to i64
  br label %._crit_edge

45:                                               ; preds = %184, %._crit_edge79, %40, %0
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %187

.lr.ph:                                           ; preds = %.preheader66, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.preheader66 ]
  %47 = add nsw i64 %indvars.iv, -1
  %48 = getelementptr inbounds i32, ptr %25, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !11
  %50 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %47)
  %51 = load i8, ptr %50, align 1, !tbaa !13
  %52 = sext i8 %51 to i64
  %53 = getelementptr inbounds [128 x i32], ptr @dx, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !11
  %55 = add nsw i32 %54, %49
  %56 = getelementptr inbounds i32, ptr %25, i64 %indvars.iv
  store i32 %55, ptr %56, align 4, !tbaa !11
  %57 = getelementptr inbounds i32, ptr %29, i64 %47
  %58 = load i32, ptr %57, align 4, !tbaa !11
  %59 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %47)
  %60 = load i8, ptr %59, align 1, !tbaa !13
  %61 = sext i8 %60 to i64
  %62 = getelementptr inbounds [128 x i32], ptr @dy, i64 0, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !11
  %64 = add nsw i32 %63, %58
  %65 = getelementptr inbounds i32, ptr %29, i64 %indvars.iv
  store i32 %64, ptr %65, align 4, !tbaa !11
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %66 = load i32, ptr %1, align 4, !tbaa !11
  %67 = sext i32 %66 to i64
  %.not.not = icmp slt i64 %indvars.iv, %67
  br i1 %.not.not, label %.lr.ph, label %.preheader65, !llvm.loop !14

._crit_edge.loopexit:                             ; preds = %.lr.ph72
  %.pre = load i32, ptr %1, align 4, !tbaa !11
  br label %._crit_edge

._crit_edge:                                      ; preds = %.preheader65.._crit_edge_crit_edge, %._crit_edge.loopexit
  %.pre-phi = phi i64 [ %.pre102, %.preheader65.._crit_edge_crit_edge ], [ %93, %._crit_edge.loopexit ]
  %68 = phi i32 [ %43, %.preheader65.._crit_edge_crit_edge ], [ %.pre, %._crit_edge.loopexit ]
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [1001 x [1001 x i32]], ptr @dp, i64 0, i64 %69
  %71 = getelementptr inbounds i32, ptr %70, i64 %.pre-phi
  %72 = getelementptr inbounds i8, ptr %71, i64 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  store double 1.000000e+09, ptr %5, align 8, !tbaa !16
  invoke void @_ZSt4fillIPidEvT_S1_RKT0_(ptr noundef nonnull @dp, ptr noundef nonnull %72, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %94 unwind label %157

.lr.ph72:                                         ; preds = %.preheader65, %.lr.ph72
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %.lr.ph72 ], [ 1, %.preheader65 ]
  %73 = add nsw i64 %indvars.iv88, -1
  %74 = getelementptr inbounds i32, ptr %33, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !11
  %76 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %73)
  %77 = load i8, ptr %76, align 1, !tbaa !13
  %78 = sext i8 %77 to i64
  %79 = getelementptr inbounds [128 x i32], ptr @dx, i64 0, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !11
  %81 = add nsw i32 %80, %75
  %82 = getelementptr inbounds i32, ptr %33, i64 %indvars.iv88
  store i32 %81, ptr %82, align 4, !tbaa !11
  %83 = getelementptr inbounds i32, ptr %34, i64 %73
  %84 = load i32, ptr %83, align 4, !tbaa !11
  %85 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %73)
  %86 = load i8, ptr %85, align 1, !tbaa !13
  %87 = sext i8 %86 to i64
  %88 = getelementptr inbounds [128 x i32], ptr @dy, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !11
  %90 = add nsw i32 %89, %84
  %91 = getelementptr inbounds i32, ptr %34, i64 %indvars.iv88
  store i32 %90, ptr %91, align 4, !tbaa !11
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %92 = load i32, ptr %2, align 4, !tbaa !11
  %93 = sext i32 %92 to i64
  %.not60.not = icmp slt i64 %indvars.iv88, %93
  br i1 %.not60.not, label %.lr.ph72, label %._crit_edge.loopexit, !llvm.loop !18

94:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  store i32 0, ptr @dp, align 16, !tbaa !11
  %95 = load i32, ptr %1, align 4, !tbaa !11
  %.not6177 = icmp slt i32 %95, 0
  %.pre101 = load i32, ptr %2, align 4, !tbaa !11
  %96 = icmp slt i32 %.pre101, 0
  %or.cond = select i1 %.not6177, i1 true, i1 %96
  br i1 %or.cond, label %._crit_edge79, label %.preheader

.preheader:                                       ; preds = %94, %._crit_edge76
  %97 = phi i32 [ %159, %._crit_edge76 ], [ %.pre101, %94 ]
  %98 = phi i32 [ %160, %._crit_edge76 ], [ %.pre101, %94 ]
  %.05378 = phi i32 [ %161, %._crit_edge76 ], [ 0, %94 ]
  %.not6373 = icmp slt i32 %98, 0
  br i1 %.not6373, label %._crit_edge76, label %.lr.ph75

.lr.ph75:                                         ; preds = %.preheader
  %99 = zext nneg i32 %.05378 to i64
  %100 = getelementptr inbounds i32, ptr %25, i64 %99
  %101 = getelementptr inbounds i32, ptr %29, i64 %99
  %.not = icmp eq i32 %.05378, 0
  %102 = add nsw i32 %.05378, -1
  %103 = zext nneg i32 %102 to i64
  %104 = load i32, ptr %100, align 4, !tbaa !11
  %105 = load i32, ptr %33, align 16, !tbaa !11
  %106 = sub nsw i32 %104, %105
  %107 = call noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef %106, i32 noundef 2)
  %108 = load i32, ptr %101, align 4, !tbaa !11
  %109 = load i32, ptr %34, align 16, !tbaa !11
  %110 = sub nsw i32 %108, %109
  %111 = call noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef %110, i32 noundef 2)
  br i1 %.not, label %.thread.peel, label %.thread.us.peel

.thread.us.peel:                                  ; preds = %.lr.ph75
  %112 = fadd double %107, %111
  %113 = fptosi double %112 to i32
  %114 = getelementptr inbounds [1001 x [1001 x i32]], ptr @dp, i64 0, i64 %99, i64 0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  %115 = getelementptr inbounds [1001 x [1001 x i32]], ptr @dp, i64 0, i64 %103, i64 0
  %116 = load i32, ptr %115, align 4, !tbaa !11
  %117 = add nsw i32 %116, %113
  store i32 %117, ptr %6, align 4, !tbaa !11
  %118 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %114, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %119 = load i32, ptr %118, align 4, !tbaa !11
  store i32 %119, ptr %114, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  %.pre99 = load i32, ptr %2, align 4, !tbaa !11
  %.not63.us.not.peel = icmp sgt i32 %.pre99, 0
  br i1 %.not63.us.not.peel, label %.thread.us, label %._crit_edge76

.thread.peel:                                     ; preds = %.lr.ph75
  %.pre100 = load i32, ptr %2, align 4, !tbaa !11
  %.not63.not.peel = icmp sgt i32 %.pre100, 0
  br i1 %.not63.not.peel, label %.thread, label %._crit_edge76

.thread.us:                                       ; preds = %.thread.us.peel, %.thread.us
  %indvars.iv91 = phi i64 [ %indvars.iv.next92, %.thread.us ], [ 1, %.thread.us.peel ]
  %120 = load i32, ptr %100, align 4, !tbaa !11
  %121 = getelementptr inbounds i32, ptr %33, i64 %indvars.iv91
  %122 = load i32, ptr %121, align 4, !tbaa !11
  %123 = sub nsw i32 %120, %122
  %124 = call noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef %123, i32 noundef 2)
  %125 = load i32, ptr %101, align 4, !tbaa !11
  %126 = getelementptr inbounds i32, ptr %34, i64 %indvars.iv91
  %127 = load i32, ptr %126, align 4, !tbaa !11
  %128 = sub nsw i32 %125, %127
  %129 = call noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef %128, i32 noundef 2)
  %130 = fadd double %124, %129
  %131 = fptosi double %130 to i32
  %132 = getelementptr inbounds [1001 x [1001 x i32]], ptr @dp, i64 0, i64 %99, i64 %indvars.iv91
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  %133 = getelementptr inbounds [1001 x [1001 x i32]], ptr @dp, i64 0, i64 %103, i64 %indvars.iv91
  %134 = load i32, ptr %133, align 4, !tbaa !11
  %135 = add nsw i32 %134, %131
  store i32 %135, ptr %6, align 4, !tbaa !11
  %136 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %132, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %137 = load i32, ptr %136, align 4, !tbaa !11
  store i32 %137, ptr %132, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  %138 = add nsw i64 %indvars.iv91, -1
  %139 = getelementptr inbounds [1001 x [1001 x i32]], ptr @dp, i64 0, i64 %99, i64 %138
  %140 = load i32, ptr %139, align 4, !tbaa !11
  %141 = add nsw i32 %140, %131
  store i32 %141, ptr %7, align 4, !tbaa !11
  %142 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %132, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %143 = load i32, ptr %142, align 4, !tbaa !11
  store i32 %143, ptr %132, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  %144 = getelementptr inbounds [1001 x [1001 x i32]], ptr @dp, i64 0, i64 %103, i64 %138
  %145 = load i32, ptr %144, align 4, !tbaa !11
  %146 = add nsw i32 %145, %131
  store i32 %146, ptr %8, align 4, !tbaa !11
  %147 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %132, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %148 = load i32, ptr %147, align 4, !tbaa !11
  store i32 %148, ptr %132, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  %149 = load i32, ptr %2, align 4, !tbaa !11
  %150 = sext i32 %149 to i64
  %.not63.us.not = icmp slt i64 %indvars.iv91, %150
  br i1 %.not63.us.not, label %.thread.us, label %._crit_edge76, !llvm.loop !19

._crit_edge79:                                    ; preds = %._crit_edge76, %94
  %151 = phi i32 [ %.pre101, %94 ], [ %159, %._crit_edge76 ]
  %.lcssa = phi i32 [ %95, %94 ], [ %162, %._crit_edge76 ]
  %152 = sext i32 %.lcssa to i64
  %153 = sext i32 %151 to i64
  %154 = getelementptr inbounds [1001 x [1001 x i32]], ptr @dp, i64 0, i64 %152, i64 %153
  %155 = load i32, ptr %154, align 4, !tbaa !11
  %156 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %155)
          to label %184 unwind label %45

157:                                              ; preds = %._crit_edge
  %158 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  br label %187

._crit_edge76:                                    ; preds = %.thread.us, %.thread, %.thread.us.peel, %.thread.peel, %.preheader
  %159 = phi i32 [ %97, %.preheader ], [ %.pre100, %.thread.peel ], [ %.pre99, %.thread.us.peel ], [ %182, %.thread ], [ %149, %.thread.us ]
  %160 = phi i32 [ %98, %.preheader ], [ %.pre100, %.thread.peel ], [ %.pre99, %.thread.us.peel ], [ %182, %.thread ], [ %149, %.thread.us ]
  %161 = add i32 %.05378, 1
  %162 = load i32, ptr %1, align 4, !tbaa !11
  %.not61 = icmp sgt i32 %161, %162
  br i1 %.not61, label %._crit_edge79, label %.preheader, !llvm.loop !21

.thread:                                          ; preds = %.thread.peel, %.thread
  %indvars.iv95 = phi i64 [ %indvars.iv.next96, %.thread ], [ 1, %.thread.peel ]
  %163 = load i32, ptr %100, align 4, !tbaa !11
  %164 = getelementptr inbounds i32, ptr %33, i64 %indvars.iv95
  %165 = load i32, ptr %164, align 4, !tbaa !11
  %166 = sub nsw i32 %163, %165
  %167 = call noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef %166, i32 noundef 2)
  %168 = load i32, ptr %101, align 4, !tbaa !11
  %169 = getelementptr inbounds i32, ptr %34, i64 %indvars.iv95
  %170 = load i32, ptr %169, align 4, !tbaa !11
  %171 = sub nsw i32 %168, %170
  %172 = call noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef %171, i32 noundef 2)
  %173 = fadd double %167, %172
  %174 = fptosi double %173 to i32
  %175 = getelementptr inbounds [1001 x [1001 x i32]], ptr @dp, i64 0, i64 %99, i64 %indvars.iv95
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  %176 = add nsw i64 %indvars.iv95, -1
  %177 = getelementptr inbounds [1001 x [1001 x i32]], ptr @dp, i64 0, i64 %99, i64 %176
  %178 = load i32, ptr %177, align 4, !tbaa !11
  %179 = add nsw i32 %178, %174
  store i32 %179, ptr %7, align 4, !tbaa !11
  %180 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %175, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %181 = load i32, ptr %180, align 4, !tbaa !11
  store i32 %181, ptr %175, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %182 = load i32, ptr %2, align 4, !tbaa !11
  %183 = sext i32 %182 to i64
  %.not63.not = icmp slt i64 %indvars.iv95, %183
  br i1 %.not63.not, label %.thread, label %._crit_edge76, !llvm.loop !23

184:                                              ; preds = %._crit_edge79
  %185 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %156, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %186 unwind label %45

186:                                              ; preds = %184
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  call void @llvm.stackrestore.p0(ptr %24)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0

187:                                              ; preds = %157, %45
  %.pn = phi { ptr, i32 } [ %46, %45 ], [ %158, %157 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  resume { ptr, i32 } %.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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; 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 nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind 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 #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPidEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef, i32 noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

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 nocallback nofree nosync nounwind willreturn }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { 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 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = !{!10, !10, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !10, i64 0}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15, !20}
!20 = !{!"llvm.loop.peeled.count", i32 1}
!21 = distinct !{!21, !15, !22}
!22 = !{!"llvm.loop.unswitch.partial.disable"}
!23 = distinct !{!23, !15, !20}


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