; LLVM IR from AdarshGaur/Competitive-Programming :: Codeforces/Codeforces Global Round 7/D1. Prefix-Suffix Palindrome (Easy version)_c1faafe3 (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] }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; 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 ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i32, align 4
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca %"class.std::__cxx11::basic_string", align 8
  %31 = alloca %"class.std::__cxx11::basic_string", align 8
  %32 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %33 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %34 = alloca %"class.std::__cxx11::basic_string", align 8
  %35 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %1) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  %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) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %37 unwind label %49

37:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %38 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  store i64 %38, ptr %4, align 8, !tbaa !5
  %39 = load i64, ptr %4, align 8, !tbaa !5
  %40 = call ptr @llvm.stacksave.p0()
  store ptr %40, ptr %5, align 8
  %41 = alloca i64, i64 %39, align 16
  store i64 %39, ptr %6, align 8
  %42 = load i64, ptr %4, align 8, !tbaa !5
  %43 = alloca i64, i64 %42, align 16
  store i64 %42, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store i64 0, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store i64 0, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store i64 -1, ptr %10, align 8, !tbaa !5
  br label %44

44:                                               ; preds = %131, %37
  %45 = load i64, ptr %8, align 8, !tbaa !5
  %46 = load i64, ptr %4, align 8, !tbaa !5
  %47 = icmp slt i64 %45, %46
  br i1 %47, label %53, label %48

48:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %135

49:                                               ; preds = %0
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %2, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %3, align 4
  br label %463

53:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %54 = load i64, ptr %8, align 8, !tbaa !5
  %55 = load i64, ptr %10, align 8, !tbaa !5
  %56 = icmp sgt i64 %54, %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  br i1 %56, label %57, label %58

57:                                               ; preds = %53
  br label %71

58:                                               ; preds = %53
  %59 = load i64, ptr %9, align 8, !tbaa !5
  %60 = load i64, ptr %10, align 8, !tbaa !5
  %61 = load i64, ptr %8, align 8, !tbaa !5
  %62 = sub nsw i64 %60, %61
  %63 = add nsw i64 %59, %62
  %64 = getelementptr inbounds i64, ptr %41, i64 %63
  %65 = load i64, ptr %10, align 8, !tbaa !5
  %66 = load i64, ptr %8, align 8, !tbaa !5
  %67 = sub nsw i64 %65, %66
  store i64 %67, ptr %12, align 8, !tbaa !5
  %68 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %69 unwind label %105

69:                                               ; preds = %58
  %70 = load i64, ptr %68, align 8, !tbaa !5
  br label %71

71:                                               ; preds = %69, %57
  %72 = phi i64 [ 1, %57 ], [ %70, %69 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  store i64 %72, ptr %11, align 8, !tbaa !5
  br label %73

73:                                               ; preds = %102, %71
  %74 = load i64, ptr %8, align 8, !tbaa !5
  %75 = load i64, ptr %11, align 8, !tbaa !5
  %76 = add nsw i64 %74, %75
  %77 = load i64, ptr %4, align 8, !tbaa !5
  %78 = icmp slt i64 %76, %77
  br i1 %78, label %79, label %100

79:                                               ; preds = %73
  %80 = load i64, ptr %8, align 8, !tbaa !5
  %81 = load i64, ptr %11, align 8, !tbaa !5
  %82 = sub nsw i64 %80, %81
  %83 = icmp sge i64 %82, 0
  br i1 %83, label %84, label %100

84:                                               ; preds = %79
  %85 = load i64, ptr %8, align 8, !tbaa !5
  %86 = load i64, ptr %11, align 8, !tbaa !5
  %87 = add nsw i64 %85, %86
  %88 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %87)
          to label %89 unwind label %109

89:                                               ; preds = %84
  %90 = load i8, ptr %88, align 1, !tbaa !9
  %91 = sext i8 %90 to i32
  %92 = load i64, ptr %8, align 8, !tbaa !5
  %93 = load i64, ptr %11, align 8, !tbaa !5
  %94 = sub nsw i64 %92, %93
  %95 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %94)
          to label %96 unwind label %109

96:                                               ; preds = %89
  %97 = load i8, ptr %95, align 1, !tbaa !9
  %98 = sext i8 %97 to i32
  %99 = icmp eq i32 %91, %98
  br label %100

100:                                              ; preds = %96, %79, %73
  %101 = phi i1 [ false, %79 ], [ false, %73 ], [ %99, %96 ]
  br i1 %101, label %102, label %113

102:                                              ; preds = %100
  %103 = load i64, ptr %11, align 8, !tbaa !5
  %104 = add nsw i64 %103, 1
  store i64 %104, ptr %11, align 8, !tbaa !5
  br label %73, !llvm.loop !10

105:                                              ; preds = %58
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %2, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %134

109:                                              ; preds = %89, %84
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %2, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %3, align 4
  br label %134

113:                                              ; preds = %100
  %114 = load i64, ptr %11, align 8, !tbaa !5
  %115 = add nsw i64 %114, -1
  store i64 %115, ptr %11, align 8, !tbaa !5
  %116 = load i64, ptr %8, align 8, !tbaa !5
  %117 = getelementptr inbounds i64, ptr %41, i64 %116
  store i64 %114, ptr %117, align 8, !tbaa !5
  %118 = load i64, ptr %8, align 8, !tbaa !5
  %119 = load i64, ptr %11, align 8, !tbaa !5
  %120 = add nsw i64 %118, %119
  %121 = load i64, ptr %10, align 8, !tbaa !5
  %122 = icmp sgt i64 %120, %121
  br i1 %122, label %123, label %130

123:                                              ; preds = %113
  %124 = load i64, ptr %8, align 8, !tbaa !5
  %125 = load i64, ptr %11, align 8, !tbaa !5
  %126 = sub nsw i64 %124, %125
  store i64 %126, ptr %9, align 8, !tbaa !5
  %127 = load i64, ptr %8, align 8, !tbaa !5
  %128 = load i64, ptr %11, align 8, !tbaa !5
  %129 = add nsw i64 %127, %128
  store i64 %129, ptr %10, align 8, !tbaa !5
  br label %130

130:                                              ; preds = %123, %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %131

131:                                              ; preds = %130
  %132 = load i64, ptr %8, align 8, !tbaa !5
  %133 = add nsw i64 %132, 1
  store i64 %133, ptr %8, align 8, !tbaa !5
  br label %44, !llvm.loop !12

134:                                              ; preds = %109, %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %462

135:                                              ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store i64 0, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store i64 0, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store i64 -1, ptr %15, align 8, !tbaa !5
  br label %136

136:                                              ; preds = %226, %135
  %137 = load i64, ptr %13, align 8, !tbaa !5
  %138 = load i64, ptr %4, align 8, !tbaa !5
  %139 = icmp slt i64 %137, %138
  br i1 %139, label %141, label %140

140:                                              ; preds = %136
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %230

141:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %142 = load i64, ptr %13, align 8, !tbaa !5
  %143 = load i64, ptr %15, align 8, !tbaa !5
  %144 = icmp sgt i64 %142, %143
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  br i1 %144, label %145, label %146

145:                                              ; preds = %141
  br label %161

146:                                              ; preds = %141
  %147 = load i64, ptr %14, align 8, !tbaa !5
  %148 = load i64, ptr %15, align 8, !tbaa !5
  %149 = load i64, ptr %13, align 8, !tbaa !5
  %150 = sub nsw i64 %148, %149
  %151 = add nsw i64 %150, 1
  %152 = add nsw i64 %147, %151
  %153 = getelementptr inbounds i64, ptr %43, i64 %152
  %154 = load i64, ptr %15, align 8, !tbaa !5
  %155 = load i64, ptr %13, align 8, !tbaa !5
  %156 = sub nsw i64 %154, %155
  %157 = add nsw i64 %156, 1
  store i64 %157, ptr %17, align 8, !tbaa !5
  %158 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %153, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %159 unwind label %198

159:                                              ; preds = %146
  %160 = load i64, ptr %158, align 8, !tbaa !5
  br label %161

161:                                              ; preds = %159, %145
  %162 = phi i64 [ 0, %145 ], [ %160, %159 ]
  %163 = add nsw i64 %162, 1
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  store i64 %163, ptr %16, align 8, !tbaa !5
  br label %164

164:                                              ; preds = %195, %161
  %165 = load i64, ptr %13, align 8, !tbaa !5
  %166 = load i64, ptr %16, align 8, !tbaa !5
  %167 = add nsw i64 %165, %166
  %168 = sub nsw i64 %167, 1
  %169 = load i64, ptr %4, align 8, !tbaa !5
  %170 = icmp slt i64 %168, %169
  br i1 %170, label %171, label %193

171:                                              ; preds = %164
  %172 = load i64, ptr %13, align 8, !tbaa !5
  %173 = load i64, ptr %16, align 8, !tbaa !5
  %174 = sub nsw i64 %172, %173
  %175 = icmp sge i64 %174, 0
  br i1 %175, label %176, label %193

176:                                              ; preds = %171
  %177 = load i64, ptr %13, align 8, !tbaa !5
  %178 = load i64, ptr %16, align 8, !tbaa !5
  %179 = add nsw i64 %177, %178
  %180 = sub nsw i64 %179, 1
  %181 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %180)
          to label %182 unwind label %202

182:                                              ; preds = %176
  %183 = load i8, ptr %181, align 1, !tbaa !9
  %184 = sext i8 %183 to i32
  %185 = load i64, ptr %13, align 8, !tbaa !5
  %186 = load i64, ptr %16, align 8, !tbaa !5
  %187 = sub nsw i64 %185, %186
  %188 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %187)
          to label %189 unwind label %202

189:                                              ; preds = %182
  %190 = load i8, ptr %188, align 1, !tbaa !9
  %191 = sext i8 %190 to i32
  %192 = icmp eq i32 %184, %191
  br label %193

193:                                              ; preds = %189, %171, %164
  %194 = phi i1 [ false, %171 ], [ false, %164 ], [ %192, %189 ]
  br i1 %194, label %195, label %206

195:                                              ; preds = %193
  %196 = load i64, ptr %16, align 8, !tbaa !5
  %197 = add nsw i64 %196, 1
  store i64 %197, ptr %16, align 8, !tbaa !5
  br label %164, !llvm.loop !13

198:                                              ; preds = %146
  %199 = landingpad { ptr, i32 }
          cleanup
  %200 = extractvalue { ptr, i32 } %199, 0
  store ptr %200, ptr %2, align 8
  %201 = extractvalue { ptr, i32 } %199, 1
  store i32 %201, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %229

202:                                              ; preds = %182, %176
  %203 = landingpad { ptr, i32 }
          cleanup
  %204 = extractvalue { ptr, i32 } %203, 0
  store ptr %204, ptr %2, align 8
  %205 = extractvalue { ptr, i32 } %203, 1
  store i32 %205, ptr %3, align 4
  br label %229

206:                                              ; preds = %193
  %207 = load i64, ptr %16, align 8, !tbaa !5
  %208 = add nsw i64 %207, -1
  store i64 %208, ptr %16, align 8, !tbaa !5
  %209 = load i64, ptr %13, align 8, !tbaa !5
  %210 = getelementptr inbounds i64, ptr %43, i64 %209
  store i64 %208, ptr %210, align 8, !tbaa !5
  %211 = load i64, ptr %13, align 8, !tbaa !5
  %212 = load i64, ptr %16, align 8, !tbaa !5
  %213 = add nsw i64 %211, %212
  %214 = sub nsw i64 %213, 1
  %215 = load i64, ptr %15, align 8, !tbaa !5
  %216 = icmp sgt i64 %214, %215
  br i1 %216, label %217, label %225

217:                                              ; preds = %206
  %218 = load i64, ptr %13, align 8, !tbaa !5
  %219 = load i64, ptr %16, align 8, !tbaa !5
  %220 = sub nsw i64 %218, %219
  store i64 %220, ptr %14, align 8, !tbaa !5
  %221 = load i64, ptr %13, align 8, !tbaa !5
  %222 = load i64, ptr %16, align 8, !tbaa !5
  %223 = add nsw i64 %221, %222
  %224 = sub nsw i64 %223, 1
  store i64 %224, ptr %15, align 8, !tbaa !5
  br label %225

225:                                              ; preds = %217, %206
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %226

226:                                              ; preds = %225
  %227 = load i64, ptr %13, align 8, !tbaa !5
  %228 = add nsw i64 %227, 1
  store i64 %228, ptr %13, align 8, !tbaa !5
  br label %136, !llvm.loop !14

229:                                              ; preds = %202, %198
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %462

230:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  store i64 0, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %231 = load i64, ptr %4, align 8, !tbaa !5
  %232 = sub nsw i64 %231, 1
  store i64 %232, ptr %19, align 8, !tbaa !5
  br label %233

233:                                              ; preds = %251, %230
  %234 = load i64, ptr %18, align 8, !tbaa !5
  %235 = load i64, ptr %19, align 8, !tbaa !5
  %236 = icmp slt i64 %234, %235
  br i1 %236, label %237, label %249

237:                                              ; preds = %233
  %238 = load i64, ptr %18, align 8, !tbaa !5
  %239 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %238)
          to label %240 unwind label %256

240:                                              ; preds = %237
  %241 = load i8, ptr %239, align 1, !tbaa !9
  %242 = sext i8 %241 to i32
  %243 = load i64, ptr %19, align 8, !tbaa !5
  %244 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %243)
          to label %245 unwind label %256

245:                                              ; preds = %240
  %246 = load i8, ptr %244, align 1, !tbaa !9
  %247 = sext i8 %246 to i32
  %248 = icmp eq i32 %242, %247
  br label %249

249:                                              ; preds = %245, %233
  %250 = phi i1 [ false, %233 ], [ %248, %245 ]
  br i1 %250, label %251, label %260

251:                                              ; preds = %249
  %252 = load i64, ptr %18, align 8, !tbaa !5
  %253 = add nsw i64 %252, 1
  store i64 %253, ptr %18, align 8, !tbaa !5
  %254 = load i64, ptr %19, align 8, !tbaa !5
  %255 = add nsw i64 %254, -1
  store i64 %255, ptr %19, align 8, !tbaa !5
  br label %233, !llvm.loop !15

256:                                              ; preds = %266, %264, %240, %237
  %257 = landingpad { ptr, i32 }
          cleanup
  %258 = extractvalue { ptr, i32 } %257, 0
  store ptr %258, ptr %2, align 8
  %259 = extractvalue { ptr, i32 } %257, 1
  store i32 %259, ptr %3, align 4
  br label %461

260:                                              ; preds = %249
  %261 = load i64, ptr %18, align 8, !tbaa !5
  %262 = load i64, ptr %19, align 8, !tbaa !5
  %263 = icmp sge i64 %261, %262
  br i1 %263, label %264, label %269

264:                                              ; preds = %260
  %265 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %266 unwind label %256

266:                                              ; preds = %264
  %267 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %265, ptr noundef @.str)
          to label %268 unwind label %256

268:                                              ; preds = %266
  store i32 1, ptr %20, align 4
  br label %454

269:                                              ; preds = %260
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  store i64 0, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  store i64 -1, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %270 = load i64, ptr %18, align 8, !tbaa !5
  store i64 %270, ptr %23, align 8, !tbaa !5
  br label %271

271:                                              ; preds = %398, %269
  %272 = load i64, ptr %23, align 8, !tbaa !5
  %273 = load i64, ptr %19, align 8, !tbaa !5
  %274 = icmp sle i64 %272, %273
  br i1 %274, label %276, label %275

275:                                              ; preds = %271
  store i32 14, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %401

276:                                              ; preds = %271
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %277 = load i64, ptr %23, align 8, !tbaa !5
  %278 = load i64, ptr %23, align 8, !tbaa !5
  %279 = getelementptr inbounds i64, ptr %41, i64 %278
  %280 = load i64, ptr %279, align 8, !tbaa !5
  %281 = sub nsw i64 %277, %280
  %282 = add nsw i64 %281, 1
  store i64 %282, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %283 = load i64, ptr %23, align 8, !tbaa !5
  %284 = load i64, ptr %23, align 8, !tbaa !5
  %285 = getelementptr inbounds i64, ptr %41, i64 %284
  %286 = load i64, ptr %285, align 8, !tbaa !5
  %287 = add nsw i64 %283, %286
  %288 = sub nsw i64 %287, 1
  store i64 %288, ptr %25, align 8, !tbaa !5
  %289 = load i64, ptr %24, align 8, !tbaa !5
  %290 = load i64, ptr %18, align 8, !tbaa !5
  %291 = icmp slt i64 %289, %290
  br i1 %291, label %292, label %302

292:                                              ; preds = %276
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %293 = load i64, ptr %18, align 8, !tbaa !5
  %294 = load i64, ptr %24, align 8, !tbaa !5
  %295 = sub nsw i64 %293, %294
  store i64 %295, ptr %26, align 8, !tbaa !5
  %296 = load i64, ptr %26, align 8, !tbaa !5
  %297 = load i64, ptr %25, align 8, !tbaa !5
  %298 = sub nsw i64 %297, %296
  store i64 %298, ptr %25, align 8, !tbaa !5
  %299 = load i64, ptr %26, align 8, !tbaa !5
  %300 = load i64, ptr %24, align 8, !tbaa !5
  %301 = add nsw i64 %300, %299
  store i64 %301, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %302

302:                                              ; preds = %292, %276
  %303 = load i64, ptr %25, align 8, !tbaa !5
  %304 = load i64, ptr %19, align 8, !tbaa !5
  %305 = icmp sgt i64 %303, %304
  br i1 %305, label %306, label %316

306:                                              ; preds = %302
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %307 = load i64, ptr %25, align 8, !tbaa !5
  %308 = load i64, ptr %19, align 8, !tbaa !5
  %309 = sub nsw i64 %307, %308
  store i64 %309, ptr %27, align 8, !tbaa !5
  %310 = load i64, ptr %27, align 8, !tbaa !5
  %311 = load i64, ptr %24, align 8, !tbaa !5
  %312 = add nsw i64 %311, %310
  store i64 %312, ptr %24, align 8, !tbaa !5
  %313 = load i64, ptr %27, align 8, !tbaa !5
  %314 = load i64, ptr %25, align 8, !tbaa !5
  %315 = sub nsw i64 %314, %313
  store i64 %315, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br label %316

316:                                              ; preds = %306, %302
  %317 = load i64, ptr %24, align 8, !tbaa !5
  %318 = load i64, ptr %18, align 8, !tbaa !5
  %319 = icmp eq i64 %317, %318
  br i1 %319, label %324, label %320

320:                                              ; preds = %316
  %321 = load i64, ptr %25, align 8, !tbaa !5
  %322 = load i64, ptr %19, align 8, !tbaa !5
  %323 = icmp eq i64 %321, %322
  br i1 %323, label %324, label %337

324:                                              ; preds = %320, %316
  %325 = load i64, ptr %21, align 8, !tbaa !5
  %326 = load i64, ptr %25, align 8, !tbaa !5
  %327 = load i64, ptr %24, align 8, !tbaa !5
  %328 = sub nsw i64 %326, %327
  %329 = add nsw i64 %328, 1
  %330 = icmp slt i64 %325, %329
  br i1 %330, label %331, label %337

331:                                              ; preds = %324
  %332 = load i64, ptr %25, align 8, !tbaa !5
  %333 = load i64, ptr %24, align 8, !tbaa !5
  %334 = sub nsw i64 %332, %333
  %335 = add nsw i64 %334, 1
  store i64 %335, ptr %21, align 8, !tbaa !5
  %336 = load i64, ptr %24, align 8, !tbaa !5
  store i64 %336, ptr %22, align 8, !tbaa !5
  br label %337

337:                                              ; preds = %331, %324, %320
  %338 = load i64, ptr %23, align 8, !tbaa !5
  %339 = load i64, ptr %23, align 8, !tbaa !5
  %340 = getelementptr inbounds i64, ptr %43, i64 %339
  %341 = load i64, ptr %340, align 8, !tbaa !5
  %342 = sub nsw i64 %338, %341
  store i64 %342, ptr %24, align 8, !tbaa !5
  %343 = load i64, ptr %23, align 8, !tbaa !5
  %344 = load i64, ptr %23, align 8, !tbaa !5
  %345 = getelementptr inbounds i64, ptr %43, i64 %344
  %346 = load i64, ptr %345, align 8, !tbaa !5
  %347 = add nsw i64 %343, %346
  %348 = sub nsw i64 %347, 1
  store i64 %348, ptr %25, align 8, !tbaa !5
  %349 = load i64, ptr %24, align 8, !tbaa !5
  %350 = load i64, ptr %18, align 8, !tbaa !5
  %351 = icmp slt i64 %349, %350
  br i1 %351, label %352, label %362

352:                                              ; preds = %337
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %353 = load i64, ptr %18, align 8, !tbaa !5
  %354 = load i64, ptr %24, align 8, !tbaa !5
  %355 = sub nsw i64 %353, %354
  store i64 %355, ptr %28, align 8, !tbaa !5
  %356 = load i64, ptr %28, align 8, !tbaa !5
  %357 = load i64, ptr %25, align 8, !tbaa !5
  %358 = sub nsw i64 %357, %356
  store i64 %358, ptr %25, align 8, !tbaa !5
  %359 = load i64, ptr %28, align 8, !tbaa !5
  %360 = load i64, ptr %24, align 8, !tbaa !5
  %361 = add nsw i64 %360, %359
  store i64 %361, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  br label %362

362:                                              ; preds = %352, %337
  %363 = load i64, ptr %25, align 8, !tbaa !5
  %364 = load i64, ptr %19, align 8, !tbaa !5
  %365 = icmp sgt i64 %363, %364
  br i1 %365, label %366, label %376

366:                                              ; preds = %362
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %367 = load i64, ptr %25, align 8, !tbaa !5
  %368 = load i64, ptr %19, align 8, !tbaa !5
  %369 = sub nsw i64 %367, %368
  store i64 %369, ptr %29, align 8, !tbaa !5
  %370 = load i64, ptr %29, align 8, !tbaa !5
  %371 = load i64, ptr %25, align 8, !tbaa !5
  %372 = sub nsw i64 %371, %370
  store i64 %372, ptr %25, align 8, !tbaa !5
  %373 = load i64, ptr %29, align 8, !tbaa !5
  %374 = load i64, ptr %24, align 8, !tbaa !5
  %375 = add nsw i64 %374, %373
  store i64 %375, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  br label %376

376:                                              ; preds = %366, %362
  %377 = load i64, ptr %24, align 8, !tbaa !5
  %378 = load i64, ptr %18, align 8, !tbaa !5
  %379 = icmp eq i64 %377, %378
  br i1 %379, label %384, label %380

380:                                              ; preds = %376
  %381 = load i64, ptr %25, align 8, !tbaa !5
  %382 = load i64, ptr %19, align 8, !tbaa !5
  %383 = icmp eq i64 %381, %382
  br i1 %383, label %384, label %397

384:                                              ; preds = %380, %376
  %385 = load i64, ptr %21, align 8, !tbaa !5
  %386 = load i64, ptr %25, align 8, !tbaa !5
  %387 = load i64, ptr %24, align 8, !tbaa !5
  %388 = sub nsw i64 %386, %387
  %389 = add nsw i64 %388, 1
  %390 = icmp slt i64 %385, %389
  br i1 %390, label %391, label %397

391:                                              ; preds = %384
  %392 = load i64, ptr %25, align 8, !tbaa !5
  %393 = load i64, ptr %24, align 8, !tbaa !5
  %394 = sub nsw i64 %392, %393
  %395 = add nsw i64 %394, 1
  store i64 %395, ptr %21, align 8, !tbaa !5
  %396 = load i64, ptr %24, align 8, !tbaa !5
  store i64 %396, ptr %22, align 8, !tbaa !5
  br label %397

397:                                              ; preds = %391, %384, %380
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %398

398:                                              ; preds = %397
  %399 = load i64, ptr %23, align 8, !tbaa !5
  %400 = add nsw i64 %399, 1
  store i64 %400, ptr %23, align 8, !tbaa !5
  br label %271, !llvm.loop !16

401:                                              ; preds = %275
  call void @llvm.lifetime.start.p0(i64 32, ptr %30) #7
  %402 = load i64, ptr %18, align 8, !tbaa !5
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %30, ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef 0, i64 noundef %402)
          to label %403 unwind label %423

403:                                              ; preds = %401
  call void @llvm.lifetime.start.p0(i64 32, ptr %31) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef nonnull align 8 dereferenceable(32) %30)
          to label %404 unwind label %427

404:                                              ; preds = %403
  %405 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %31) #7
  %406 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %32, i32 0, i32 0
  store ptr %405, ptr %406, align 8
  %407 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %31) #7
  %408 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %33, i32 0, i32 0
  store ptr %407, ptr %408, align 8
  %409 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %32, i32 0, i32 0
  %410 = load ptr, ptr %409, align 8
  %411 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %33, i32 0, i32 0
  %412 = load ptr, ptr %411, align 8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr %410, ptr %412)
          to label %413 unwind label %431

413:                                              ; preds = %404
  %414 = load i64, ptr %22, align 8, !tbaa !5
  %415 = icmp ne i64 %414, -1
  br i1 %415, label %416, label %449

416:                                              ; preds = %413
  call void @llvm.lifetime.start.p0(i64 32, ptr %34) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %35) #7
  %417 = load i64, ptr %22, align 8, !tbaa !5
  %418 = load i64, ptr %21, align 8, !tbaa !5
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %35, ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %417, i64 noundef %418)
          to label %419 unwind label %435

419:                                              ; preds = %416
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %34, ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef nonnull align 8 dereferenceable(32) %31)
          to label %420 unwind label %439

420:                                              ; preds = %419
  %421 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef nonnull align 8 dereferenceable(32) %34)
          to label %422 unwind label %443

422:                                              ; preds = %420
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %34) #7
  br label %449

423:                                              ; preds = %401
  %424 = landingpad { ptr, i32 }
          cleanup
  %425 = extractvalue { ptr, i32 } %424, 0
  store ptr %425, ptr %2, align 8
  %426 = extractvalue { ptr, i32 } %424, 1
  store i32 %426, ptr %3, align 4
  br label %460

427:                                              ; preds = %403
  %428 = landingpad { ptr, i32 }
          cleanup
  %429 = extractvalue { ptr, i32 } %428, 0
  store ptr %429, ptr %2, align 8
  %430 = extractvalue { ptr, i32 } %428, 1
  store i32 %430, ptr %3, align 4
  br label %459

431:                                              ; preds = %451, %449, %404
  %432 = landingpad { ptr, i32 }
          cleanup
  %433 = extractvalue { ptr, i32 } %432, 0
  store ptr %433, ptr %2, align 8
  %434 = extractvalue { ptr, i32 } %432, 1
  store i32 %434, ptr %3, align 4
  br label %458

435:                                              ; preds = %416
  %436 = landingpad { ptr, i32 }
          cleanup
  %437 = extractvalue { ptr, i32 } %436, 0
  store ptr %437, ptr %2, align 8
  %438 = extractvalue { ptr, i32 } %436, 1
  store i32 %438, ptr %3, align 4
  br label %448

439:                                              ; preds = %419
  %440 = landingpad { ptr, i32 }
          cleanup
  %441 = extractvalue { ptr, i32 } %440, 0
  store ptr %441, ptr %2, align 8
  %442 = extractvalue { ptr, i32 } %440, 1
  store i32 %442, ptr %3, align 4
  br label %447

443:                                              ; preds = %420
  %444 = landingpad { ptr, i32 }
          cleanup
  %445 = extractvalue { ptr, i32 } %444, 0
  store ptr %445, ptr %2, align 8
  %446 = extractvalue { ptr, i32 } %444, 1
  store i32 %446, ptr %3, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #7
  br label %447

447:                                              ; preds = %443, %439
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #7
  br label %448

448:                                              ; preds = %447, %435
  call void @llvm.lifetime.end.p0(i64 32, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %34) #7
  br label %458

449:                                              ; preds = %422, %413
  %450 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %30)
          to label %451 unwind label %431

451:                                              ; preds = %449
  %452 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %450, ptr noundef @.str)
          to label %453 unwind label %431

453:                                              ; preds = %451
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %31) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  store i32 0, ptr %20, align 4
  br label %454

454:                                              ; preds = %453, %268
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  %455 = load ptr, ptr %5, align 8
  call void @llvm.stackrestore.p0(ptr %455)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #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 %1) #7
  %456 = load i32, ptr %20, align 4
  switch i32 %456, label %469 [
    i32 0, label %457
    i32 1, label %457
  ]

457:                                              ; preds = %454, %454
  ret void

458:                                              ; preds = %448, %431
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #7
  br label %459

459:                                              ; preds = %458, %427
  call void @llvm.lifetime.end.p0(i64 32, ptr %31) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #7
  br label %460

460:                                              ; preds = %459, %423
  call void @llvm.lifetime.end.p0(i64 32, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %461

461:                                              ; preds = %460, %256
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %462

462:                                              ; preds = %461, %229, %134
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %463

463:                                              ; preds = %462, %49
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %1) #7
  br label %464

464:                                              ; preds = %463
  %465 = load ptr, ptr %2, align 8
  %466 = load i32, ptr %3, align 4
  %467 = insertvalue { ptr, i32 } poison, ptr %465, 0
  %468 = insertvalue { ptr, i32 } %467, i32 %466, 1
  resume { ptr, i32 } %468

469:                                              ; preds = %454
  unreachable
}

; 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_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

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

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

; 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 uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6

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

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i64 noundef) #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr, ptr) #6

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #6

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

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

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

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

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

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


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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; 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 i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #8
  %8 = 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 %9 unwind label %15

9:                                                ; preds = %0
  %10 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #8
  %11 = call ptr @llvm.stacksave.p0()
  %12 = alloca i64, i64 %10, align 16
  %13 = alloca i64, i64 %10, align 16
  %14 = icmp sgt i64 %10, 0
  br i1 %14, label %.lr.ph230, label %._crit_edge

.preheader218:                                    ; preds = %.critedge
  br i1 %14, label %.lr.ph234, label %._crit_edge

15:                                               ; preds = %0
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %154

.lr.ph230:                                        ; preds = %9, %.critedge
  %.0151229 = phi i64 [ %46, %.critedge ], [ 0, %9 ]
  %.0152228 = phi i64 [ %spec.select210, %.critedge ], [ 0, %9 ]
  %.0154227 = phi i64 [ %spec.select, %.critedge ], [ -1, %9 ]
  %17 = icmp sgt i64 %.0151229, %.0154227
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  br i1 %17, label %24, label %18

18:                                               ; preds = %.lr.ph230
  %19 = sub nsw i64 %.0154227, %.0151229
  %20 = getelementptr i64, ptr %12, i64 %.0152228
  %21 = getelementptr i64, ptr %20, i64 %19
  store i64 %19, ptr %2, align 8, !tbaa !5
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %23 = load i64, ptr %22, align 8, !tbaa !5
  br label %24

24:                                               ; preds = %.lr.ph230, %18
  %25 = phi i64 [ %23, %18 ], [ 1, %.lr.ph230 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  %26 = add nsw i64 %25, %.0151229
  %27 = icmp slt i64 %26, %10
  br i1 %27, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %24, %37
  %28 = phi i64 [ %39, %37 ], [ %26, %24 ]
  %.0156222 = phi i64 [ %38, %37 ], [ %25, %24 ]
  %29 = sub nsw i64 %.0151229, %.0156222
  %30 = icmp sgt i64 %29, -1
  br i1 %30, label %31, label %.critedge

31:                                               ; preds = %.lr.ph
  %32 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %28)
  %33 = load i8, ptr %32, align 1, !tbaa !9
  %34 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %29)
  %35 = load i8, ptr %34, align 1, !tbaa !9
  %36 = icmp eq i8 %33, %35
  br i1 %36, label %37, label %.critedge

37:                                               ; preds = %31
  %38 = add nsw i64 %.0156222, 1
  %39 = add nsw i64 %38, %.0151229
  %40 = icmp slt i64 %39, %10
  br i1 %40, label %.lr.ph, label %.critedge, !llvm.loop !10

.critedge:                                        ; preds = %31, %37, %.lr.ph, %24
  %.0156.lcssa = phi i64 [ %25, %24 ], [ %.0156222, %.lr.ph ], [ %38, %37 ], [ %.0156222, %31 ]
  %41 = add nsw i64 %.0156.lcssa, -1
  %42 = getelementptr inbounds i64, ptr %12, i64 %.0151229
  store i64 %.0156.lcssa, ptr %42, align 8, !tbaa !5
  %43 = add nsw i64 %41, %.0151229
  %44 = icmp sgt i64 %43, %.0154227
  %45 = sub nsw i64 %.0151229, %41
  %spec.select = call i64 @llvm.smax.i64(i64 %43, i64 %.0154227)
  %spec.select210 = select i1 %44, i64 %45, i64 %.0152228
  %46 = add nuw nsw i64 %.0151229, 1
  %exitcond.not = icmp eq i64 %46, %10
  br i1 %exitcond.not, label %.preheader218, label %.lr.ph230, !llvm.loop !12

.preheader:                                       ; preds = %.critedge2
  %.not = icmp eq i64 %10, 1
  br i1 %.not, label %._crit_edge, label %.lr.ph239.preheader

.lr.ph239.preheader:                              ; preds = %.preheader
  %.0172235 = add nsw i64 %10, -1
  %47 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef 0)
  %48 = load i8, ptr %47, align 1, !tbaa !9
  %49 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %.0172235)
  %50 = load i8, ptr %49, align 1, !tbaa !9
  %51 = icmp eq i8 %48, %50
  br i1 %51, label %.lr.ph259, label %.critedge4.preheader

.lr.ph234:                                        ; preds = %.preheader218, %.critedge2
  %.0175233 = phi i64 [ %spec.select212, %.critedge2 ], [ -1, %.preheader218 ]
  %.0177232 = phi i64 [ %spec.select211, %.critedge2 ], [ 0, %.preheader218 ]
  %.0179231 = phi i64 [ %78, %.critedge2 ], [ 0, %.preheader218 ]
  %52 = icmp sgt i64 %.0179231, %.0175233
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  br i1 %52, label %60, label %53

53:                                               ; preds = %.lr.ph234
  %54 = sub nsw i64 %.0175233, %.0179231
  %55 = add nsw i64 %54, 1
  %56 = getelementptr i64, ptr %13, i64 %.0177232
  %57 = getelementptr i64, ptr %56, i64 %55
  store i64 %55, ptr %3, align 8, !tbaa !5
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %59 = load i64, ptr %58, align 8, !tbaa !5
  br label %60

60:                                               ; preds = %.lr.ph234, %53
  %61 = phi i64 [ %59, %53 ], [ 0, %.lr.ph234 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  br label %62

62:                                               ; preds = %68, %60
  %.0174.in = phi i64 [ %61, %60 ], [ %.0174, %68 ]
  %.0174 = add nsw i64 %.0174.in, 1
  %63 = add i64 %.0174.in, %.0179231
  %64 = icmp slt i64 %63, %10
  br i1 %64, label %65, label %.critedge2

65:                                               ; preds = %62
  %66 = sub nsw i64 %.0179231, %.0174
  %67 = icmp sgt i64 %66, -1
  br i1 %67, label %68, label %.critedge2

68:                                               ; preds = %65
  %69 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %63)
  %70 = load i8, ptr %69, align 1, !tbaa !9
  %71 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %66)
  %72 = load i8, ptr %71, align 1, !tbaa !9
  %73 = icmp eq i8 %70, %72
  br i1 %73, label %62, label %.critedge2, !llvm.loop !13

.critedge2:                                       ; preds = %65, %62, %68
  %74 = getelementptr inbounds i64, ptr %13, i64 %.0179231
  store i64 %.0174.in, ptr %74, align 8, !tbaa !5
  %75 = add nsw i64 %63, -1
  %76 = icmp sgt i64 %75, %.0175233
  %77 = sub nsw i64 %.0179231, %.0174.in
  %spec.select211 = select i1 %76, i64 %77, i64 %.0177232
  %spec.select212 = call i64 @llvm.smax.i64(i64 %75, i64 %.0175233)
  %78 = add nuw nsw i64 %.0179231, 1
  %exitcond250.not = icmp eq i64 %78, %10
  br i1 %exitcond250.not, label %.preheader, label %.lr.ph234, !llvm.loop !14

.lr.ph239:                                        ; preds = %.lr.ph259
  %79 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %84)
  %80 = load i8, ptr %79, align 1, !tbaa !9
  %81 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %.0172)
  %82 = load i8, ptr %81, align 1, !tbaa !9
  %83 = icmp eq i8 %80, %82
  br i1 %83, label %.lr.ph259, label %.critedge4.preheader, !llvm.loop !15

.critedge4.preheader:                             ; preds = %.lr.ph239, %.lr.ph239.preheader
  %.0172238.lcssa = phi i64 [ %.0172235, %.lr.ph239.preheader ], [ %.0172, %.lr.ph239 ]
  %.0172.in237.lcssa = phi i64 [ %10, %.lr.ph239.preheader ], [ %.0172238257, %.lr.ph239 ]
  %.0173236.lcssa = phi i64 [ 0, %.lr.ph239.preheader ], [ %84, %.lr.ph239 ]
  %.not194.not240 = icmp slt i64 %.0173236.lcssa, %.0172.in237.lcssa
  br i1 %.not194.not240, label %.lr.ph244, label %.critedge4._crit_edge

.lr.ph259:                                        ; preds = %.lr.ph239.preheader, %.lr.ph239
  %.0173236258 = phi i64 [ %84, %.lr.ph239 ], [ 0, %.lr.ph239.preheader ]
  %.0172238257 = phi i64 [ %.0172, %.lr.ph239 ], [ %.0172235, %.lr.ph239.preheader ]
  %84 = add nuw nsw i64 %.0173236258, 1
  %.0172 = add nsw i64 %.0172238257, -1
  %85 = icmp slt i64 %84, %.0172
  br i1 %85, label %.lr.ph239, label %._crit_edge, !llvm.loop !15

86:                                               ; preds = %89, %._crit_edge
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %154

._crit_edge:                                      ; preds = %.lr.ph259, %9, %.preheader218, %.preheader
  %88 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %89 unwind label %86

89:                                               ; preds = %._crit_edge
  %90 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %88, ptr noundef nonnull @.str)
          to label %150 unwind label %86

.critedge4._crit_edge:                            ; preds = %.critedge4, %.critedge4.preheader
  %.0169.lcssa = phi i64 [ 0, %.critedge4.preheader ], [ %.2171, %.critedge4 ]
  %.0166.lcssa = phi i64 [ -1, %.critedge4.preheader ], [ %.2168, %.critedge4 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #8
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef 0, i64 noundef %.0173236.lcssa)
          to label %121 unwind label %131

.lr.ph244:                                        ; preds = %.critedge4.preheader, %.critedge4
  %.0165243 = phi i64 [ %120, %.critedge4 ], [ %.0173236.lcssa, %.critedge4.preheader ]
  %.0166242 = phi i64 [ %.2168, %.critedge4 ], [ -1, %.critedge4.preheader ]
  %.0169241 = phi i64 [ %.2171, %.critedge4 ], [ 0, %.critedge4.preheader ]
  %91 = getelementptr inbounds i64, ptr %12, i64 %.0165243
  %92 = load i64, ptr %91, align 8, !tbaa !5
  %93 = sub nsw i64 %.0165243, %92
  %94 = add nsw i64 %93, 1
  %95 = icmp slt i64 %94, %.0173236.lcssa
  %.neg = sub i64 %94, %.0173236.lcssa
  %.0161 = call i64 @llvm.smax.i64(i64 %94, i64 %.0173236.lcssa)
  %96 = select i1 %95, i64 %.neg, i64 0
  %97 = add nsw i64 %.0165243, -1
  %98 = add i64 %97, %92
  %.0157 = add i64 %98, %96
  %.not202 = icmp slt i64 %.0157, %.0172.in237.lcssa
  %99 = sub nsw i64 %.0157, %.0172238.lcssa
  %100 = select i1 %.not202, i64 0, i64 %99
  %.1162 = add nsw i64 %100, %.0161
  %.1158 = select i1 %.not202, i64 %.0157, i64 %.0172238.lcssa
  %101 = icmp eq i64 %.1162, %.0173236.lcssa
  %102 = icmp eq i64 %.1158, %.0172238.lcssa
  %or.cond = or i1 %102, %101
  br i1 %or.cond, label %103, label %106

103:                                              ; preds = %.lr.ph244
  %104 = sub nsw i64 %.1158, %.1162
  %.not203 = icmp sgt i64 %.0169241, %104
  %105 = add nsw i64 %104, 1
  %spec.select213 = select i1 %.not203, i64 %.0169241, i64 %105
  %spec.select214 = select i1 %.not203, i64 %.0166242, i64 %.1162
  br label %106

106:                                              ; preds = %103, %.lr.ph244
  %.1170 = phi i64 [ %.0169241, %.lr.ph244 ], [ %spec.select213, %103 ]
  %.1167 = phi i64 [ %.0166242, %.lr.ph244 ], [ %spec.select214, %103 ]
  %107 = getelementptr inbounds i64, ptr %13, i64 %.0165243
  %108 = load i64, ptr %107, align 8, !tbaa !5
  %109 = sub nsw i64 %.0165243, %108
  %110 = icmp slt i64 %109, %.0173236.lcssa
  %.neg204 = sub i64 %109, %.0173236.lcssa
  %.2163 = call i64 @llvm.smax.i64(i64 %109, i64 %.0173236.lcssa)
  %111 = select i1 %110, i64 %.neg204, i64 0
  %112 = add i64 %97, %108
  %.2159 = add i64 %112, %111
  %.not205 = icmp slt i64 %.2159, %.0172.in237.lcssa
  %113 = sub nsw i64 %.2159, %.0172238.lcssa
  %114 = select i1 %.not205, i64 0, i64 %113
  %.3164 = add nsw i64 %114, %.2163
  %.3160 = select i1 %.not205, i64 %.2159, i64 %.0172238.lcssa
  %115 = icmp eq i64 %.3164, %.0173236.lcssa
  %116 = icmp eq i64 %.3160, %.0172238.lcssa
  %or.cond215 = or i1 %116, %115
  br i1 %or.cond215, label %117, label %.critedge4

117:                                              ; preds = %106
  %118 = sub nsw i64 %.3160, %.3164
  %.not206 = icmp sgt i64 %.1170, %118
  %119 = add nsw i64 %118, 1
  %spec.select216 = select i1 %.not206, i64 %.1170, i64 %119
  %spec.select217 = select i1 %.not206, i64 %.1167, i64 %.3164
  br label %.critedge4

.critedge4:                                       ; preds = %117, %106
  %.2171 = phi i64 [ %.1170, %106 ], [ %spec.select216, %117 ]
  %.2168 = phi i64 [ %.1167, %106 ], [ %spec.select217, %117 ]
  %120 = add nuw nsw i64 %.0165243, 1
  %.not194.not = icmp slt i64 %120, %.0172.in237.lcssa
  br i1 %.not194.not, label %.lr.ph244, label %.critedge4._crit_edge, !llvm.loop !16

121:                                              ; preds = %.critedge4._crit_edge
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %122 unwind label %133

122:                                              ; preds = %121
  %123 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  %124 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr %123, ptr %124)
          to label %125 unwind label %135

125:                                              ; preds = %122
  %.not195 = icmp eq i64 %.0166.lcssa, -1
  br i1 %.not195, label %145, label %126

126:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #8
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %.0166.lcssa, i64 noundef %.0169.lcssa)
          to label %127 unwind label %137

127:                                              ; preds = %126
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %128 unwind label %139

128:                                              ; preds = %127
  %129 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %130 unwind label %141

130:                                              ; preds = %128
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #8
  br label %145

131:                                              ; preds = %.critedge4._crit_edge
  %132 = landingpad { ptr, i32 }
          cleanup
  br label %153

133:                                              ; preds = %121
  %134 = landingpad { ptr, i32 }
          cleanup
  br label %152

135:                                              ; preds = %147, %145, %122
  %136 = landingpad { ptr, i32 }
          cleanup
  br label %151

137:                                              ; preds = %126
  %138 = landingpad { ptr, i32 }
          cleanup
  br label %144

139:                                              ; preds = %127
  %140 = landingpad { ptr, i32 }
          cleanup
  br label %143

141:                                              ; preds = %128
  %142 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  br label %143

143:                                              ; preds = %141, %139
  %.pn = phi { ptr, i32 } [ %142, %141 ], [ %140, %139 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #8
  br label %144

144:                                              ; preds = %143, %137
  %.pn.pn = phi { ptr, i32 } [ %.pn, %143 ], [ %138, %137 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #8
  br label %151

145:                                              ; preds = %130, %125
  %146 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %147 unwind label %135

147:                                              ; preds = %145
  %148 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %146, ptr noundef nonnull @.str)
          to label %149 unwind label %135

149:                                              ; preds = %147
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  br label %150

150:                                              ; preds = %89, %149
  call void @llvm.stackrestore.p0(ptr %11)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #8
  ret void

151:                                              ; preds = %144, %135
  %.pn198 = phi { ptr, i32 } [ %136, %135 ], [ %.pn.pn, %144 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  br label %152

152:                                              ; preds = %151, %133
  %.pn198.pn = phi { ptr, i32 } [ %.pn198, %151 ], [ %134, %133 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  br label %153

153:                                              ; preds = %152, %131
  %.pn198.pn.pn = phi { ptr, i32 } [ %.pn198.pn, %152 ], [ %132, %131 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  br label %154

154:                                              ; preds = %86, %153, %15
  %.pn207.pn = phi { ptr, i32 } [ %16, %15 ], [ %87, %86 ], [ %.pn198.pn.pn, %153 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn207.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_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

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

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

; 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 uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #6

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

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i64 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr, ptr) local_unnamed_addr #6

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #6

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #7

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

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass