; LLVM IR from AdarshGaur/Competitive-Programming :: Codeforces/Codeforces Global Round 7/D2. Prefix-Suffix Palindrome (Hard version)_7dc57c55 (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 i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, 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 i64, align 8
  %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 %64

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
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  store i64 0, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %39 = load i64, ptr %4, align 8, !tbaa !5
  %40 = sub nsw i64 %39, 1
  store i64 %40, ptr %6, align 8, !tbaa !5
  br label %41

41:                                               ; preds = %59, %37
  %42 = load i64, ptr %5, align 8, !tbaa !5
  %43 = load i64, ptr %6, align 8, !tbaa !5
  %44 = icmp slt i64 %42, %43
  br i1 %44, label %45, label %57

45:                                               ; preds = %41
  %46 = load i64, ptr %5, align 8, !tbaa !5
  %47 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %46)
          to label %48 unwind label %68

48:                                               ; preds = %45
  %49 = load i8, ptr %47, align 1, !tbaa !9
  %50 = sext i8 %49 to i32
  %51 = load i64, ptr %6, align 8, !tbaa !5
  %52 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %51)
          to label %53 unwind label %68

53:                                               ; preds = %48
  %54 = load i8, ptr %52, align 1, !tbaa !9
  %55 = sext i8 %54 to i32
  %56 = icmp eq i32 %50, %55
  br label %57

57:                                               ; preds = %53, %41
  %58 = phi i1 [ false, %41 ], [ %56, %53 ]
  br i1 %58, label %59, label %72

59:                                               ; preds = %57
  %60 = load i64, ptr %5, align 8, !tbaa !5
  %61 = add nsw i64 %60, 1
  store i64 %61, ptr %5, align 8, !tbaa !5
  %62 = load i64, ptr %6, align 8, !tbaa !5
  %63 = add nsw i64 %62, -1
  store i64 %63, ptr %6, align 8, !tbaa !5
  br label %41, !llvm.loop !10

64:                                               ; preds = %0
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %2, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %3, align 4
  br label %470

68:                                               ; preds = %78, %76, %48, %45
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %2, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %3, align 4
  br label %469

72:                                               ; preds = %57
  %73 = load i64, ptr %5, align 8, !tbaa !5
  %74 = load i64, ptr %6, align 8, !tbaa !5
  %75 = icmp sge i64 %73, %74
  br i1 %75, label %76, label %81

76:                                               ; preds = %72
  %77 = 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 %78 unwind label %68

78:                                               ; preds = %76
  %79 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef @.str)
          to label %80 unwind label %68

80:                                               ; preds = %78
  store i32 1, ptr %7, align 4
  br label %463

81:                                               ; preds = %72
  %82 = load i64, ptr %4, align 8, !tbaa !5
  %83 = call ptr @llvm.stacksave.p0()
  store ptr %83, ptr %8, align 8
  %84 = alloca i64, i64 %82, align 16
  store i64 %82, ptr %9, align 8
  %85 = load i64, ptr %4, align 8, !tbaa !5
  %86 = alloca i64, i64 %85, align 16
  store i64 %85, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store i64 0, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store i64 0, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store i64 -1, ptr %13, align 8, !tbaa !5
  br label %87

87:                                               ; preds = %170, %81
  %88 = load i64, ptr %11, align 8, !tbaa !5
  %89 = load i64, ptr %4, align 8, !tbaa !5
  %90 = icmp slt i64 %88, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %87
  store i32 4, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %174

92:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %93 = load i64, ptr %11, align 8, !tbaa !5
  %94 = load i64, ptr %13, align 8, !tbaa !5
  %95 = icmp sgt i64 %93, %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  br i1 %95, label %96, label %97

96:                                               ; preds = %92
  br label %110

97:                                               ; preds = %92
  %98 = load i64, ptr %12, align 8, !tbaa !5
  %99 = load i64, ptr %13, align 8, !tbaa !5
  %100 = load i64, ptr %11, align 8, !tbaa !5
  %101 = sub nsw i64 %99, %100
  %102 = add nsw i64 %98, %101
  %103 = getelementptr inbounds i64, ptr %84, i64 %102
  %104 = load i64, ptr %13, align 8, !tbaa !5
  %105 = load i64, ptr %11, align 8, !tbaa !5
  %106 = sub nsw i64 %104, %105
  store i64 %106, ptr %15, align 8, !tbaa !5
  %107 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %103, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %108 unwind label %144

108:                                              ; preds = %97
  %109 = load i64, ptr %107, align 8, !tbaa !5
  br label %110

110:                                              ; preds = %108, %96
  %111 = phi i64 [ 1, %96 ], [ %109, %108 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  store i64 %111, ptr %14, align 8, !tbaa !5
  br label %112

112:                                              ; preds = %141, %110
  %113 = load i64, ptr %11, align 8, !tbaa !5
  %114 = load i64, ptr %14, align 8, !tbaa !5
  %115 = add nsw i64 %113, %114
  %116 = load i64, ptr %4, align 8, !tbaa !5
  %117 = icmp slt i64 %115, %116
  br i1 %117, label %118, label %139

118:                                              ; preds = %112
  %119 = load i64, ptr %11, align 8, !tbaa !5
  %120 = load i64, ptr %14, align 8, !tbaa !5
  %121 = sub nsw i64 %119, %120
  %122 = icmp sge i64 %121, 0
  br i1 %122, label %123, label %139

123:                                              ; preds = %118
  %124 = load i64, ptr %11, align 8, !tbaa !5
  %125 = load i64, ptr %14, align 8, !tbaa !5
  %126 = add nsw i64 %124, %125
  %127 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %126)
          to label %128 unwind label %148

128:                                              ; preds = %123
  %129 = load i8, ptr %127, align 1, !tbaa !9
  %130 = sext i8 %129 to i32
  %131 = load i64, ptr %11, align 8, !tbaa !5
  %132 = load i64, ptr %14, align 8, !tbaa !5
  %133 = sub nsw i64 %131, %132
  %134 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %133)
          to label %135 unwind label %148

135:                                              ; preds = %128
  %136 = load i8, ptr %134, align 1, !tbaa !9
  %137 = sext i8 %136 to i32
  %138 = icmp eq i32 %130, %137
  br label %139

139:                                              ; preds = %135, %118, %112
  %140 = phi i1 [ false, %118 ], [ false, %112 ], [ %138, %135 ]
  br i1 %140, label %141, label %152

141:                                              ; preds = %139
  %142 = load i64, ptr %14, align 8, !tbaa !5
  %143 = add nsw i64 %142, 1
  store i64 %143, ptr %14, align 8, !tbaa !5
  br label %112, !llvm.loop !12

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

148:                                              ; preds = %128, %123
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %2, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %3, align 4
  br label %173

152:                                              ; preds = %139
  %153 = load i64, ptr %14, align 8, !tbaa !5
  %154 = add nsw i64 %153, -1
  store i64 %154, ptr %14, align 8, !tbaa !5
  %155 = load i64, ptr %11, align 8, !tbaa !5
  %156 = getelementptr inbounds i64, ptr %84, i64 %155
  store i64 %153, ptr %156, align 8, !tbaa !5
  %157 = load i64, ptr %11, align 8, !tbaa !5
  %158 = load i64, ptr %14, align 8, !tbaa !5
  %159 = add nsw i64 %157, %158
  %160 = load i64, ptr %13, align 8, !tbaa !5
  %161 = icmp sgt i64 %159, %160
  br i1 %161, label %162, label %169

162:                                              ; preds = %152
  %163 = load i64, ptr %11, align 8, !tbaa !5
  %164 = load i64, ptr %14, align 8, !tbaa !5
  %165 = sub nsw i64 %163, %164
  store i64 %165, ptr %12, align 8, !tbaa !5
  %166 = load i64, ptr %11, align 8, !tbaa !5
  %167 = load i64, ptr %14, align 8, !tbaa !5
  %168 = add nsw i64 %166, %167
  store i64 %168, ptr %13, align 8, !tbaa !5
  br label %169

169:                                              ; preds = %162, %152
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %170

170:                                              ; preds = %169
  %171 = load i64, ptr %11, align 8, !tbaa !5
  %172 = add nsw i64 %171, 1
  store i64 %172, ptr %11, align 8, !tbaa !5
  br label %87, !llvm.loop !13

173:                                              ; preds = %148, %144
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %469

174:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store i64 0, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  store i64 0, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  store i64 -1, ptr %18, align 8, !tbaa !5
  br label %175

175:                                              ; preds = %265, %174
  %176 = load i64, ptr %16, align 8, !tbaa !5
  %177 = load i64, ptr %4, align 8, !tbaa !5
  %178 = icmp slt i64 %176, %177
  br i1 %178, label %180, label %179

179:                                              ; preds = %175
  store i32 9, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %269

180:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %181 = load i64, ptr %16, align 8, !tbaa !5
  %182 = load i64, ptr %18, align 8, !tbaa !5
  %183 = icmp sgt i64 %181, %182
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  br i1 %183, label %184, label %185

184:                                              ; preds = %180
  br label %200

185:                                              ; preds = %180
  %186 = load i64, ptr %17, align 8, !tbaa !5
  %187 = load i64, ptr %18, align 8, !tbaa !5
  %188 = load i64, ptr %16, align 8, !tbaa !5
  %189 = sub nsw i64 %187, %188
  %190 = add nsw i64 %189, 1
  %191 = add nsw i64 %186, %190
  %192 = getelementptr inbounds i64, ptr %86, i64 %191
  %193 = load i64, ptr %18, align 8, !tbaa !5
  %194 = load i64, ptr %16, align 8, !tbaa !5
  %195 = sub nsw i64 %193, %194
  %196 = add nsw i64 %195, 1
  store i64 %196, ptr %20, align 8, !tbaa !5
  %197 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %192, ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %198 unwind label %237

198:                                              ; preds = %185
  %199 = load i64, ptr %197, align 8, !tbaa !5
  br label %200

200:                                              ; preds = %198, %184
  %201 = phi i64 [ 0, %184 ], [ %199, %198 ]
  %202 = add nsw i64 %201, 1
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  store i64 %202, ptr %19, align 8, !tbaa !5
  br label %203

203:                                              ; preds = %234, %200
  %204 = load i64, ptr %16, align 8, !tbaa !5
  %205 = load i64, ptr %19, align 8, !tbaa !5
  %206 = add nsw i64 %204, %205
  %207 = sub nsw i64 %206, 1
  %208 = load i64, ptr %4, align 8, !tbaa !5
  %209 = icmp slt i64 %207, %208
  br i1 %209, label %210, label %232

210:                                              ; preds = %203
  %211 = load i64, ptr %16, align 8, !tbaa !5
  %212 = load i64, ptr %19, align 8, !tbaa !5
  %213 = sub nsw i64 %211, %212
  %214 = icmp sge i64 %213, 0
  br i1 %214, label %215, label %232

215:                                              ; preds = %210
  %216 = load i64, ptr %16, align 8, !tbaa !5
  %217 = load i64, ptr %19, align 8, !tbaa !5
  %218 = add nsw i64 %216, %217
  %219 = sub nsw i64 %218, 1
  %220 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %219)
          to label %221 unwind label %241

221:                                              ; preds = %215
  %222 = load i8, ptr %220, align 1, !tbaa !9
  %223 = sext i8 %222 to i32
  %224 = load i64, ptr %16, align 8, !tbaa !5
  %225 = load i64, ptr %19, align 8, !tbaa !5
  %226 = sub nsw i64 %224, %225
  %227 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %226)
          to label %228 unwind label %241

228:                                              ; preds = %221
  %229 = load i8, ptr %227, align 1, !tbaa !9
  %230 = sext i8 %229 to i32
  %231 = icmp eq i32 %223, %230
  br label %232

232:                                              ; preds = %228, %210, %203
  %233 = phi i1 [ false, %210 ], [ false, %203 ], [ %231, %228 ]
  br i1 %233, label %234, label %245

234:                                              ; preds = %232
  %235 = load i64, ptr %19, align 8, !tbaa !5
  %236 = add nsw i64 %235, 1
  store i64 %236, ptr %19, align 8, !tbaa !5
  br label %203, !llvm.loop !14

237:                                              ; preds = %185
  %238 = landingpad { ptr, i32 }
          cleanup
  %239 = extractvalue { ptr, i32 } %238, 0
  store ptr %239, ptr %2, align 8
  %240 = extractvalue { ptr, i32 } %238, 1
  store i32 %240, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %268

241:                                              ; preds = %221, %215
  %242 = landingpad { ptr, i32 }
          cleanup
  %243 = extractvalue { ptr, i32 } %242, 0
  store ptr %243, ptr %2, align 8
  %244 = extractvalue { ptr, i32 } %242, 1
  store i32 %244, ptr %3, align 4
  br label %268

245:                                              ; preds = %232
  %246 = load i64, ptr %19, align 8, !tbaa !5
  %247 = add nsw i64 %246, -1
  store i64 %247, ptr %19, align 8, !tbaa !5
  %248 = load i64, ptr %16, align 8, !tbaa !5
  %249 = getelementptr inbounds i64, ptr %86, i64 %248
  store i64 %247, ptr %249, align 8, !tbaa !5
  %250 = load i64, ptr %16, align 8, !tbaa !5
  %251 = load i64, ptr %19, align 8, !tbaa !5
  %252 = add nsw i64 %250, %251
  %253 = sub nsw i64 %252, 1
  %254 = load i64, ptr %18, align 8, !tbaa !5
  %255 = icmp sgt i64 %253, %254
  br i1 %255, label %256, label %264

256:                                              ; preds = %245
  %257 = load i64, ptr %16, align 8, !tbaa !5
  %258 = load i64, ptr %19, align 8, !tbaa !5
  %259 = sub nsw i64 %257, %258
  store i64 %259, ptr %17, align 8, !tbaa !5
  %260 = load i64, ptr %16, align 8, !tbaa !5
  %261 = load i64, ptr %19, align 8, !tbaa !5
  %262 = add nsw i64 %260, %261
  %263 = sub nsw i64 %262, 1
  store i64 %263, ptr %18, align 8, !tbaa !5
  br label %264

264:                                              ; preds = %256, %245
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %265

265:                                              ; preds = %264
  %266 = load i64, ptr %16, align 8, !tbaa !5
  %267 = add nsw i64 %266, 1
  store i64 %267, ptr %16, align 8, !tbaa !5
  br label %175, !llvm.loop !15

268:                                              ; preds = %241, %237
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %469

269:                                              ; preds = %179
  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 %5, align 8, !tbaa !5
  store i64 %270, ptr %23, align 8, !tbaa !5
  br label %271

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

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

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 %84, 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 %84, 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 %5, 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 %5, 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 %6, 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 %6, 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 %25, align 8, !tbaa !5
  %319 = icmp sle i64 %317, %318
  br i1 %319, label %320, label %341

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

324:                                              ; preds = %320
  %325 = load i64, ptr %25, align 8, !tbaa !5
  %326 = load i64, ptr %6, align 8, !tbaa !5
  %327 = icmp eq i64 %325, %326
  br i1 %327, label %328, label %341

328:                                              ; preds = %324, %320
  %329 = load i64, ptr %21, align 8, !tbaa !5
  %330 = load i64, ptr %25, align 8, !tbaa !5
  %331 = load i64, ptr %24, align 8, !tbaa !5
  %332 = sub nsw i64 %330, %331
  %333 = add nsw i64 %332, 1
  %334 = icmp slt i64 %329, %333
  br i1 %334, label %335, label %341

335:                                              ; preds = %328
  %336 = load i64, ptr %25, align 8, !tbaa !5
  %337 = load i64, ptr %24, align 8, !tbaa !5
  %338 = sub nsw i64 %336, %337
  %339 = add nsw i64 %338, 1
  store i64 %339, ptr %21, align 8, !tbaa !5
  %340 = load i64, ptr %24, align 8, !tbaa !5
  store i64 %340, ptr %22, align 8, !tbaa !5
  br label %341

341:                                              ; preds = %335, %328, %324, %316
  %342 = load i64, ptr %23, align 8, !tbaa !5
  %343 = load i64, ptr %23, align 8, !tbaa !5
  %344 = getelementptr inbounds i64, ptr %86, i64 %343
  %345 = load i64, ptr %344, align 8, !tbaa !5
  %346 = sub nsw i64 %342, %345
  store i64 %346, ptr %24, align 8, !tbaa !5
  %347 = load i64, ptr %23, align 8, !tbaa !5
  %348 = load i64, ptr %23, align 8, !tbaa !5
  %349 = getelementptr inbounds i64, ptr %86, i64 %348
  %350 = load i64, ptr %349, align 8, !tbaa !5
  %351 = add nsw i64 %347, %350
  %352 = sub nsw i64 %351, 1
  store i64 %352, ptr %25, align 8, !tbaa !5
  %353 = load i64, ptr %24, align 8, !tbaa !5
  %354 = load i64, ptr %5, align 8, !tbaa !5
  %355 = icmp slt i64 %353, %354
  br i1 %355, label %356, label %366

356:                                              ; preds = %341
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %357 = load i64, ptr %5, align 8, !tbaa !5
  %358 = load i64, ptr %24, align 8, !tbaa !5
  %359 = sub nsw i64 %357, %358
  store i64 %359, ptr %28, align 8, !tbaa !5
  %360 = load i64, ptr %28, align 8, !tbaa !5
  %361 = load i64, ptr %25, align 8, !tbaa !5
  %362 = sub nsw i64 %361, %360
  store i64 %362, ptr %25, align 8, !tbaa !5
  %363 = load i64, ptr %28, align 8, !tbaa !5
  %364 = load i64, ptr %24, align 8, !tbaa !5
  %365 = add nsw i64 %364, %363
  store i64 %365, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  br label %366

366:                                              ; preds = %356, %341
  %367 = load i64, ptr %25, align 8, !tbaa !5
  %368 = load i64, ptr %6, align 8, !tbaa !5
  %369 = icmp sgt i64 %367, %368
  br i1 %369, label %370, label %380

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

380:                                              ; preds = %370, %366
  %381 = load i64, ptr %24, align 8, !tbaa !5
  %382 = load i64, ptr %25, align 8, !tbaa !5
  %383 = icmp sle i64 %381, %382
  br i1 %383, label %384, label %405

384:                                              ; preds = %380
  %385 = load i64, ptr %24, align 8, !tbaa !5
  %386 = load i64, ptr %5, align 8, !tbaa !5
  %387 = icmp eq i64 %385, %386
  br i1 %387, label %392, label %388

388:                                              ; preds = %384
  %389 = load i64, ptr %25, align 8, !tbaa !5
  %390 = load i64, ptr %6, align 8, !tbaa !5
  %391 = icmp eq i64 %389, %390
  br i1 %391, label %392, label %405

392:                                              ; preds = %388, %384
  %393 = load i64, ptr %21, align 8, !tbaa !5
  %394 = load i64, ptr %25, align 8, !tbaa !5
  %395 = load i64, ptr %24, align 8, !tbaa !5
  %396 = sub nsw i64 %394, %395
  %397 = add nsw i64 %396, 1
  %398 = icmp slt i64 %393, %397
  br i1 %398, label %399, label %405

399:                                              ; preds = %392
  %400 = load i64, ptr %25, align 8, !tbaa !5
  %401 = load i64, ptr %24, align 8, !tbaa !5
  %402 = sub nsw i64 %400, %401
  %403 = add nsw i64 %402, 1
  store i64 %403, ptr %21, align 8, !tbaa !5
  %404 = load i64, ptr %24, align 8, !tbaa !5
  store i64 %404, ptr %22, align 8, !tbaa !5
  br label %405

405:                                              ; preds = %399, %392, %388, %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 %406

406:                                              ; preds = %405
  %407 = load i64, ptr %23, align 8, !tbaa !5
  %408 = add nsw i64 %407, 1
  store i64 %408, ptr %23, align 8, !tbaa !5
  br label %271, !llvm.loop !16

409:                                              ; preds = %275
  call void @llvm.lifetime.start.p0(i64 32, ptr %30) #7
  %410 = load i64, ptr %5, 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 %410)
          to label %411 unwind label %431

411:                                              ; preds = %409
  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 %412 unwind label %435

412:                                              ; preds = %411
  %413 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %31) #7
  %414 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %32, i32 0, i32 0
  store ptr %413, ptr %414, align 8
  %415 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %31) #7
  %416 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %33, i32 0, i32 0
  store ptr %415, ptr %416, align 8
  %417 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %32, i32 0, i32 0
  %418 = load ptr, ptr %417, align 8
  %419 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %33, i32 0, i32 0
  %420 = load ptr, ptr %419, align 8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr %418, ptr %420)
          to label %421 unwind label %439

421:                                              ; preds = %412
  %422 = load i64, ptr %22, align 8, !tbaa !5
  %423 = icmp ne i64 %422, -1
  br i1 %423, label %424, label %457

424:                                              ; preds = %421
  call void @llvm.lifetime.start.p0(i64 32, ptr %34) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %35) #7
  %425 = load i64, ptr %22, align 8, !tbaa !5
  %426 = 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 %425, i64 noundef %426)
          to label %427 unwind label %443

427:                                              ; preds = %424
  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 %428 unwind label %447

428:                                              ; preds = %427
  %429 = 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 %430 unwind label %451

430:                                              ; preds = %428
  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 %457

431:                                              ; preds = %409
  %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 %468

435:                                              ; preds = %411
  %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 %467

439:                                              ; preds = %459, %457, %412
  %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 %466

443:                                              ; preds = %424
  %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
  br label %456

447:                                              ; preds = %427
  %448 = landingpad { ptr, i32 }
          cleanup
  %449 = extractvalue { ptr, i32 } %448, 0
  store ptr %449, ptr %2, align 8
  %450 = extractvalue { ptr, i32 } %448, 1
  store i32 %450, ptr %3, align 4
  br label %455

451:                                              ; preds = %428
  %452 = landingpad { ptr, i32 }
          cleanup
  %453 = extractvalue { ptr, i32 } %452, 0
  store ptr %453, ptr %2, align 8
  %454 = extractvalue { ptr, i32 } %452, 1
  store i32 %454, ptr %3, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #7
  br label %455

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

456:                                              ; preds = %455, %443
  call void @llvm.lifetime.end.p0(i64 32, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %34) #7
  br label %466

457:                                              ; preds = %430, %421
  %458 = 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 %459 unwind label %439

459:                                              ; preds = %457
  %460 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %458, ptr noundef @.str)
          to label %461 unwind label %439

461:                                              ; preds = %459
  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
  %462 = load ptr, ptr %8, align 8
  call void @llvm.stackrestore.p0(ptr %462)
  store i32 0, ptr %7, align 4
  br label %463

463:                                              ; preds = %461, %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  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
  %464 = load i32, ptr %7, align 4
  switch i32 %464, label %476 [
    i32 0, label %465
    i32 1, label %465
  ]

465:                                              ; preds = %463, %463
  ret void

466:                                              ; preds = %456, %439
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #7
  br label %467

467:                                              ; preds = %466, %435
  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 %468

468:                                              ; preds = %467, %431
  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 %469

469:                                              ; preds = %468, %268, %173, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %470

470:                                              ; preds = %469, %64
  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 %471

471:                                              ; preds = %470
  %472 = load ptr, ptr %2, align 8
  %473 = load i32, ptr %3, align 4
  %474 = insertvalue { ptr, i32 } poison, ptr %472, 0
  %475 = insertvalue { ptr, i32 } %474, i32 %473, 1
  resume { ptr, i32 } %475

476:                                              ; preds = %463
  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: 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) #4

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

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

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

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

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

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

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

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

9:                                                ; preds = %0
  %10 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #8
  %11 = icmp sgt i64 %10, 1
  br i1 %11, label %.lr.ph.preheader, label %.critedge

.lr.ph.preheader:                                 ; preds = %9
  %.0156228 = add nsw i64 %10, -1
  %12 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef 0)
  %13 = load i8, ptr %12, align 1, !tbaa !5
  %14 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %.0156228)
  %15 = load i8, ptr %14, align 1, !tbaa !5
  %16 = icmp eq i8 %13, %15
  br i1 %16, label %.lr.ph265, label %.lr.ph241.preheader

.lr.ph:                                           ; preds = %.lr.ph265
  %17 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %22)
  %18 = load i8, ptr %17, align 1, !tbaa !5
  %19 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %.0156)
  %20 = load i8, ptr %19, align 1, !tbaa !5
  %21 = icmp eq i8 %18, %20
  br i1 %21, label %.lr.ph265, label %.lr.ph241.preheader, !llvm.loop !8

.lr.ph265:                                        ; preds = %.lr.ph.preheader, %.lr.ph
  %.0155230264 = phi i64 [ %22, %.lr.ph ], [ 0, %.lr.ph.preheader ]
  %.0156231263 = phi i64 [ %.0156, %.lr.ph ], [ %.0156228, %.lr.ph.preheader ]
  %22 = add nuw nsw i64 %.0155230264, 1
  %.0156 = add nsw i64 %.0156231263, -1
  %23 = icmp slt i64 %22, %.0156
  br i1 %23, label %.lr.ph, label %.critedge, !llvm.loop !8

24:                                               ; preds = %0
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %157

26:                                               ; preds = %29, %.critedge
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %157

.critedge:                                        ; preds = %.lr.ph265, %9
  %28 = 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 %29 unwind label %26

29:                                               ; preds = %.critedge
  %30 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull @.str)
          to label %153 unwind label %26

.lr.ph241.preheader:                              ; preds = %.lr.ph, %.lr.ph.preheader
  %.0156231.lcssa = phi i64 [ %.0156228, %.lr.ph.preheader ], [ %.0156, %.lr.ph ]
  %.0155230.lcssa = phi i64 [ 0, %.lr.ph.preheader ], [ %22, %.lr.ph ]
  %.0156.in229.lcssa = phi i64 [ %10, %.lr.ph.preheader ], [ %.0156231263, %.lr.ph ]
  %31 = call ptr @llvm.stacksave.p0()
  %32 = alloca i64, i64 %10, align 16
  %33 = alloca i64, i64 %10, align 16
  br label %.lr.ph241

.lr.ph245.preheader:                              ; preds = %.critedge2
  %smax = call i64 @llvm.smax.i64(i64 %10, i64 1)
  br label %.lr.ph245

.lr.ph241:                                        ; preds = %.lr.ph241.preheader, %.critedge2
  %.0157240 = phi i64 [ %63, %.critedge2 ], [ 0, %.lr.ph241.preheader ]
  %.0180239 = phi i64 [ %spec.select216, %.critedge2 ], [ -1, %.lr.ph241.preheader ]
  %.0182238 = phi i64 [ %spec.select, %.critedge2 ], [ 0, %.lr.ph241.preheader ]
  %34 = icmp sgt i64 %.0157240, %.0180239
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  br i1 %34, label %41, label %35

35:                                               ; preds = %.lr.ph241
  %36 = sub nsw i64 %.0180239, %.0157240
  %37 = getelementptr i64, ptr %32, i64 %.0182238
  %38 = getelementptr i64, ptr %37, i64 %36
  store i64 %36, ptr %2, align 8, !tbaa !10
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %40 = load i64, ptr %39, align 8, !tbaa !10
  br label %41

41:                                               ; preds = %.lr.ph241, %35
  %42 = phi i64 [ %40, %35 ], [ 1, %.lr.ph241 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  %43 = add nsw i64 %42, %.0157240
  %44 = icmp slt i64 %43, %10
  br i1 %44, label %.lr.ph233, label %.critedge2

.lr.ph233:                                        ; preds = %41, %54
  %45 = phi i64 [ %56, %54 ], [ %43, %41 ]
  %.0179232 = phi i64 [ %55, %54 ], [ %42, %41 ]
  %46 = sub nsw i64 %.0157240, %.0179232
  %47 = icmp sgt i64 %46, -1
  br i1 %47, label %48, label %.critedge2

48:                                               ; preds = %.lr.ph233
  %49 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %45)
  %50 = load i8, ptr %49, align 1, !tbaa !5
  %51 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %46)
  %52 = load i8, ptr %51, align 1, !tbaa !5
  %53 = icmp eq i8 %50, %52
  br i1 %53, label %54, label %.critedge2

54:                                               ; preds = %48
  %55 = add nsw i64 %.0179232, 1
  %56 = add nsw i64 %55, %.0157240
  %57 = icmp slt i64 %56, %10
  br i1 %57, label %.lr.ph233, label %.critedge2, !llvm.loop !12

.critedge2:                                       ; preds = %48, %54, %.lr.ph233, %41
  %.0179.lcssa = phi i64 [ %42, %41 ], [ %.0179232, %.lr.ph233 ], [ %55, %54 ], [ %.0179232, %48 ]
  %58 = add nsw i64 %.0179.lcssa, -1
  %59 = getelementptr inbounds i64, ptr %32, i64 %.0157240
  store i64 %.0179.lcssa, ptr %59, align 8, !tbaa !10
  %60 = add nsw i64 %58, %.0157240
  %61 = icmp sgt i64 %60, %.0180239
  %62 = sub nsw i64 %.0157240, %58
  %spec.select = select i1 %61, i64 %62, i64 %.0182238
  %spec.select216 = call i64 @llvm.smax.i64(i64 %60, i64 %.0180239)
  %63 = add nuw nsw i64 %.0157240, 1
  %exitcond.not = icmp eq i64 %63, %10
  br i1 %exitcond.not, label %.lr.ph245.preheader, label %.lr.ph241, !llvm.loop !13

.preheader:                                       ; preds = %.critedge4
  %.not198.not246 = icmp slt i64 %.0155230.lcssa, %.0156.in229.lcssa
  br i1 %.not198.not246, label %.lr.ph250, label %._crit_edge

.lr.ph245:                                        ; preds = %.lr.ph245.preheader, %.critedge4
  %.0174244 = phi i64 [ %spec.select218, %.critedge4 ], [ -1, %.lr.ph245.preheader ]
  %.0176243 = phi i64 [ %spec.select217, %.critedge4 ], [ 0, %.lr.ph245.preheader ]
  %.0178242 = phi i64 [ %90, %.critedge4 ], [ 0, %.lr.ph245.preheader ]
  %64 = icmp sgt i64 %.0178242, %.0174244
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  br i1 %64, label %72, label %65

65:                                               ; preds = %.lr.ph245
  %66 = sub nsw i64 %.0174244, %.0178242
  %67 = add nsw i64 %66, 1
  %68 = getelementptr i64, ptr %33, i64 %.0176243
  %69 = getelementptr i64, ptr %68, i64 %67
  store i64 %67, ptr %3, align 8, !tbaa !10
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %71 = load i64, ptr %70, align 8, !tbaa !10
  br label %72

72:                                               ; preds = %.lr.ph245, %65
  %73 = phi i64 [ %71, %65 ], [ 0, %.lr.ph245 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  br label %74

74:                                               ; preds = %80, %72
  %.0173.in = phi i64 [ %73, %72 ], [ %.0173, %80 ]
  %.0173 = add nsw i64 %.0173.in, 1
  %75 = add i64 %.0173.in, %.0178242
  %76 = icmp slt i64 %75, %10
  br i1 %76, label %77, label %.critedge4

77:                                               ; preds = %74
  %78 = sub nsw i64 %.0178242, %.0173
  %79 = icmp sgt i64 %78, -1
  br i1 %79, label %80, label %.critedge4

80:                                               ; preds = %77
  %81 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %75)
  %82 = load i8, ptr %81, align 1, !tbaa !5
  %83 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %78)
  %84 = load i8, ptr %83, align 1, !tbaa !5
  %85 = icmp eq i8 %82, %84
  br i1 %85, label %74, label %.critedge4, !llvm.loop !14

.critedge4:                                       ; preds = %77, %74, %80
  %86 = getelementptr inbounds i64, ptr %33, i64 %.0178242
  store i64 %.0173.in, ptr %86, align 8, !tbaa !10
  %87 = add nsw i64 %75, -1
  %88 = icmp sgt i64 %87, %.0174244
  %89 = sub nsw i64 %.0178242, %.0173.in
  %spec.select217 = select i1 %88, i64 %89, i64 %.0176243
  %spec.select218 = call i64 @llvm.smax.i64(i64 %87, i64 %.0174244)
  %90 = add nuw nsw i64 %.0178242, 1
  %exitcond256.not = icmp eq i64 %90, %smax
  br i1 %exitcond256.not, label %.preheader, label %.lr.ph245, !llvm.loop !15

._crit_edge:                                      ; preds = %122, %.preheader
  %.0170.lcssa = phi i64 [ 0, %.preheader ], [ %.2172, %122 ]
  %.0167.lcssa = phi i64 [ -1, %.preheader ], [ %.2169, %122 ]
  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 %.0155230.lcssa)
          to label %124 unwind label %134

.lr.ph250:                                        ; preds = %.preheader, %122
  %.0166249 = phi i64 [ %123, %122 ], [ %.0155230.lcssa, %.preheader ]
  %.0167248 = phi i64 [ %.2169, %122 ], [ -1, %.preheader ]
  %.0170247 = phi i64 [ %.2172, %122 ], [ 0, %.preheader ]
  %91 = getelementptr inbounds i64, ptr %32, i64 %.0166249
  %92 = load i64, ptr %91, align 8, !tbaa !10
  %93 = sub nsw i64 %.0166249, %92
  %94 = add nsw i64 %93, 1
  %95 = icmp slt i64 %94, %.0155230.lcssa
  %.neg = sub i64 %94, %.0155230.lcssa
  %.0162 = call i64 @llvm.smax.i64(i64 %94, i64 %.0155230.lcssa)
  %96 = select i1 %95, i64 %.neg, i64 0
  %97 = add nsw i64 %.0166249, -1
  %98 = add i64 %97, %92
  %.0158 = add i64 %98, %96
  %.not206 = icmp slt i64 %.0158, %.0156.in229.lcssa
  %99 = sub nsw i64 %.0158, %.0156231.lcssa
  %100 = select i1 %.not206, i64 0, i64 %99
  %.1163 = add nsw i64 %100, %.0162
  %.1159 = select i1 %.not206, i64 %.0158, i64 %.0156231.lcssa
  %.not207 = icmp sgt i64 %.1163, %.1159
  br i1 %.not207, label %107, label %101

101:                                              ; preds = %.lr.ph250
  %102 = icmp eq i64 %.1163, %.0155230.lcssa
  %103 = icmp eq i64 %.1159, %.0156231.lcssa
  %or.cond = or i1 %103, %102
  br i1 %or.cond, label %104, label %107

104:                                              ; preds = %101
  %105 = sub nsw i64 %.1159, %.1163
  %.not208 = icmp sgt i64 %.0170247, %105
  %106 = add nsw i64 %105, 1
  %spec.select219 = select i1 %.not208, i64 %.0170247, i64 %106
  %spec.select220 = select i1 %.not208, i64 %.0167248, i64 %.1163
  br label %107

107:                                              ; preds = %104, %101, %.lr.ph250
  %.1171 = phi i64 [ %.0170247, %.lr.ph250 ], [ %.0170247, %101 ], [ %spec.select219, %104 ]
  %.1168 = phi i64 [ %.0167248, %.lr.ph250 ], [ %.0167248, %101 ], [ %spec.select220, %104 ]
  %108 = getelementptr inbounds i64, ptr %33, i64 %.0166249
  %109 = load i64, ptr %108, align 8, !tbaa !10
  %110 = sub nsw i64 %.0166249, %109
  %111 = icmp slt i64 %110, %.0155230.lcssa
  %.neg209 = sub i64 %110, %.0155230.lcssa
  %.2164 = call i64 @llvm.smax.i64(i64 %110, i64 %.0155230.lcssa)
  %112 = select i1 %111, i64 %.neg209, i64 0
  %113 = add i64 %97, %109
  %.2160 = add i64 %113, %112
  %.not210 = icmp slt i64 %.2160, %.0156.in229.lcssa
  %114 = sub nsw i64 %.2160, %.0156231.lcssa
  %115 = select i1 %.not210, i64 0, i64 %114
  %.3165 = add nsw i64 %115, %.2164
  %.3161 = select i1 %.not210, i64 %.2160, i64 %.0156231.lcssa
  %.not211 = icmp sgt i64 %.3165, %.3161
  br i1 %.not211, label %122, label %116

116:                                              ; preds = %107
  %117 = icmp eq i64 %.3165, %.0155230.lcssa
  %118 = icmp eq i64 %.3161, %.0156231.lcssa
  %or.cond221 = or i1 %118, %117
  br i1 %or.cond221, label %119, label %122

119:                                              ; preds = %116
  %120 = sub nsw i64 %.3161, %.3165
  %.not212 = icmp sgt i64 %.1171, %120
  %121 = add nsw i64 %120, 1
  %spec.select222 = select i1 %.not212, i64 %.1171, i64 %121
  %spec.select223 = select i1 %.not212, i64 %.1168, i64 %.3165
  br label %122

122:                                              ; preds = %119, %116, %107
  %.2172 = phi i64 [ %.1171, %107 ], [ %.1171, %116 ], [ %spec.select222, %119 ]
  %.2169 = phi i64 [ %.1168, %107 ], [ %.1168, %116 ], [ %spec.select223, %119 ]
  %123 = add nuw nsw i64 %.0166249, 1
  %.not198.not = icmp slt i64 %123, %.0156.in229.lcssa
  br i1 %.not198.not, label %.lr.ph250, label %._crit_edge, !llvm.loop !16

124:                                              ; preds = %._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 %125 unwind label %136

125:                                              ; preds = %124
  %126 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  %127 = 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 %126, ptr %127)
          to label %128 unwind label %138

128:                                              ; preds = %125
  %.not199 = icmp eq i64 %.0167.lcssa, -1
  br i1 %.not199, label %148, label %129

129:                                              ; preds = %128
  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 %.0167.lcssa, i64 noundef %.0170.lcssa)
          to label %130 unwind label %140

130:                                              ; preds = %129
  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 %131 unwind label %142

131:                                              ; preds = %130
  %132 = 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 %133 unwind label %144

133:                                              ; preds = %131
  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 %148

134:                                              ; preds = %._crit_edge
  %135 = landingpad { ptr, i32 }
          cleanup
  br label %156

136:                                              ; preds = %124
  %137 = landingpad { ptr, i32 }
          cleanup
  br label %155

138:                                              ; preds = %150, %148, %125
  %139 = landingpad { ptr, i32 }
          cleanup
  br label %154

140:                                              ; preds = %129
  %141 = landingpad { ptr, i32 }
          cleanup
  br label %147

142:                                              ; preds = %130
  %143 = landingpad { ptr, i32 }
          cleanup
  br label %146

144:                                              ; preds = %131
  %145 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  br label %146

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

147:                                              ; preds = %146, %140
  %.pn.pn = phi { ptr, i32 } [ %.pn, %146 ], [ %141, %140 ]
  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 %154

148:                                              ; preds = %133, %128
  %149 = 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 %150 unwind label %138

150:                                              ; preds = %148
  %151 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %149, ptr noundef nonnull @.str)
          to label %152 unwind label %138

152:                                              ; preds = %150
  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
  call void @llvm.stackrestore.p0(ptr %31)
  br label %153

153:                                              ; preds = %29, %152
  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

154:                                              ; preds = %147, %138
  %.pn202 = phi { ptr, i32 } [ %139, %138 ], [ %.pn.pn, %147 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  br label %155

155:                                              ; preds = %154, %136
  %.pn202.pn = phi { ptr, i32 } [ %.pn202, %154 ], [ %137, %136 ]
  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 %156

156:                                              ; preds = %155, %134
  %.pn202.pn.pn = phi { ptr, i32 } [ %.pn202.pn, %155 ], [ %135, %134 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  br label %157

157:                                              ; preds = %26, %156, %24
  %.pn213.pn = phi { ptr, i32 } [ %25, %24 ], [ %27, %26 ], [ %.pn202.pn.pn, %156 ]
  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 } %.pn213.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 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 #4

; 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 #4

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

; 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 #6

; 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 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 #4

; 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 #4

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

; 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!11, !11, i64 0}
!11 = !{!"long", !6, i64 0}
!12 = distinct !{!12, !9}
!13 = distinct !{!13, !9}
!14 = distinct !{!14, !9}
!15 = distinct !{!15, !9}
!16 = distinct !{!16, !9}


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