; LLVM IR from abeaumont/competitive-programming :: atcoder/dp (s)

; 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] }

@dp = external dso_local global [10001 x [100 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", 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 %"class.std::__cxx11::basic_string", align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %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 i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %20 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %21 = getelementptr i8, ptr %20, i64 -24
  %22 = load i64, ptr %21, align 8
  %23 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %22
  %24 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %23, ptr noundef null)
  %25 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %26 = 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) %2)
          to label %27 unwind label %36

27:                                               ; preds = %0
  %28 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %29 unwind label %36

29:                                               ; preds = %27
  %30 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  %31 = trunc i64 %30 to i32
  store i32 %31, ptr %3, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 1, ptr %7, align 4, !tbaa !8
  br label %32

32:                                               ; preds = %48, %29
  %33 = load i32, ptr %7, align 4, !tbaa !8
  %34 = icmp slt i32 %33, 10
  br i1 %34, label %40, label %35

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

36:                                               ; preds = %27, %0
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %5, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %6, align 4
  br label %235

40:                                               ; preds = %32
  %41 = load i32, ptr %7, align 4, !tbaa !8
  %42 = load i32, ptr %4, align 4, !tbaa !8
  %43 = srem i32 %41, %42
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [100 x i64], ptr @dp, i64 0, i64 %44
  %46 = load i64, ptr %45, align 8, !tbaa !11
  %47 = add nsw i64 %46, 1
  store i64 %47, ptr %45, align 8, !tbaa !11
  br label %48

48:                                               ; preds = %40
  %49 = load i32, ptr %7, align 4, !tbaa !8
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %7, align 4, !tbaa !8
  br label %32, !llvm.loop !13

51:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 1, ptr %8, align 4, !tbaa !8
  br label %52

52:                                               ; preds = %121, %51
  %53 = load i32, ptr %8, align 4, !tbaa !8
  %54 = load i32, ptr %3, align 4, !tbaa !8
  %55 = icmp sle i32 %53, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %52
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %124

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

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

61:                                               ; preds = %58
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %120

62:                                               ; preds = %58
  %63 = load i32, ptr %10, align 4, !tbaa !8
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %76

65:                                               ; preds = %62
  %66 = load i32, ptr %8, align 4, !tbaa !8
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [10001 x [100 x i64]], ptr @dp, i64 0, i64 %67
  %69 = load i32, ptr %10, align 4, !tbaa !8
  %70 = load i32, ptr %4, align 4, !tbaa !8
  %71 = srem i32 %69, %70
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [100 x i64], ptr %68, i64 0, i64 %72
  %74 = load i64, ptr %73, align 8, !tbaa !11
  %75 = add nsw i64 %74, 1
  store i64 %75, ptr %73, align 8, !tbaa !11
  br label %76

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

77:                                               ; preds = %113, %76
  %78 = load i32, ptr %11, align 4, !tbaa !8
  %79 = load i32, ptr %4, align 4, !tbaa !8
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %77
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %116

82:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %83 = load i32, ptr %11, align 4, !tbaa !8
  %84 = load i32, ptr %10, align 4, !tbaa !8
  %85 = add nsw i32 %83, %84
  %86 = load i32, ptr %4, align 4, !tbaa !8
  %87 = srem i32 %85, %86
  store i32 %87, ptr %12, align 4, !tbaa !8
  %88 = load i32, ptr %12, align 4, !tbaa !8
  %89 = icmp slt i32 %88, 0
  br i1 %89, label %90, label %94

90:                                               ; preds = %82
  %91 = load i32, ptr %4, align 4, !tbaa !8
  %92 = load i32, ptr %12, align 4, !tbaa !8
  %93 = add nsw i32 %92, %91
  store i32 %93, ptr %12, align 4, !tbaa !8
  br label %94

94:                                               ; preds = %90, %82
  %95 = load i32, ptr %8, align 4, !tbaa !8
  %96 = sub nsw i32 %95, 1
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [10001 x [100 x i64]], ptr @dp, i64 0, i64 %97
  %99 = load i32, ptr %11, align 4, !tbaa !8
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [100 x i64], ptr %98, i64 0, i64 %100
  %102 = load i64, ptr %101, align 8, !tbaa !11
  %103 = load i32, ptr %8, align 4, !tbaa !8
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [10001 x [100 x i64]], ptr @dp, i64 0, i64 %104
  %106 = load i32, ptr %12, align 4, !tbaa !8
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [100 x i64], ptr %105, i64 0, i64 %107
  %109 = load i64, ptr %108, align 8, !tbaa !11
  %110 = add nsw i64 %109, %102
  store i64 %110, ptr %108, align 8, !tbaa !11
  %111 = load i64, ptr %108, align 8, !tbaa !11
  %112 = srem i64 %111, 1000000007
  store i64 %112, ptr %108, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %113

113:                                              ; preds = %94
  %114 = load i32, ptr %11, align 4, !tbaa !8
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %11, align 4, !tbaa !8
  br label %77, !llvm.loop !15

116:                                              ; preds = %81
  br label %117

117:                                              ; preds = %116
  %118 = load i32, ptr %10, align 4, !tbaa !8
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %10, align 4, !tbaa !8
  br label %58, !llvm.loop !16

120:                                              ; preds = %61
  br label %121

121:                                              ; preds = %120
  %122 = load i32, ptr %8, align 4, !tbaa !8
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %8, align 4, !tbaa !8
  br label %52, !llvm.loop !17

124:                                              ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store i64 0, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store i64 0, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !8
  br label %125

125:                                              ; preds = %220, %124
  %126 = load i32, ptr %15, align 4, !tbaa !8
  %127 = load i32, ptr %3, align 4, !tbaa !8
  %128 = icmp slt i32 %126, %127
  br i1 %128, label %130, label %129

129:                                              ; preds = %125
  store i32 14, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %223

130:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %131 = load i32, ptr %15, align 4, !tbaa !8
  %132 = sext i32 %131 to i64
  %133 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %132)
          to label %134 unwind label %143

134:                                              ; preds = %130
  %135 = load i8, ptr %133, align 1, !tbaa !18
  %136 = sext i8 %135 to i32
  %137 = sub nsw i32 %136, 48
  store i32 %137, ptr %16, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 1, ptr %17, align 4, !tbaa !8
  br label %138

138:                                              ; preds = %161, %134
  %139 = load i32, ptr %17, align 4, !tbaa !8
  %140 = load i32, ptr %16, align 4, !tbaa !8
  %141 = icmp sle i32 %139, %140
  br i1 %141, label %147, label %142

142:                                              ; preds = %138
  store i32 17, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %164

143:                                              ; preds = %130
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %5, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %234

147:                                              ; preds = %138
  %148 = load i64, ptr %14, align 8, !tbaa !11
  %149 = load i32, ptr %17, align 4, !tbaa !8
  %150 = sext i32 %149 to i64
  %151 = add nsw i64 %148, %150
  %152 = load i32, ptr %4, align 4, !tbaa !8
  %153 = sext i32 %152 to i64
  %154 = srem i64 %151, %153
  %155 = icmp eq i64 %154, 0
  br i1 %155, label %156, label %160

156:                                              ; preds = %147
  %157 = load i64, ptr %13, align 8, !tbaa !11
  %158 = add nsw i64 %157, 1
  %159 = srem i64 %158, 1000000007
  store i64 %159, ptr %13, align 8, !tbaa !11
  br label %160

160:                                              ; preds = %156, %147
  br label %161

161:                                              ; preds = %160
  %162 = load i32, ptr %17, align 4, !tbaa !8
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %17, align 4, !tbaa !8
  br label %138, !llvm.loop !19

164:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !8
  br label %165

165:                                              ; preds = %208, %164
  %166 = load i32, ptr %18, align 4, !tbaa !8
  %167 = load i32, ptr %16, align 4, !tbaa !8
  %168 = icmp slt i32 %166, %167
  br i1 %168, label %170, label %169

169:                                              ; preds = %165
  store i32 20, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %211

170:                                              ; preds = %165
  %171 = load i32, ptr %15, align 4, !tbaa !8
  %172 = load i32, ptr %3, align 4, !tbaa !8
  %173 = sub nsw i32 %172, 1
  %174 = icmp slt i32 %171, %173
  br i1 %174, label %175, label %207

175:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %176 = load i32, ptr %4, align 4, !tbaa !8
  %177 = sext i32 %176 to i64
  %178 = load i64, ptr %14, align 8, !tbaa !11
  %179 = sub nsw i64 %177, %178
  %180 = load i32, ptr %18, align 4, !tbaa !8
  %181 = sext i32 %180 to i64
  %182 = sub nsw i64 %179, %181
  %183 = load i32, ptr %4, align 4, !tbaa !8
  %184 = sext i32 %183 to i64
  %185 = srem i64 %182, %184
  store i64 %185, ptr %19, align 8, !tbaa !11
  %186 = load i64, ptr %19, align 8, !tbaa !11
  %187 = icmp slt i64 %186, 0
  br i1 %187, label %188, label %193

188:                                              ; preds = %175
  %189 = load i32, ptr %4, align 4, !tbaa !8
  %190 = sext i32 %189 to i64
  %191 = load i64, ptr %19, align 8, !tbaa !11
  %192 = add nsw i64 %191, %190
  store i64 %192, ptr %19, align 8, !tbaa !11
  br label %193

193:                                              ; preds = %188, %175
  %194 = load i32, ptr %3, align 4, !tbaa !8
  %195 = load i32, ptr %15, align 4, !tbaa !8
  %196 = sub nsw i32 %194, %195
  %197 = sub nsw i32 %196, 2
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [10001 x [100 x i64]], ptr @dp, i64 0, i64 %198
  %200 = load i64, ptr %19, align 8, !tbaa !11
  %201 = getelementptr inbounds [100 x i64], ptr %199, i64 0, i64 %200
  %202 = load i64, ptr %201, align 8, !tbaa !11
  %203 = load i64, ptr %13, align 8, !tbaa !11
  %204 = add nsw i64 %203, %202
  store i64 %204, ptr %13, align 8, !tbaa !11
  %205 = load i64, ptr %13, align 8, !tbaa !11
  %206 = srem i64 %205, 1000000007
  store i64 %206, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %207

207:                                              ; preds = %193, %170
  br label %208

208:                                              ; preds = %207
  %209 = load i32, ptr %18, align 4, !tbaa !8
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr %18, align 4, !tbaa !8
  br label %165, !llvm.loop !20

211:                                              ; preds = %169
  %212 = load i32, ptr %4, align 4, !tbaa !8
  %213 = sext i32 %212 to i64
  %214 = load i32, ptr %16, align 4, !tbaa !8
  %215 = sext i32 %214 to i64
  %216 = load i64, ptr %14, align 8, !tbaa !11
  %217 = add nsw i64 %216, %215
  store i64 %217, ptr %14, align 8, !tbaa !11
  %218 = load i64, ptr %14, align 8, !tbaa !11
  %219 = srem i64 %218, %213
  store i64 %219, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %220

220:                                              ; preds = %211
  %221 = load i32, ptr %15, align 4, !tbaa !8
  %222 = add nsw i32 %221, 1
  store i32 %222, ptr %15, align 4, !tbaa !8
  br label %125, !llvm.loop !21

223:                                              ; preds = %129
  %224 = load i64, ptr %13, align 8, !tbaa !11
  %225 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %224)
          to label %226 unwind label %230

226:                                              ; preds = %223
  %227 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %225, i8 noundef signext 10)
          to label %228 unwind label %230

228:                                              ; preds = %226
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #6
  %229 = load i32, ptr %1, align 4
  ret i32 %229

230:                                              ; preds = %226, %223
  %231 = landingpad { ptr, i32 }
          cleanup
  %232 = extractvalue { ptr, i32 } %231, 0
  store ptr %232, ptr %5, align 8
  %233 = extractvalue { ptr, i32 } %231, 1
  store i32 %233, ptr %6, align 4
  br label %234

234:                                              ; preds = %230, %143
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %235

235:                                              ; preds = %234, %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #6
  br label %236

236:                                              ; preds = %235
  %237 = load ptr, ptr %5, align 8
  %238 = load i32, ptr %6, align 4
  %239 = insertvalue { ptr, i32 } poison, ptr %237, 0
  %240 = insertvalue { ptr, i32 } %239, i32 %238, 1
  resume { ptr, i32 } %240
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 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)) #2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 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: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 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 = { 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 #2 = { "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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress 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 = { 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 = !{!12, !12, i64 0}
!12 = !{!"long long", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = !{!10, !10, i64 0}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}


; 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] }

@dp = external dso_local local_unnamed_addr global [10001 x [100 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", 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 %"class.std::__cxx11::basic_string", align 8
  %2 = alloca i32, align 4
  %3 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %4 = getelementptr i8, ptr %3, i64 -24
  %5 = load i64, ptr %4, align 8
  %6 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %5
  %7 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %6, ptr noundef null)
  %8 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %9 = 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) %1)
          to label %10 unwind label %81

10:                                               ; preds = %0
  %11 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %.preheader74 unwind label %81

.preheader74:                                     ; preds = %10
  %12 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  %13 = load i32, ptr %2, align 4
  %14 = srem i32 1, %13
  %15 = zext nneg i32 %14 to i64
  %16 = getelementptr inbounds [100 x i64], ptr @dp, i64 0, i64 %15
  %17 = load i64, ptr %16, align 8, !tbaa !8
  %18 = add nsw i64 %17, 1
  store i64 %18, ptr %16, align 8, !tbaa !8
  %19 = srem i32 2, %13
  %20 = zext nneg i32 %19 to i64
  %21 = getelementptr inbounds [100 x i64], ptr @dp, i64 0, i64 %20
  %22 = load i64, ptr %21, align 8, !tbaa !8
  %23 = add nsw i64 %22, 1
  store i64 %23, ptr %21, align 8, !tbaa !8
  %24 = srem i32 3, %13
  %25 = zext nneg i32 %24 to i64
  %26 = getelementptr inbounds [100 x i64], ptr @dp, i64 0, i64 %25
  %27 = load i64, ptr %26, align 8, !tbaa !8
  %28 = add nsw i64 %27, 1
  store i64 %28, ptr %26, align 8, !tbaa !8
  %29 = srem i32 4, %13
  %30 = zext nneg i32 %29 to i64
  %31 = getelementptr inbounds [100 x i64], ptr @dp, i64 0, i64 %30
  %32 = load i64, ptr %31, align 8, !tbaa !8
  %33 = add nsw i64 %32, 1
  store i64 %33, ptr %31, align 8, !tbaa !8
  %34 = srem i32 5, %13
  %35 = zext nneg i32 %34 to i64
  %36 = getelementptr inbounds [100 x i64], ptr @dp, i64 0, i64 %35
  %37 = load i64, ptr %36, align 8, !tbaa !8
  %38 = add nsw i64 %37, 1
  store i64 %38, ptr %36, align 8, !tbaa !8
  %39 = srem i32 6, %13
  %40 = zext nneg i32 %39 to i64
  %41 = getelementptr inbounds [100 x i64], ptr @dp, i64 0, i64 %40
  %42 = load i64, ptr %41, align 8, !tbaa !8
  %43 = add nsw i64 %42, 1
  store i64 %43, ptr %41, align 8, !tbaa !8
  %44 = srem i32 7, %13
  %45 = zext nneg i32 %44 to i64
  %46 = getelementptr inbounds [100 x i64], ptr @dp, i64 0, i64 %45
  %47 = load i64, ptr %46, align 8, !tbaa !8
  %48 = add nsw i64 %47, 1
  store i64 %48, ptr %46, align 8, !tbaa !8
  %49 = srem i32 8, %13
  %50 = zext nneg i32 %49 to i64
  %51 = getelementptr inbounds [100 x i64], ptr @dp, i64 0, i64 %50
  %52 = load i64, ptr %51, align 8, !tbaa !8
  %53 = add nsw i64 %52, 1
  store i64 %53, ptr %51, align 8, !tbaa !8
  %54 = srem i32 9, %13
  %55 = zext nneg i32 %54 to i64
  %56 = getelementptr inbounds [100 x i64], ptr @dp, i64 0, i64 %55
  %57 = load i64, ptr %56, align 8, !tbaa !8
  %58 = add nsw i64 %57, 1
  store i64 %58, ptr %56, align 8, !tbaa !8
  %59 = trunc i64 %12 to i32
  %.not78 = icmp slt i32 %59, 1
  br i1 %.not78, label %._crit_edge91, label %.preheader73.lr.ph

.preheader73.lr.ph:                               ; preds = %.preheader74
  %60 = icmp sgt i32 %13, 0
  %61 = add nuw nsw i64 %12, 1
  %wide.trip.count108 = and i64 %61, 4294967295
  br i1 %60, label %.preheader73.us.preheader, label %.split

.preheader73.us.preheader:                        ; preds = %.preheader73.lr.ph
  %wide.trip.count99 = zext nneg i32 %13 to i64
  br label %.preheader73.us

.preheader73.us:                                  ; preds = %.preheader73.us.preheader, %.split.us.us
  %indvars.iv105 = phi i64 [ 1, %.preheader73.us.preheader ], [ %indvars.iv.next106, %.split.us.us ]
  %62 = add nsw i64 %indvars.iv105, -1
  br label %63

63:                                               ; preds = %._crit_edge.us.us, %.preheader73.us
  %indvars.iv101 = phi i64 [ %indvars.iv.next102, %._crit_edge.us.us ], [ 0, %.preheader73.us ]
  %.not70.us.us = icmp eq i64 %indvars.iv101, 0
  br i1 %.not70.us.us, label %.lr.ph.us.us.preheader, label %64

64:                                               ; preds = %63
  %65 = trunc nuw nsw i64 %indvars.iv101 to i32
  %66 = urem i32 %65, %13
  %67 = zext nneg i32 %66 to i64
  %68 = getelementptr inbounds [10001 x [100 x i64]], ptr @dp, i64 0, i64 %indvars.iv105, i64 %67
  %69 = load i64, ptr %68, align 8, !tbaa !8
  %70 = add nsw i64 %69, 1
  store i64 %70, ptr %68, align 8, !tbaa !8
  br label %.lr.ph.us.us.preheader

.lr.ph.us.us.preheader:                           ; preds = %64, %63
  br label %.lr.ph.us.us

.lr.ph.us.us:                                     ; preds = %.lr.ph.us.us.preheader, %.lr.ph.us.us
  %indvars.iv96 = phi i64 [ %indvars.iv.next97, %.lr.ph.us.us ], [ 0, %.lr.ph.us.us.preheader ]
  %71 = add nuw nsw i64 %indvars.iv96, %indvars.iv101
  %72 = trunc nuw nsw i64 %71 to i32
  %73 = urem i32 %72, %13
  %74 = getelementptr inbounds [10001 x [100 x i64]], ptr @dp, i64 0, i64 %62, i64 %indvars.iv96
  %75 = load i64, ptr %74, align 8, !tbaa !8
  %76 = zext nneg i32 %73 to i64
  %77 = getelementptr inbounds [10001 x [100 x i64]], ptr @dp, i64 0, i64 %indvars.iv105, i64 %76
  %78 = load i64, ptr %77, align 8, !tbaa !8
  %79 = add nsw i64 %78, %75
  %80 = srem i64 %79, 1000000007
  store i64 %80, ptr %77, align 8, !tbaa !8
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
  %exitcond100.not = icmp eq i64 %indvars.iv.next97, %wide.trip.count99
  br i1 %exitcond100.not, label %._crit_edge.us.us, label %.lr.ph.us.us, !llvm.loop !11

._crit_edge.us.us:                                ; preds = %.lr.ph.us.us
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %exitcond104.not = icmp eq i64 %indvars.iv.next102, 10
  br i1 %exitcond104.not, label %.split.us.us, label %63, !llvm.loop !13

.split.us.us:                                     ; preds = %._crit_edge.us.us
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %exitcond109.not = icmp eq i64 %indvars.iv.next106, %wide.trip.count108
  br i1 %exitcond109.not, label %.lr.ph90, label %.preheader73.us, !llvm.loop !14

81:                                               ; preds = %10, %0
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %149

.lr.ph90:                                         ; preds = %.split, %.split.us.us
  %83 = add i64 %12, 4294967294
  %84 = shl i64 %12, 32
  %sext = add nsw i64 %84, -4294967296
  %85 = ashr exact i64 %sext, 32
  %wide.trip.count123 = and i64 %12, 2147483647
  br label %114

.split:                                           ; preds = %.preheader73.lr.ph, %.split
  %indvars.iv = phi i64 [ %indvars.iv.next, %.split ], [ 1, %.preheader73.lr.ph ]
  %86 = getelementptr inbounds [10001 x [100 x i64]], ptr @dp, i64 0, i64 %indvars.iv, i64 %15
  %87 = load i64, ptr %86, align 8, !tbaa !8
  %88 = add nsw i64 %87, 1
  store i64 %88, ptr %86, align 8, !tbaa !8
  %89 = getelementptr inbounds [10001 x [100 x i64]], ptr @dp, i64 0, i64 %indvars.iv, i64 %20
  %90 = load i64, ptr %89, align 8, !tbaa !8
  %91 = add nsw i64 %90, 1
  store i64 %91, ptr %89, align 8, !tbaa !8
  %92 = getelementptr inbounds [10001 x [100 x i64]], ptr @dp, i64 0, i64 %indvars.iv, i64 %25
  %93 = load i64, ptr %92, align 8, !tbaa !8
  %94 = add nsw i64 %93, 1
  store i64 %94, ptr %92, align 8, !tbaa !8
  %95 = getelementptr inbounds [10001 x [100 x i64]], ptr @dp, i64 0, i64 %indvars.iv, i64 %30
  %96 = load i64, ptr %95, align 8, !tbaa !8
  %97 = add nsw i64 %96, 1
  store i64 %97, ptr %95, align 8, !tbaa !8
  %98 = getelementptr inbounds [10001 x [100 x i64]], ptr @dp, i64 0, i64 %indvars.iv, i64 %35
  %99 = load i64, ptr %98, align 8, !tbaa !8
  %100 = add nsw i64 %99, 1
  store i64 %100, ptr %98, align 8, !tbaa !8
  %101 = getelementptr inbounds [10001 x [100 x i64]], ptr @dp, i64 0, i64 %indvars.iv, i64 %40
  %102 = load i64, ptr %101, align 8, !tbaa !8
  %103 = add nsw i64 %102, 1
  store i64 %103, ptr %101, align 8, !tbaa !8
  %104 = getelementptr inbounds [10001 x [100 x i64]], ptr @dp, i64 0, i64 %indvars.iv, i64 %45
  %105 = load i64, ptr %104, align 8, !tbaa !8
  %106 = add nsw i64 %105, 1
  store i64 %106, ptr %104, align 8, !tbaa !8
  %107 = getelementptr inbounds [10001 x [100 x i64]], ptr @dp, i64 0, i64 %indvars.iv, i64 %50
  %108 = load i64, ptr %107, align 8, !tbaa !8
  %109 = add nsw i64 %108, 1
  store i64 %109, ptr %107, align 8, !tbaa !8
  %110 = getelementptr inbounds [10001 x [100 x i64]], ptr @dp, i64 0, i64 %indvars.iv, i64 %55
  %111 = load i64, ptr %110, align 8, !tbaa !8
  %112 = add nsw i64 %111, 1
  store i64 %112, ptr %110, align 8, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count108
  br i1 %exitcond.not, label %.lr.ph90, label %.split, !llvm.loop !14

._crit_edge91:                                    ; preds = %._crit_edge, %.preheader74
  %.056.lcssa = phi i64 [ 0, %.preheader74 ], [ %.3.lcssa, %._crit_edge ]
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.056.lcssa)
          to label %144 unwind label %147

114:                                              ; preds = %.lr.ph90, %._crit_edge
  %indvars.iv120 = phi i64 [ 0, %.lr.ph90 ], [ %indvars.iv.next121, %._crit_edge ]
  %.05588 = phi i64 [ 0, %.lr.ph90 ], [ %143, %._crit_edge ]
  %.05687 = phi i64 [ 0, %.lr.ph90 ], [ %.3.lcssa, %._crit_edge ]
  %115 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv120)
  %116 = load i8, ptr %115, align 1, !tbaa !15
  %117 = sext i8 %116 to i32
  %118 = add nsw i32 %117, -48
  %.not6980 = icmp slt i8 %116, 49
  %.pre.pre = load i32, ptr %2, align 4
  %.pre = sext i32 %.pre.pre to i64
  br i1 %.not6980, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %114
  %119 = add nsw i32 %117, -47
  %wide.trip.count113 = zext i32 %119 to i64
  br label %133

.lr.ph85:                                         ; preds = %140
  %120 = icmp slt i64 %indvars.iv120, %85
  %121 = sext i32 %.pre.pre to i64
  %122 = sub i64 %83, %indvars.iv120
  %sext133 = shl i64 %122, 32
  %123 = ashr exact i64 %sext133, 32
  br i1 %120, label %.lr.ph85.split.us.preheader, label %._crit_edge

.lr.ph85.split.us.preheader:                      ; preds = %.lr.ph85
  %wide.trip.count118 = zext i32 %118 to i64
  br label %.lr.ph85.split.us

.lr.ph85.split.us:                                ; preds = %.lr.ph85.split.us.preheader, %.lr.ph85.split.us
  %indvars.iv115 = phi i64 [ 0, %.lr.ph85.split.us.preheader ], [ %indvars.iv.next116, %.lr.ph85.split.us ]
  %.383.us = phi i64 [ %.2, %.lr.ph85.split.us.preheader ], [ %132, %.lr.ph85.split.us ]
  %124 = add i64 %.05588, %indvars.iv115
  %125 = sub i64 %121, %124
  %126 = srem i64 %125, %121
  %127 = icmp slt i64 %126, 0
  %128 = select i1 %127, i64 %121, i64 0
  %spec.select.us = add nsw i64 %128, %126
  %129 = getelementptr inbounds [10001 x [100 x i64]], ptr @dp, i64 0, i64 %123, i64 %spec.select.us
  %130 = load i64, ptr %129, align 8, !tbaa !8
  %131 = add nsw i64 %130, %.383.us
  %132 = srem i64 %131, 1000000007
  %indvars.iv.next116 = add nuw nsw i64 %indvars.iv115, 1
  %exitcond119.not = icmp eq i64 %indvars.iv.next116, %wide.trip.count118
  br i1 %exitcond119.not, label %._crit_edge, label %.lr.ph85.split.us, !llvm.loop !16

133:                                              ; preds = %.lr.ph, %140
  %indvars.iv110 = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next111, %140 ]
  %.181 = phi i64 [ %.05687, %.lr.ph ], [ %.2, %140 ]
  %134 = add nsw i64 %.05588, %indvars.iv110
  %135 = srem i64 %134, %.pre
  %136 = icmp eq i64 %135, 0
  br i1 %136, label %137, label %140

137:                                              ; preds = %133
  %138 = add nsw i64 %.181, 1
  %139 = srem i64 %138, 1000000007
  br label %140

140:                                              ; preds = %133, %137
  %.2 = phi i64 [ %139, %137 ], [ %.181, %133 ]
  %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1
  %exitcond114.not = icmp eq i64 %indvars.iv.next111, %wide.trip.count113
  br i1 %exitcond114.not, label %.lr.ph85, label %133, !llvm.loop !17

._crit_edge:                                      ; preds = %.lr.ph85.split.us, %114, %.lr.ph85
  %.pre-phi = phi i64 [ %121, %.lr.ph85 ], [ %.pre, %114 ], [ %121, %.lr.ph85.split.us ]
  %.3.lcssa = phi i64 [ %.2, %.lr.ph85 ], [ %.05687, %114 ], [ %132, %.lr.ph85.split.us ]
  %141 = sext i32 %118 to i64
  %142 = add nsw i64 %.05588, %141
  %143 = srem i64 %142, %.pre-phi
  %indvars.iv.next121 = add nuw nsw i64 %indvars.iv120, 1
  %exitcond124.not = icmp eq i64 %indvars.iv.next121, %wide.trip.count123
  br i1 %exitcond124.not, label %._crit_edge91, label %114, !llvm.loop !18

144:                                              ; preds = %._crit_edge91
  %145 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %113, i8 noundef signext 10)
          to label %146 unwind label %147

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

147:                                              ; preds = %144, %._crit_edge91
  %148 = landingpad { ptr, i32 }
          cleanup
  br label %149

149:                                              ; preds = %147, %81
  %.pn = phi { ptr, i32 } [ %148, %147 ], [ %82, %81 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 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 #2

declare i32 @__gxx_personality_v0(...)

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 #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 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 = { 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 #2 = { "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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress 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 = { 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 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{!10, !10, i64 0}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


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