; LLVM IR from VastoLorde95/Competitive-Programming :: Hackerrank/Company Contests/Sears Finals/Problem C/C.ll (Z5solvev)

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

@pw = external dso_local global [100 x i64], align 16
@dp = external dso_local global [100 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 uwtable
define dso_local void @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i8, align 1
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i64, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca i32, align 4
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i32, align 4
  %30 = alloca i64, align 8
  %31 = alloca i64, align 8
  %32 = alloca i64, align 8
  %33 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %1) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  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
  %34 = 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 %35 unwind label %47

35:                                               ; preds = %0
  %36 = 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) %34, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %37 unwind label %47

37:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %38 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  %39 = trunc i64 %38 to i32
  store i32 %39, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %40 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  %41 = trunc i64 %40 to i32
  store i32 %41, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %68, %37
  %43 = load i32, ptr %7, align 4, !tbaa !5
  %44 = load i32, ptr %5, align 4, !tbaa !5
  %45 = icmp sle i32 %43, %44
  br i1 %45, label %51, label %46

46:                                               ; preds = %42
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %71

47:                                               ; preds = %35, %0
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %3, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %4, align 4
  br label %536

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

52:                                               ; preds = %64, %51
  %53 = load i32, ptr %9, align 4, !tbaa !5
  %54 = load i32, ptr %6, align 4, !tbaa !5
  %55 = icmp sle i32 %53, %54
  br i1 %55, label %57, label %56

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

57:                                               ; preds = %52
  %58 = load i32, ptr %7, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %59
  %61 = load i32, ptr %9, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [100 x i64], ptr %60, i64 0, i64 %62
  store i64 0, ptr %63, align 8, !tbaa !9
  br label %64

64:                                               ; preds = %57
  %65 = load i32, ptr %9, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %9, align 4, !tbaa !5
  br label %52, !llvm.loop !11

67:                                               ; preds = %56
  br label %68

68:                                               ; preds = %67
  %69 = load i32, ptr %7, align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %7, align 4, !tbaa !5
  br label %42, !llvm.loop !13

71:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %154, %71
  %73 = load i32, ptr %10, align 4, !tbaa !5
  %74 = load i32, ptr %5, align 4, !tbaa !5
  %75 = icmp sle i32 %73, %74
  br i1 %75, label %77, label %76

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

77:                                               ; preds = %72
  %78 = load i32, ptr %10, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %79
  %81 = getelementptr inbounds [100 x i64], ptr %80, i64 0, i64 0
  store i64 999998727899999, ptr %81, align 16, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %149, %77
  %83 = load i32, ptr %11, align 4, !tbaa !5
  %84 = load i32, ptr %10, align 4, !tbaa !5
  %85 = icmp sle i32 %83, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %82
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %153

87:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  store i8 1, ptr %12, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %88 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %88, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %89 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %89, ptr %14, align 4, !tbaa !5
  br label %90

90:                                               ; preds = %117, %87
  %91 = load i32, ptr %13, align 4, !tbaa !5
  %92 = load i32, ptr %14, align 4, !tbaa !5
  %93 = icmp slt i32 %91, %92
  br i1 %93, label %95, label %94

94:                                               ; preds = %90
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %122

95:                                               ; preds = %90
  %96 = load i32, ptr %13, align 4, !tbaa !5
  %97 = sub nsw i32 %96, 1
  %98 = sext i32 %97 to i64
  %99 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %98)
          to label %100 unwind label %112

100:                                              ; preds = %95
  %101 = load i8, ptr %99, align 1, !tbaa !16
  %102 = sext i8 %101 to i32
  %103 = load i32, ptr %14, align 4, !tbaa !5
  %104 = sub nsw i32 %103, 1
  %105 = sext i32 %104 to i64
  %106 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %105)
          to label %107 unwind label %112

107:                                              ; preds = %100
  %108 = load i8, ptr %106, align 1, !tbaa !16
  %109 = sext i8 %108 to i32
  %110 = icmp ne i32 %102, %109
  br i1 %110, label %111, label %116

111:                                              ; preds = %107
  store i8 0, ptr %12, align 1, !tbaa !14
  br label %116

112:                                              ; preds = %100, %95
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %3, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %152

116:                                              ; preds = %111, %107
  br label %117

117:                                              ; preds = %116
  %118 = load i32, ptr %13, align 4, !tbaa !5
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %13, align 4, !tbaa !5
  %120 = load i32, ptr %14, align 4, !tbaa !5
  %121 = add nsw i32 %120, -1
  store i32 %121, ptr %14, align 4, !tbaa !5
  br label %90, !llvm.loop !17

122:                                              ; preds = %94
  %123 = load i8, ptr %12, align 1, !tbaa !14, !range !18, !noundef !19
  %124 = trunc i8 %123 to i1
  br i1 %124, label %125, label %148

125:                                              ; preds = %122
  %126 = load i32, ptr %10, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %127
  %129 = getelementptr inbounds [100 x i64], ptr %128, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %130 = load i32, ptr %11, align 4, !tbaa !5
  %131 = sub nsw i32 %130, 1
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %132
  %134 = getelementptr inbounds [100 x i64], ptr %133, i64 0, i64 0
  %135 = load i64, ptr %134, align 16, !tbaa !9
  %136 = add nsw i64 %135, 1
  store i64 %136, ptr %15, align 8, !tbaa !9
  %137 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %129, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %138 unwind label %144

138:                                              ; preds = %125
  %139 = load i64, ptr %137, align 8, !tbaa !9
  %140 = load i32, ptr %10, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %141
  %143 = getelementptr inbounds [100 x i64], ptr %142, i64 0, i64 0
  store i64 %139, ptr %143, align 16, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %148

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

148:                                              ; preds = %138, %122
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  br label %149

149:                                              ; preds = %148
  %150 = load i32, ptr %11, align 4, !tbaa !5
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %11, align 4, !tbaa !5
  br label %82, !llvm.loop !20

152:                                              ; preds = %144, %112
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %535

153:                                              ; preds = %86
  br label %154

154:                                              ; preds = %153
  %155 = load i32, ptr %10, align 4, !tbaa !5
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %10, align 4, !tbaa !5
  br label %72, !llvm.loop !21

157:                                              ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 1, ptr %16, align 4, !tbaa !5
  br label %158

158:                                              ; preds = %236, %157
  %159 = load i32, ptr %16, align 4, !tbaa !5
  %160 = load i32, ptr %6, align 4, !tbaa !5
  %161 = icmp sle i32 %159, %160
  br i1 %161, label %163, label %162

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

163:                                              ; preds = %158
  %164 = load i32, ptr %16, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [100 x i64], ptr @dp, i64 0, i64 %165
  store i64 999998727899999, ptr %166, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 1, ptr %17, align 4, !tbaa !5
  br label %167

167:                                              ; preds = %231, %163
  %168 = load i32, ptr %17, align 4, !tbaa !5
  %169 = load i32, ptr %16, align 4, !tbaa !5
  %170 = icmp sle i32 %168, %169
  br i1 %170, label %172, label %171

171:                                              ; preds = %167
  store i32 20, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %235

172:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #6
  store i8 1, ptr %18, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %173 = load i32, ptr %17, align 4, !tbaa !5
  store i32 %173, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %174 = load i32, ptr %16, align 4, !tbaa !5
  store i32 %174, ptr %20, align 4, !tbaa !5
  br label %175

175:                                              ; preds = %202, %172
  %176 = load i32, ptr %19, align 4, !tbaa !5
  %177 = load i32, ptr %20, align 4, !tbaa !5
  %178 = icmp slt i32 %176, %177
  br i1 %178, label %180, label %179

179:                                              ; preds = %175
  store i32 23, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %207

180:                                              ; preds = %175
  %181 = load i32, ptr %19, align 4, !tbaa !5
  %182 = sub nsw i32 %181, 1
  %183 = sext i32 %182 to i64
  %184 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %183)
          to label %185 unwind label %197

185:                                              ; preds = %180
  %186 = load i8, ptr %184, align 1, !tbaa !16
  %187 = sext i8 %186 to i32
  %188 = load i32, ptr %20, align 4, !tbaa !5
  %189 = sub nsw i32 %188, 1
  %190 = sext i32 %189 to i64
  %191 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %190)
          to label %192 unwind label %197

192:                                              ; preds = %185
  %193 = load i8, ptr %191, align 1, !tbaa !16
  %194 = sext i8 %193 to i32
  %195 = icmp ne i32 %187, %194
  br i1 %195, label %196, label %201

196:                                              ; preds = %192
  store i8 0, ptr %18, align 1, !tbaa !14
  br label %201

197:                                              ; preds = %185, %180
  %198 = landingpad { ptr, i32 }
          cleanup
  %199 = extractvalue { ptr, i32 } %198, 0
  store ptr %199, ptr %3, align 8
  %200 = extractvalue { ptr, i32 } %198, 1
  store i32 %200, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %234

201:                                              ; preds = %196, %192
  br label %202

202:                                              ; preds = %201
  %203 = load i32, ptr %19, align 4, !tbaa !5
  %204 = add nsw i32 %203, 1
  store i32 %204, ptr %19, align 4, !tbaa !5
  %205 = load i32, ptr %20, align 4, !tbaa !5
  %206 = add nsw i32 %205, -1
  store i32 %206, ptr %20, align 4, !tbaa !5
  br label %175, !llvm.loop !22

207:                                              ; preds = %179
  %208 = load i8, ptr %18, align 1, !tbaa !14, !range !18, !noundef !19
  %209 = trunc i8 %208 to i1
  br i1 %209, label %210, label %230

210:                                              ; preds = %207
  %211 = load i32, ptr %16, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [100 x i64], ptr @dp, i64 0, i64 %212
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %214 = load i32, ptr %17, align 4, !tbaa !5
  %215 = sub nsw i32 %214, 1
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [100 x i64], ptr @dp, i64 0, i64 %216
  %218 = load i64, ptr %217, align 8, !tbaa !9
  %219 = add nsw i64 %218, 1
  store i64 %219, ptr %21, align 8, !tbaa !9
  %220 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %213, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %221 unwind label %226

221:                                              ; preds = %210
  %222 = load i64, ptr %220, align 8, !tbaa !9
  %223 = load i32, ptr %16, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [100 x i64], ptr @dp, i64 0, i64 %224
  store i64 %222, ptr %225, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %230

226:                                              ; preds = %210
  %227 = landingpad { ptr, i32 }
          cleanup
  %228 = extractvalue { ptr, i32 } %227, 0
  store ptr %228, ptr %3, align 8
  %229 = extractvalue { ptr, i32 } %227, 1
  store i32 %229, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %234

230:                                              ; preds = %221, %207
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  br label %231

231:                                              ; preds = %230
  %232 = load i32, ptr %17, align 4, !tbaa !5
  %233 = add nsw i32 %232, 1
  store i32 %233, ptr %17, align 4, !tbaa !5
  br label %167, !llvm.loop !23

234:                                              ; preds = %226, %197
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %535

235:                                              ; preds = %171
  br label %236

236:                                              ; preds = %235
  %237 = load i32, ptr %16, align 4, !tbaa !5
  %238 = add nsw i32 %237, 1
  store i32 %238, ptr %16, align 4, !tbaa !5
  br label %158, !llvm.loop !24

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

240:                                              ; preds = %516, %239
  %241 = load i32, ptr %22, align 4, !tbaa !5
  %242 = load i32, ptr %5, align 4, !tbaa !5
  %243 = icmp sle i32 %241, %242
  br i1 %243, label %245, label %244

244:                                              ; preds = %240
  store i32 26, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %519

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

246:                                              ; preds = %512, %245
  %247 = load i32, ptr %23, align 4, !tbaa !5
  %248 = load i32, ptr %6, align 4, !tbaa !5
  %249 = icmp sle i32 %247, %248
  br i1 %249, label %251, label %250

250:                                              ; preds = %246
  store i32 29, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %515

251:                                              ; preds = %246
  %252 = load i32, ptr %22, align 4, !tbaa !5
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %253
  %255 = load i32, ptr %23, align 4, !tbaa !5
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds [100 x i64], ptr %254, i64 0, i64 %256
  store i64 999998727899999, ptr %257, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  store i64 0, ptr %24, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  store i64 0, ptr %25, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %258 = load i32, ptr %22, align 4, !tbaa !5
  store i32 %258, ptr %26, align 4, !tbaa !5
  br label %259

259:                                              ; preds = %507, %251
  %260 = load i32, ptr %26, align 4, !tbaa !5
  %261 = icmp sgt i32 %260, 0
  br i1 %261, label %263, label %262

262:                                              ; preds = %259
  store i32 32, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %511

263:                                              ; preds = %259
  %264 = load i64, ptr %24, align 8, !tbaa !9
  %265 = load i32, ptr %22, align 4, !tbaa !5
  %266 = load i32, ptr %26, align 4, !tbaa !5
  %267 = sub nsw i32 %265, %266
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds [100 x i64], ptr @pw, i64 0, i64 %268
  %270 = load i64, ptr %269, align 8, !tbaa !9
  %271 = load i32, ptr %26, align 4, !tbaa !5
  %272 = sub nsw i32 %271, 1
  %273 = sext i32 %272 to i64
  %274 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %273)
          to label %275 unwind label %300

275:                                              ; preds = %263
  %276 = load i8, ptr %274, align 1, !tbaa !16
  %277 = sext i8 %276 to i64
  %278 = mul nsw i64 %270, %277
  %279 = srem i64 %278, 999998727899999
  %280 = add nsw i64 %264, %279
  store i64 %280, ptr %24, align 8, !tbaa !9
  %281 = load i64, ptr %24, align 8, !tbaa !9
  %282 = srem i64 %281, 999998727899999
  store i64 %282, ptr %24, align 8, !tbaa !9
  %283 = load i64, ptr %25, align 8, !tbaa !9
  %284 = mul nsw i64 %283, 31
  %285 = srem i64 %284, 999998727899999
  %286 = load i32, ptr %26, align 4, !tbaa !5
  %287 = sub nsw i32 %286, 1
  %288 = sext i32 %287 to i64
  %289 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %288)
          to label %290 unwind label %300

290:                                              ; preds = %275
  %291 = load i8, ptr %289, align 1, !tbaa !16
  %292 = sext i8 %291 to i64
  %293 = add nsw i64 %285, %292
  %294 = srem i64 %293, 999998727899999
  store i64 %294, ptr %25, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  store i64 0, ptr %27, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  store i64 0, ptr %28, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  %295 = load i32, ptr %23, align 4, !tbaa !5
  store i32 %295, ptr %29, align 4, !tbaa !5
  br label %296

296:                                              ; preds = %502, %290
  %297 = load i32, ptr %29, align 4, !tbaa !5
  %298 = icmp sgt i32 %297, 0
  br i1 %298, label %304, label %299

299:                                              ; preds = %296
  store i32 35, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %506

300:                                              ; preds = %275, %263
  %301 = landingpad { ptr, i32 }
          cleanup
  %302 = extractvalue { ptr, i32 } %301, 0
  store ptr %302, ptr %3, align 8
  %303 = extractvalue { ptr, i32 } %301, 1
  store i32 %303, ptr %4, align 4
  br label %510

304:                                              ; preds = %296
  %305 = load i64, ptr %27, align 8, !tbaa !9
  %306 = load i32, ptr %23, align 4, !tbaa !5
  %307 = load i32, ptr %29, align 4, !tbaa !5
  %308 = sub nsw i32 %306, %307
  %309 = sext i32 %308 to i64
  %310 = getelementptr inbounds [100 x i64], ptr @pw, i64 0, i64 %309
  %311 = load i64, ptr %310, align 8, !tbaa !9
  %312 = load i32, ptr %29, align 4, !tbaa !5
  %313 = sub nsw i32 %312, 1
  %314 = sext i32 %313 to i64
  %315 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %314)
          to label %316 unwind label %389

316:                                              ; preds = %304
  %317 = load i8, ptr %315, align 1, !tbaa !16
  %318 = sext i8 %317 to i64
  %319 = mul nsw i64 %311, %318
  %320 = srem i64 %319, 999998727899999
  %321 = add nsw i64 %305, %320
  store i64 %321, ptr %27, align 8, !tbaa !9
  %322 = load i64, ptr %27, align 8, !tbaa !9
  %323 = srem i64 %322, 999998727899999
  store i64 %323, ptr %27, align 8, !tbaa !9
  %324 = load i64, ptr %28, align 8, !tbaa !9
  %325 = mul nsw i64 %324, 31
  %326 = srem i64 %325, 999998727899999
  %327 = load i32, ptr %29, align 4, !tbaa !5
  %328 = sub nsw i32 %327, 1
  %329 = sext i32 %328 to i64
  %330 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %329)
          to label %331 unwind label %389

331:                                              ; preds = %316
  %332 = load i8, ptr %330, align 1, !tbaa !16
  %333 = sext i8 %332 to i64
  %334 = add nsw i64 %326, %333
  %335 = srem i64 %334, 999998727899999
  store i64 %335, ptr %28, align 8, !tbaa !9
  %336 = load i64, ptr %24, align 8, !tbaa !9
  %337 = load i32, ptr %23, align 4, !tbaa !5
  %338 = load i32, ptr %29, align 4, !tbaa !5
  %339 = sub nsw i32 %337, %338
  %340 = add nsw i32 %339, 1
  %341 = sext i32 %340 to i64
  %342 = getelementptr inbounds [100 x i64], ptr @pw, i64 0, i64 %341
  %343 = load i64, ptr %342, align 8, !tbaa !9
  %344 = mul nsw i64 %336, %343
  %345 = srem i64 %344, 999998727899999
  %346 = load i64, ptr %27, align 8, !tbaa !9
  %347 = add nsw i64 %345, %346
  %348 = srem i64 %347, 999998727899999
  %349 = load i64, ptr %28, align 8, !tbaa !9
  %350 = load i32, ptr %22, align 4, !tbaa !5
  %351 = load i32, ptr %26, align 4, !tbaa !5
  %352 = sub nsw i32 %350, %351
  %353 = add nsw i32 %352, 1
  %354 = sext i32 %353 to i64
  %355 = getelementptr inbounds [100 x i64], ptr @pw, i64 0, i64 %354
  %356 = load i64, ptr %355, align 8, !tbaa !9
  %357 = mul nsw i64 %349, %356
  %358 = srem i64 %357, 999998727899999
  %359 = load i64, ptr %25, align 8, !tbaa !9
  %360 = add nsw i64 %358, %359
  %361 = srem i64 %360, 999998727899999
  %362 = icmp eq i64 %348, %361
  br i1 %362, label %363, label %397

363:                                              ; preds = %331
  %364 = load i32, ptr %22, align 4, !tbaa !5
  %365 = sext i32 %364 to i64
  %366 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %365
  %367 = load i32, ptr %23, align 4, !tbaa !5
  %368 = sext i32 %367 to i64
  %369 = getelementptr inbounds [100 x i64], ptr %366, i64 0, i64 %368
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %370 = load i32, ptr %26, align 4, !tbaa !5
  %371 = sub nsw i32 %370, 1
  %372 = sext i32 %371 to i64
  %373 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %372
  %374 = load i32, ptr %29, align 4, !tbaa !5
  %375 = sub nsw i32 %374, 1
  %376 = sext i32 %375 to i64
  %377 = getelementptr inbounds [100 x i64], ptr %373, i64 0, i64 %376
  %378 = load i64, ptr %377, align 8, !tbaa !9
  %379 = add nsw i64 %378, 1
  store i64 %379, ptr %30, align 8, !tbaa !9
  %380 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %369, ptr noundef nonnull align 8 dereferenceable(8) %30)
          to label %381 unwind label %393

381:                                              ; preds = %363
  %382 = load i64, ptr %380, align 8, !tbaa !9
  %383 = load i32, ptr %22, align 4, !tbaa !5
  %384 = sext i32 %383 to i64
  %385 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %384
  %386 = load i32, ptr %23, align 4, !tbaa !5
  %387 = sext i32 %386 to i64
  %388 = getelementptr inbounds [100 x i64], ptr %385, i64 0, i64 %387
  store i64 %382, ptr %388, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br label %397

389:                                              ; preds = %316, %304
  %390 = landingpad { ptr, i32 }
          cleanup
  %391 = extractvalue { ptr, i32 } %390, 0
  store ptr %391, ptr %3, align 8
  %392 = extractvalue { ptr, i32 } %390, 1
  store i32 %392, ptr %4, align 4
  br label %505

393:                                              ; preds = %363
  %394 = landingpad { ptr, i32 }
          cleanup
  %395 = extractvalue { ptr, i32 } %394, 0
  store ptr %395, ptr %3, align 8
  %396 = extractvalue { ptr, i32 } %394, 1
  store i32 %396, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br label %505

397:                                              ; preds = %381, %331
  %398 = load i64, ptr %24, align 8, !tbaa !9
  %399 = load i64, ptr %25, align 8, !tbaa !9
  %400 = icmp eq i64 %398, %399
  br i1 %400, label %401, label %435

401:                                              ; preds = %397
  %402 = load i64, ptr %27, align 8, !tbaa !9
  %403 = load i64, ptr %28, align 8, !tbaa !9
  %404 = icmp eq i64 %402, %403
  br i1 %404, label %405, label %435

405:                                              ; preds = %401
  %406 = load i32, ptr %22, align 4, !tbaa !5
  %407 = sext i32 %406 to i64
  %408 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %407
  %409 = load i32, ptr %23, align 4, !tbaa !5
  %410 = sext i32 %409 to i64
  %411 = getelementptr inbounds [100 x i64], ptr %408, i64 0, i64 %410
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %412 = load i32, ptr %26, align 4, !tbaa !5
  %413 = sub nsw i32 %412, 1
  %414 = sext i32 %413 to i64
  %415 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %414
  %416 = load i32, ptr %29, align 4, !tbaa !5
  %417 = sub nsw i32 %416, 1
  %418 = sext i32 %417 to i64
  %419 = getelementptr inbounds [100 x i64], ptr %415, i64 0, i64 %418
  %420 = load i64, ptr %419, align 8, !tbaa !9
  %421 = add nsw i64 %420, 2
  store i64 %421, ptr %31, align 8, !tbaa !9
  %422 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %411, ptr noundef nonnull align 8 dereferenceable(8) %31)
          to label %423 unwind label %431

423:                                              ; preds = %405
  %424 = load i64, ptr %422, align 8, !tbaa !9
  %425 = load i32, ptr %22, align 4, !tbaa !5
  %426 = sext i32 %425 to i64
  %427 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %426
  %428 = load i32, ptr %23, align 4, !tbaa !5
  %429 = sext i32 %428 to i64
  %430 = getelementptr inbounds [100 x i64], ptr %427, i64 0, i64 %429
  store i64 %424, ptr %430, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  br label %435

431:                                              ; preds = %405
  %432 = landingpad { ptr, i32 }
          cleanup
  %433 = extractvalue { ptr, i32 } %432, 0
  store ptr %433, ptr %3, align 8
  %434 = extractvalue { ptr, i32 } %432, 1
  store i32 %434, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  br label %505

435:                                              ; preds = %423, %401, %397
  %436 = load i64, ptr %24, align 8, !tbaa !9
  %437 = load i64, ptr %25, align 8, !tbaa !9
  %438 = icmp eq i64 %436, %437
  br i1 %438, label %439, label %468

439:                                              ; preds = %435
  %440 = load i32, ptr %22, align 4, !tbaa !5
  %441 = sext i32 %440 to i64
  %442 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %441
  %443 = load i32, ptr %23, align 4, !tbaa !5
  %444 = sext i32 %443 to i64
  %445 = getelementptr inbounds [100 x i64], ptr %442, i64 0, i64 %444
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  %446 = load i32, ptr %26, align 4, !tbaa !5
  %447 = sub nsw i32 %446, 1
  %448 = sext i32 %447 to i64
  %449 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %448
  %450 = load i32, ptr %23, align 4, !tbaa !5
  %451 = sext i32 %450 to i64
  %452 = getelementptr inbounds [100 x i64], ptr %449, i64 0, i64 %451
  %453 = load i64, ptr %452, align 8, !tbaa !9
  %454 = add nsw i64 %453, 1
  store i64 %454, ptr %32, align 8, !tbaa !9
  %455 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %445, ptr noundef nonnull align 8 dereferenceable(8) %32)
          to label %456 unwind label %464

456:                                              ; preds = %439
  %457 = load i64, ptr %455, align 8, !tbaa !9
  %458 = load i32, ptr %22, align 4, !tbaa !5
  %459 = sext i32 %458 to i64
  %460 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %459
  %461 = load i32, ptr %23, align 4, !tbaa !5
  %462 = sext i32 %461 to i64
  %463 = getelementptr inbounds [100 x i64], ptr %460, i64 0, i64 %462
  store i64 %457, ptr %463, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  br label %468

464:                                              ; preds = %439
  %465 = landingpad { ptr, i32 }
          cleanup
  %466 = extractvalue { ptr, i32 } %465, 0
  store ptr %466, ptr %3, align 8
  %467 = extractvalue { ptr, i32 } %465, 1
  store i32 %467, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  br label %505

468:                                              ; preds = %456, %435
  %469 = load i64, ptr %27, align 8, !tbaa !9
  %470 = load i64, ptr %28, align 8, !tbaa !9
  %471 = icmp eq i64 %469, %470
  br i1 %471, label %472, label %501

472:                                              ; preds = %468
  %473 = load i32, ptr %22, align 4, !tbaa !5
  %474 = sext i32 %473 to i64
  %475 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %474
  %476 = load i32, ptr %23, align 4, !tbaa !5
  %477 = sext i32 %476 to i64
  %478 = getelementptr inbounds [100 x i64], ptr %475, i64 0, i64 %477
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  %479 = load i32, ptr %22, align 4, !tbaa !5
  %480 = sext i32 %479 to i64
  %481 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %480
  %482 = load i32, ptr %29, align 4, !tbaa !5
  %483 = sub nsw i32 %482, 1
  %484 = sext i32 %483 to i64
  %485 = getelementptr inbounds [100 x i64], ptr %481, i64 0, i64 %484
  %486 = load i64, ptr %485, align 8, !tbaa !9
  %487 = add nsw i64 %486, 1
  store i64 %487, ptr %33, align 8, !tbaa !9
  %488 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %478, ptr noundef nonnull align 8 dereferenceable(8) %33)
          to label %489 unwind label %497

489:                                              ; preds = %472
  %490 = load i64, ptr %488, align 8, !tbaa !9
  %491 = load i32, ptr %22, align 4, !tbaa !5
  %492 = sext i32 %491 to i64
  %493 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %492
  %494 = load i32, ptr %23, align 4, !tbaa !5
  %495 = sext i32 %494 to i64
  %496 = getelementptr inbounds [100 x i64], ptr %493, i64 0, i64 %495
  store i64 %490, ptr %496, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  br label %501

497:                                              ; preds = %472
  %498 = landingpad { ptr, i32 }
          cleanup
  %499 = extractvalue { ptr, i32 } %498, 0
  store ptr %499, ptr %3, align 8
  %500 = extractvalue { ptr, i32 } %498, 1
  store i32 %500, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  br label %505

501:                                              ; preds = %489, %468
  br label %502

502:                                              ; preds = %501
  %503 = load i32, ptr %29, align 4, !tbaa !5
  %504 = add nsw i32 %503, -1
  store i32 %504, ptr %29, align 4, !tbaa !5
  br label %296, !llvm.loop !25

505:                                              ; preds = %497, %464, %431, %393, %389
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  br label %510

506:                                              ; preds = %299
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  br label %507

507:                                              ; preds = %506
  %508 = load i32, ptr %26, align 4, !tbaa !5
  %509 = add nsw i32 %508, -1
  store i32 %509, ptr %26, align 4, !tbaa !5
  br label %259, !llvm.loop !26

510:                                              ; preds = %505, %300
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %535

511:                                              ; preds = %262
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %512

512:                                              ; preds = %511
  %513 = load i32, ptr %23, align 4, !tbaa !5
  %514 = add nsw i32 %513, 1
  store i32 %514, ptr %23, align 4, !tbaa !5
  br label %246, !llvm.loop !27

515:                                              ; preds = %250
  br label %516

516:                                              ; preds = %515
  %517 = load i32, ptr %22, align 4, !tbaa !5
  %518 = add nsw i32 %517, 1
  store i32 %518, ptr %22, align 4, !tbaa !5
  br label %240, !llvm.loop !28

519:                                              ; preds = %244
  %520 = load i32, ptr %5, align 4, !tbaa !5
  %521 = sext i32 %520 to i64
  %522 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %521
  %523 = load i32, ptr %6, align 4, !tbaa !5
  %524 = sext i32 %523 to i64
  %525 = getelementptr inbounds [100 x i64], ptr %522, i64 0, i64 %524
  %526 = load i64, ptr %525, align 8, !tbaa !9
  %527 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %526)
          to label %528 unwind label %531

528:                                              ; preds = %519
  %529 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %527, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %530 unwind label %531

530:                                              ; preds = %528
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #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
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %1) #6
  ret void

531:                                              ; preds = %528, %519
  %532 = landingpad { ptr, i32 }
          cleanup
  %533 = extractvalue { ptr, i32 } %532, 0
  store ptr %533, ptr %3, align 8
  %534 = extractvalue { ptr, i32 } %532, 1
  store i32 %534, ptr %4, align 4
  br label %535

535:                                              ; preds = %531, %510, %234, %152
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %536

536:                                              ; preds = %535, %47
  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
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %1) #6
  br label %537

537:                                              ; preds = %536
  %538 = load ptr, ptr %3, align 8
  %539 = load i32, ptr %4, align 4
  %540 = insertvalue { ptr, i32 } poison, ptr %538, 0
  %541 = insertvalue { ptr, i32 } %540, i32 %539, 1
  resume { ptr, i32 } %541
}

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !12}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12}
!27 = distinct !{!27, !12}
!28 = distinct !{!28, !12}


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

@pw = external dso_local local_unnamed_addr global [100 x i64], align 16
@dp = external dso_local global [100 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 uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %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 %33

10:                                               ; preds = %0
  %11 = 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) %9, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %12 unwind label %33

12:                                               ; preds = %10
  %13 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  %14 = trunc i64 %13 to i32
  %15 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %16 = trunc i64 %15 to i32
  %.not161 = icmp slt i32 %14, 0
  br i1 %.not161, label %.preheader155.thread, label %.preheader158.lr.ph

.preheader158.lr.ph:                              ; preds = %12
  %.not151159 = icmp slt i32 %16, 0
  br i1 %.not151159, label %.preheader157, label %.preheader158.preheader

.preheader158.preheader:                          ; preds = %.preheader158.lr.ph
  %17 = shl i64 %15, 3
  %18 = add nuw nsw i64 %17, 8
  %19 = and i64 %18, 34359738360
  %20 = add nuw nsw i64 %13, 1
  %wide.trip.count = and i64 %20, 4294967295
  %21 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %20, 7
  %22 = icmp ult i64 %21, 7
  br i1 %22, label %.preheader157.loopexit.unr-lcssa, label %.preheader158.preheader.new

.preheader158.preheader.new:                      ; preds = %.preheader158.preheader
  %unroll_iter = sub nsw i64 %wide.trip.count, %xtraiter
  br label %.preheader158

.preheader158:                                    ; preds = %.preheader158, %.preheader158.preheader.new
  %indvar = phi i64 [ 0, %.preheader158.preheader.new ], [ %indvar.next.7, %.preheader158 ]
  %niter = phi i64 [ 0, %.preheader158.preheader.new ], [ %niter.next.7, %.preheader158 ]
  %23 = mul nuw nsw i64 %indvar, 800
  %scevgep = getelementptr i8, ptr @dp, i64 %23
  call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 0, i64 %19, i1 false), !tbaa !5
  %24 = mul nuw i64 %indvar, 800
  %gep = getelementptr i8, ptr getelementptr (i8, ptr @dp, i64 800), i64 %24
  call void @llvm.memset.p0.i64(ptr align 16 %gep, i8 0, i64 %19, i1 false), !tbaa !5
  %25 = mul nuw i64 %indvar, 800
  %gep261 = getelementptr i8, ptr getelementptr (i8, ptr @dp, i64 1600), i64 %25
  call void @llvm.memset.p0.i64(ptr align 16 %gep261, i8 0, i64 %19, i1 false), !tbaa !5
  %26 = mul nuw i64 %indvar, 800
  %gep262 = getelementptr i8, ptr getelementptr (i8, ptr @dp, i64 2400), i64 %26
  call void @llvm.memset.p0.i64(ptr align 16 %gep262, i8 0, i64 %19, i1 false), !tbaa !5
  %27 = mul nuw i64 %indvar, 800
  %gep263 = getelementptr i8, ptr getelementptr (i8, ptr @dp, i64 3200), i64 %27
  call void @llvm.memset.p0.i64(ptr align 16 %gep263, i8 0, i64 %19, i1 false), !tbaa !5
  %28 = mul nuw i64 %indvar, 800
  %gep264 = getelementptr i8, ptr getelementptr (i8, ptr @dp, i64 4000), i64 %28
  call void @llvm.memset.p0.i64(ptr align 16 %gep264, i8 0, i64 %19, i1 false), !tbaa !5
  %29 = mul nuw i64 %indvar, 800
  %gep265 = getelementptr i8, ptr getelementptr (i8, ptr @dp, i64 4800), i64 %29
  call void @llvm.memset.p0.i64(ptr align 16 %gep265, i8 0, i64 %19, i1 false), !tbaa !5
  %30 = mul nuw i64 %indvar, 800
  %gep266 = getelementptr i8, ptr getelementptr (i8, ptr @dp, i64 5600), i64 %30
  call void @llvm.memset.p0.i64(ptr align 16 %gep266, i8 0, i64 %19, i1 false), !tbaa !5
  %indvar.next.7 = add nuw nsw i64 %indvar, 8
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %.preheader157.loopexit.unr-lcssa, label %.preheader158, !llvm.loop !9

.preheader157.loopexit.unr-lcssa:                 ; preds = %.preheader158, %.preheader158.preheader
  %indvar.unr = phi i64 [ 0, %.preheader158.preheader ], [ %indvar.next.7, %.preheader158 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader157, label %.preheader158.epil

.preheader158.epil:                               ; preds = %.preheader157.loopexit.unr-lcssa, %.preheader158.epil
  %indvar.epil = phi i64 [ %indvar.next.epil, %.preheader158.epil ], [ %indvar.unr, %.preheader157.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.preheader158.epil ], [ 0, %.preheader157.loopexit.unr-lcssa ]
  %31 = mul nuw nsw i64 %indvar.epil, 800
  %scevgep.epil = getelementptr i8, ptr @dp, i64 %31
  call void @llvm.memset.p0.i64(ptr align 16 %scevgep.epil, i8 0, i64 %19, i1 false), !tbaa !5
  %indvar.next.epil = add nuw nsw i64 %indvar.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader157, label %.preheader158.epil, !llvm.loop !11

.preheader157:                                    ; preds = %.preheader157.loopexit.unr-lcssa, %.preheader158.epil, %.preheader158.lr.ph
  %.not141168 = icmp eq i32 %14, 0
  br i1 %.not141168, label %.preheader155, label %.lr.ph170.preheader

.lr.ph170.preheader:                              ; preds = %.preheader157
  %32 = add nuw nsw i64 %13, 2
  %wide.trip.count215 = and i64 %32, 4294967295
  br label %.lr.ph170

33:                                               ; preds = %10, %0
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %166

.preheader155:                                    ; preds = %38, %.preheader157
  %.not142178 = icmp slt i32 %16, 1
  br i1 %.not142178, label %._crit_edge193, label %.lr.ph180.preheader

.preheader155.thread:                             ; preds = %12
  %.not142178256 = icmp slt i32 %16, 1
  br i1 %.not142178256, label %._crit_edge193, label %.lr.ph180.preheader

.lr.ph180.preheader:                              ; preds = %.preheader155.thread, %.preheader155
  %.not141168254257 = phi i1 [ true, %.preheader155.thread ], [ %.not141168, %.preheader155 ]
  %35 = add nuw nsw i64 %15, 2
  %wide.trip.count235 = and i64 %35, 4294967295
  br label %.lr.ph180

.lr.ph170:                                        ; preds = %.lr.ph170.preheader, %38
  %indvars.iv210 = phi i64 [ 2, %.lr.ph170.preheader ], [ %indvars.iv.next211, %38 ]
  %indvars.iv = phi i64 [ 1, %.lr.ph170.preheader ], [ %indvars.iv.next, %38 ]
  %36 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %indvars.iv
  store i64 999998727899999, ptr %36, align 16, !tbaa !5
  br label %.preheader156

.preheader156:                                    ; preds = %.lr.ph170, %51
  %indvars.iv201 = phi i64 [ 1, %.lr.ph170 ], [ %indvars.iv.next202, %51 ]
  %37 = icmp ult i64 %indvars.iv201, %indvars.iv
  br i1 %37, label %.lr.ph, label %.critedge

38:                                               ; preds = %51
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %indvars.iv.next211 = add nuw nsw i64 %indvars.iv210, 1
  %exitcond216.not = icmp eq i64 %indvars.iv.next211, %wide.trip.count215
  br i1 %exitcond216.not, label %.preheader155, label %.lr.ph170, !llvm.loop !13

._crit_edge166:                                   ; preds = %.lr.ph
  br i1 %spec.select, label %.critedge, label %51

.lr.ph:                                           ; preds = %.preheader156, %.lr.ph
  %indvars.iv203 = phi i64 [ %indvars.iv.next204, %.lr.ph ], [ %indvars.iv201, %.preheader156 ]
  %indvars.iv199 = phi i64 [ %indvars.iv.next200, %.lr.ph ], [ %indvars.iv, %.preheader156 ]
  %.0131163 = phi i1 [ %spec.select, %.lr.ph ], [ true, %.preheader156 ]
  %39 = add nsw i64 %indvars.iv203, -1
  %40 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %39)
  %41 = load i8, ptr %40, align 1, !tbaa !14
  %indvars.iv.next200 = add nsw i64 %indvars.iv199, -1
  %42 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv.next200)
  %43 = load i8, ptr %42, align 1, !tbaa !14
  %.not150 = icmp eq i8 %41, %43
  %spec.select = select i1 %.not150, i1 %.0131163, i1 false
  %indvars.iv.next204 = add nuw nsw i64 %indvars.iv203, 1
  %44 = icmp slt i64 %indvars.iv.next204, %indvars.iv.next200
  br i1 %44, label %.lr.ph, label %._crit_edge166, !llvm.loop !15

.critedge:                                        ; preds = %.preheader156, %._crit_edge166
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %45 = add nsw i64 %indvars.iv201, -1
  %46 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %45
  %47 = load i64, ptr %46, align 16, !tbaa !5
  %48 = add nsw i64 %47, 1
  store i64 %48, ptr %3, align 8, !tbaa !5
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %50 = load i64, ptr %49, align 8, !tbaa !5
  store i64 %50, ptr %36, align 16, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  br label %51

51:                                               ; preds = %.critedge, %._crit_edge166
  %indvars.iv.next202 = add nuw nsw i64 %indvars.iv201, 1
  %exitcond209.not = icmp eq i64 %indvars.iv.next202, %indvars.iv210
  br i1 %exitcond209.not, label %38, label %.preheader156, !llvm.loop !16

.preheader153:                                    ; preds = %56
  br i1 %.not141168254257, label %._crit_edge193, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader153
  %52 = add nuw nsw i64 %15, 1
  %53 = add nuw nsw i64 %13, 1
  %wide.trip.count251 = and i64 %53, 4294967295
  %wide.trip.count248 = and i64 %52, 4294967295
  br label %.preheader

.lr.ph180:                                        ; preds = %.lr.ph180.preheader, %56
  %indvars.iv230 = phi i64 [ 2, %.lr.ph180.preheader ], [ %indvars.iv.next231, %56 ]
  %indvars.iv217 = phi i64 [ 1, %.lr.ph180.preheader ], [ %indvars.iv.next218, %56 ]
  %54 = getelementptr inbounds [100 x i64], ptr @dp, i64 0, i64 %indvars.iv217
  store i64 999998727899999, ptr %54, align 8, !tbaa !5
  br label %.preheader154

.preheader154:                                    ; preds = %.lr.ph180, %69
  %indvars.iv221 = phi i64 [ 1, %.lr.ph180 ], [ %indvars.iv.next222, %69 ]
  %55 = icmp ult i64 %indvars.iv221, %indvars.iv217
  br i1 %55, label %.lr.ph174, label %.critedge194

56:                                               ; preds = %69
  %indvars.iv.next218 = add nuw nsw i64 %indvars.iv217, 1
  %indvars.iv.next231 = add nuw nsw i64 %indvars.iv230, 1
  %exitcond236.not = icmp eq i64 %indvars.iv.next231, %wide.trip.count235
  br i1 %exitcond236.not, label %.preheader153, label %.lr.ph180, !llvm.loop !17

._crit_edge175:                                   ; preds = %.lr.ph174
  br i1 %spec.select152, label %.critedge194, label %69

.lr.ph174:                                        ; preds = %.preheader154, %.lr.ph174
  %indvars.iv223 = phi i64 [ %indvars.iv.next224, %.lr.ph174 ], [ %indvars.iv221, %.preheader154 ]
  %indvars.iv219 = phi i64 [ %indvars.iv.next220, %.lr.ph174 ], [ %indvars.iv217, %.preheader154 ]
  %.0126171 = phi i1 [ %spec.select152, %.lr.ph174 ], [ true, %.preheader154 ]
  %57 = add nsw i64 %indvars.iv223, -1
  %58 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %57)
  %59 = load i8, ptr %58, align 1, !tbaa !14
  %indvars.iv.next220 = add nsw i64 %indvars.iv219, -1
  %60 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %indvars.iv.next220)
  %61 = load i8, ptr %60, align 1, !tbaa !14
  %.not148 = icmp eq i8 %59, %61
  %spec.select152 = select i1 %.not148, i1 %.0126171, i1 false
  %indvars.iv.next224 = add nuw nsw i64 %indvars.iv223, 1
  %62 = icmp slt i64 %indvars.iv.next224, %indvars.iv.next220
  br i1 %62, label %.lr.ph174, label %._crit_edge175, !llvm.loop !18

.critedge194:                                     ; preds = %.preheader154, %._crit_edge175
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %63 = add nsw i64 %indvars.iv221, -1
  %64 = getelementptr inbounds [100 x i64], ptr @dp, i64 0, i64 %63
  %65 = load i64, ptr %64, align 8, !tbaa !5
  %66 = add nsw i64 %65, 1
  store i64 %66, ptr %4, align 8, !tbaa !5
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %68 = load i64, ptr %67, align 8, !tbaa !5
  store i64 %68, ptr %54, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %69

69:                                               ; preds = %.critedge194, %._crit_edge175
  %indvars.iv.next222 = add nuw nsw i64 %indvars.iv221, 1
  %exitcond229.not = icmp eq i64 %indvars.iv.next222, %indvars.iv230
  br i1 %exitcond229.not, label %56, label %.preheader154, !llvm.loop !19

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge190
  %indvars.iv242 = phi i64 [ 1, %.preheader.preheader ], [ %indvars.iv.next243, %._crit_edge190 ]
  br label %75

._crit_edge193:                                   ; preds = %._crit_edge190, %.preheader155, %.preheader155.thread, %.preheader153
  %sext = shl i64 %13, 32
  %70 = ashr exact i64 %sext, 32
  %sext144 = shl i64 %15, 32
  %71 = ashr exact i64 %sext144, 32
  %72 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %70, i64 %71
  %73 = load i64, ptr %72, align 8, !tbaa !5
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %73)
          to label %161 unwind label %164

._crit_edge190:                                   ; preds = %78
  %indvars.iv.next243 = add nuw nsw i64 %indvars.iv242, 1
  %exitcond252.not = icmp eq i64 %indvars.iv.next243, %wide.trip.count251
  br i1 %exitcond252.not, label %._crit_edge193, label %.preheader, !llvm.loop !20

75:                                               ; preds = %.preheader, %78
  %indvars.iv237 = phi i64 [ 1, %.preheader ], [ %indvars.iv.next238, %78 ]
  %76 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %indvars.iv242, i64 %indvars.iv237
  store i64 999998727899999, ptr %76, align 8, !tbaa !5
  br label %79

.loopexit:                                        ; preds = %159
  %77 = icmp sgt i64 %indvars.iv244, 1
  br i1 %77, label %79, label %78, !llvm.loop !21

78:                                               ; preds = %.loopexit
  %indvars.iv.next238 = add nuw nsw i64 %indvars.iv237, 1
  %exitcond249.not = icmp eq i64 %indvars.iv.next238, %wide.trip.count248
  br i1 %exitcond249.not, label %._crit_edge190, label %75, !llvm.loop !22

79:                                               ; preds = %75, %.loopexit
  %indvars.iv244 = phi i64 [ %indvars.iv242, %75 ], [ %indvars.iv.next245, %.loopexit ]
  %.0120185 = phi i64 [ 0, %75 ], [ %96, %.loopexit ]
  %.0121184 = phi i64 [ 0, %75 ], [ %89, %.loopexit ]
  %80 = sub nuw nsw i64 %indvars.iv242, %indvars.iv244
  %81 = getelementptr inbounds [100 x i64], ptr @pw, i64 0, i64 %80
  %82 = load i64, ptr %81, align 8, !tbaa !5
  %indvars.iv.next245 = add nsw i64 %indvars.iv244, -1
  %83 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv.next245)
  %84 = load i8, ptr %83, align 1, !tbaa !14
  %85 = sext i8 %84 to i64
  %86 = mul nsw i64 %82, %85
  %87 = srem i64 %86, 999998727899999
  %88 = add nsw i64 %87, %.0121184
  %89 = srem i64 %88, 999998727899999
  %90 = mul nsw i64 %.0120185, 31
  %91 = srem i64 %90, 999998727899999
  %92 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv.next245)
  %93 = load i8, ptr %92, align 1, !tbaa !14
  %94 = sext i8 %93 to i64
  %95 = add nsw i64 %91, %94
  %96 = srem i64 %95, 999998727899999
  %97 = add nuw nsw i64 %80, 1
  %98 = getelementptr inbounds [100 x i64], ptr @pw, i64 0, i64 %97
  %99 = icmp eq i64 %89, %96
  %100 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %indvars.iv.next245, i64 %indvars.iv237
  br label %101

101:                                              ; preds = %79, %159
  %indvars.iv239 = phi i64 [ %indvars.iv237, %79 ], [ %indvars.iv.next240, %159 ]
  %.0117182 = phi i64 [ 0, %79 ], [ %118, %159 ]
  %.0118181 = phi i64 [ 0, %79 ], [ %111, %159 ]
  %102 = sub nuw nsw i64 %indvars.iv237, %indvars.iv239
  %103 = getelementptr inbounds [100 x i64], ptr @pw, i64 0, i64 %102
  %104 = load i64, ptr %103, align 8, !tbaa !5
  %indvars.iv.next240 = add nsw i64 %indvars.iv239, -1
  %105 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %indvars.iv.next240)
  %106 = load i8, ptr %105, align 1, !tbaa !14
  %107 = sext i8 %106 to i64
  %108 = mul nsw i64 %104, %107
  %109 = srem i64 %108, 999998727899999
  %110 = add nsw i64 %109, %.0118181
  %111 = srem i64 %110, 999998727899999
  %112 = mul nsw i64 %.0117182, 31
  %113 = srem i64 %112, 999998727899999
  %114 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %indvars.iv.next240)
  %115 = load i8, ptr %114, align 1, !tbaa !14
  %116 = sext i8 %115 to i64
  %117 = add nsw i64 %113, %116
  %118 = srem i64 %117, 999998727899999
  %119 = add nuw nsw i64 %102, 1
  %120 = getelementptr inbounds [100 x i64], ptr @pw, i64 0, i64 %119
  %121 = load i64, ptr %120, align 8, !tbaa !5
  %122 = mul nsw i64 %121, %89
  %123 = srem i64 %122, 999998727899999
  %124 = add nsw i64 %123, %111
  %125 = srem i64 %124, 999998727899999
  %126 = load i64, ptr %98, align 8, !tbaa !5
  %127 = mul nsw i64 %118, %126
  %128 = srem i64 %127, 999998727899999
  %129 = add nsw i64 %128, %96
  %130 = srem i64 %129, 999998727899999
  %131 = icmp eq i64 %125, %130
  br i1 %131, label %132, label %138

132:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %133 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %indvars.iv.next245, i64 %indvars.iv.next240
  %134 = load i64, ptr %133, align 8, !tbaa !5
  %135 = add nsw i64 %134, 1
  store i64 %135, ptr %5, align 8, !tbaa !5
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %137 = load i64, ptr %136, align 8, !tbaa !5
  store i64 %137, ptr %76, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %138

138:                                              ; preds = %132, %101
  %139 = icmp eq i64 %111, %118
  %or.cond = select i1 %99, i1 %139, i1 false
  br i1 %or.cond, label %140, label %146

140:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %141 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %indvars.iv.next245, i64 %indvars.iv.next240
  %142 = load i64, ptr %141, align 8, !tbaa !5
  %143 = add nsw i64 %142, 2
  store i64 %143, ptr %6, align 8, !tbaa !5
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %145 = load i64, ptr %144, align 8, !tbaa !5
  store i64 %145, ptr %76, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %146

146:                                              ; preds = %140, %138
  br i1 %99, label %147, label %152

147:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %148 = load i64, ptr %100, align 8, !tbaa !5
  %149 = add nsw i64 %148, 1
  store i64 %149, ptr %7, align 8, !tbaa !5
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %151 = load i64, ptr %150, align 8, !tbaa !5
  store i64 %151, ptr %76, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %152

152:                                              ; preds = %147, %146
  br i1 %139, label %153, label %159

153:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %154 = getelementptr inbounds [100 x [100 x i64]], ptr @dp, i64 0, i64 %indvars.iv242, i64 %indvars.iv.next240
  %155 = load i64, ptr %154, align 8, !tbaa !5
  %156 = add nsw i64 %155, 1
  store i64 %156, ptr %8, align 8, !tbaa !5
  %157 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %158 = load i64, ptr %157, align 8, !tbaa !5
  store i64 %158, ptr %76, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %159

159:                                              ; preds = %152, %153
  %160 = icmp sgt i64 %indvars.iv239, 1
  br i1 %160, label %101, label %.loopexit, !llvm.loop !23

161:                                              ; preds = %._crit_edge193
  %162 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %163 unwind label %164

163:                                              ; preds = %161
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #7
  ret void

164:                                              ; preds = %161, %._crit_edge193
  %165 = landingpad { ptr, i32 }
          cleanup
  br label %166

166:                                              ; preds = %164, %33
  %.pn = phi { ptr, i32 } [ %165, %164 ], [ %34, %33 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn
}

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

; Function Attrs: mustprogress 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 #3

declare i32 @__gxx_personality_v0(...)

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

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) 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 #0 align 2

; 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 #0 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.unroll.disable"}
!13 = distinct !{!13, !10}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}


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