; LLVM IR from ahampriyanshu/algo-ds-101 :: Algorithms/DP/LCS (lcs_of_3_strings)

; 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.std::allocator" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %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 %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::allocator", align 1
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store i32 0, ptr %1, align 4
  %26 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %27 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %28 = getelementptr i8, ptr %27, i64 -24
  %29 = load i64, ptr %28, align 8
  %30 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %29
  %31 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %30, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  %32 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %33 unwind label %56

33:                                               ; preds = %0
  %34 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %35 unwind label %56

35:                                               ; preds = %33
  %36 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %37 unwind label %56

37:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %38 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #8
  store i64 %38, ptr %7, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %39 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  store i64 %39, ptr %8, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %40 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  store i64 %40, ptr %9, align 8, !tbaa !8
  %41 = load i64, ptr %7, align 8, !tbaa !8
  %42 = add nsw i64 %41, 1
  %43 = load i64, ptr %8, align 8, !tbaa !8
  %44 = add nsw i64 %43, 1
  %45 = load i64, ptr %9, align 8, !tbaa !8
  %46 = add nsw i64 %45, 1
  %47 = call ptr @llvm.stacksave.p0()
  store ptr %47, ptr %10, align 8
  %48 = mul nuw i64 %42, %44
  %49 = mul nuw i64 %48, %46
  %50 = alloca i64, i64 %49, align 16
  store i64 %42, ptr %11, align 8
  store i64 %44, ptr %12, align 8
  store i64 %46, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  store i64 0, ptr %14, align 8, !tbaa !8
  br label %51

51:                                               ; preds = %202, %37
  %52 = load i64, ptr %14, align 8, !tbaa !8
  %53 = load i64, ptr %7, align 8, !tbaa !8
  %54 = icmp sle i64 %52, %53
  br i1 %54, label %60, label %55

55:                                               ; preds = %51
  store i32 2, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %205

56:                                               ; preds = %35, %33, %0
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %5, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %6, align 4
  br label %409

60:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  store i64 0, ptr %16, align 8, !tbaa !8
  br label %61

61:                                               ; preds = %198, %60
  %62 = load i64, ptr %16, align 8, !tbaa !8
  %63 = load i64, ptr %8, align 8, !tbaa !8
  %64 = icmp sle i64 %62, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %61
  store i32 5, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %201

66:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  store i64 0, ptr %17, align 8, !tbaa !8
  br label %67

67:                                               ; preds = %194, %66
  %68 = load i64, ptr %17, align 8, !tbaa !8
  %69 = load i64, ptr %9, align 8, !tbaa !8
  %70 = icmp sle i64 %68, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %67
  store i32 8, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %197

72:                                               ; preds = %67
  %73 = load i64, ptr %14, align 8, !tbaa !8
  %74 = icmp eq i64 %73, 0
  br i1 %74, label %81, label %75

75:                                               ; preds = %72
  %76 = load i64, ptr %16, align 8, !tbaa !8
  %77 = icmp eq i64 %76, 0
  br i1 %77, label %81, label %78

78:                                               ; preds = %75
  %79 = load i64, ptr %17, align 8, !tbaa !8
  %80 = icmp eq i64 %79, 0
  br i1 %80, label %81, label %91

81:                                               ; preds = %78, %75, %72
  %82 = load i64, ptr %14, align 8, !tbaa !8
  %83 = mul nuw i64 %44, %46
  %84 = mul nsw i64 %82, %83
  %85 = getelementptr inbounds i64, ptr %50, i64 %84
  %86 = load i64, ptr %16, align 8, !tbaa !8
  %87 = mul nsw i64 %86, %46
  %88 = getelementptr inbounds i64, ptr %85, i64 %87
  %89 = load i64, ptr %17, align 8, !tbaa !8
  %90 = getelementptr inbounds i64, ptr %88, i64 %89
  store i64 0, ptr %90, align 8, !tbaa !8
  br label %193

91:                                               ; preds = %78
  %92 = load i64, ptr %14, align 8, !tbaa !8
  %93 = sub nsw i64 %92, 1
  %94 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %93)
          to label %95 unwind label %143

95:                                               ; preds = %91
  %96 = load i8, ptr %94, align 1, !tbaa !11
  %97 = sext i8 %96 to i32
  %98 = load i64, ptr %16, align 8, !tbaa !8
  %99 = sub nsw i64 %98, 1
  %100 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %99)
          to label %101 unwind label %143

101:                                              ; preds = %95
  %102 = load i8, ptr %100, align 1, !tbaa !11
  %103 = sext i8 %102 to i32
  %104 = icmp eq i32 %97, %103
  br i1 %104, label %105, label %147

105:                                              ; preds = %101
  %106 = load i64, ptr %16, align 8, !tbaa !8
  %107 = sub nsw i64 %106, 1
  %108 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %107)
          to label %109 unwind label %143

109:                                              ; preds = %105
  %110 = load i8, ptr %108, align 1, !tbaa !11
  %111 = sext i8 %110 to i32
  %112 = load i64, ptr %17, align 8, !tbaa !8
  %113 = sub nsw i64 %112, 1
  %114 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %113)
          to label %115 unwind label %143

115:                                              ; preds = %109
  %116 = load i8, ptr %114, align 1, !tbaa !11
  %117 = sext i8 %116 to i32
  %118 = icmp eq i32 %111, %117
  br i1 %118, label %119, label %147

119:                                              ; preds = %115
  %120 = load i64, ptr %14, align 8, !tbaa !8
  %121 = sub nsw i64 %120, 1
  %122 = mul nuw i64 %44, %46
  %123 = mul nsw i64 %121, %122
  %124 = getelementptr inbounds i64, ptr %50, i64 %123
  %125 = load i64, ptr %16, align 8, !tbaa !8
  %126 = sub nsw i64 %125, 1
  %127 = mul nsw i64 %126, %46
  %128 = getelementptr inbounds i64, ptr %124, i64 %127
  %129 = load i64, ptr %17, align 8, !tbaa !8
  %130 = sub nsw i64 %129, 1
  %131 = getelementptr inbounds i64, ptr %128, i64 %130
  %132 = load i64, ptr %131, align 8, !tbaa !8
  %133 = add nsw i64 %132, 1
  %134 = load i64, ptr %14, align 8, !tbaa !8
  %135 = mul nuw i64 %44, %46
  %136 = mul nsw i64 %134, %135
  %137 = getelementptr inbounds i64, ptr %50, i64 %136
  %138 = load i64, ptr %16, align 8, !tbaa !8
  %139 = mul nsw i64 %138, %46
  %140 = getelementptr inbounds i64, ptr %137, i64 %139
  %141 = load i64, ptr %17, align 8, !tbaa !8
  %142 = getelementptr inbounds i64, ptr %140, i64 %141
  store i64 %133, ptr %142, align 8, !tbaa !8
  br label %192

143:                                              ; preds = %179, %147, %109, %105, %95, %91
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %5, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %408

147:                                              ; preds = %115, %101
  %148 = load i64, ptr %14, align 8, !tbaa !8
  %149 = sub nsw i64 %148, 1
  %150 = mul nuw i64 %44, %46
  %151 = mul nsw i64 %149, %150
  %152 = getelementptr inbounds i64, ptr %50, i64 %151
  %153 = load i64, ptr %16, align 8, !tbaa !8
  %154 = mul nsw i64 %153, %46
  %155 = getelementptr inbounds i64, ptr %152, i64 %154
  %156 = load i64, ptr %17, align 8, !tbaa !8
  %157 = getelementptr inbounds i64, ptr %155, i64 %156
  %158 = load i64, ptr %14, align 8, !tbaa !8
  %159 = mul nuw i64 %44, %46
  %160 = mul nsw i64 %158, %159
  %161 = getelementptr inbounds i64, ptr %50, i64 %160
  %162 = load i64, ptr %16, align 8, !tbaa !8
  %163 = sub nsw i64 %162, 1
  %164 = mul nsw i64 %163, %46
  %165 = getelementptr inbounds i64, ptr %161, i64 %164
  %166 = load i64, ptr %17, align 8, !tbaa !8
  %167 = getelementptr inbounds i64, ptr %165, i64 %166
  %168 = load i64, ptr %14, align 8, !tbaa !8
  %169 = mul nuw i64 %44, %46
  %170 = mul nsw i64 %168, %169
  %171 = getelementptr inbounds i64, ptr %50, i64 %170
  %172 = load i64, ptr %16, align 8, !tbaa !8
  %173 = mul nsw i64 %172, %46
  %174 = getelementptr inbounds i64, ptr %171, i64 %173
  %175 = load i64, ptr %17, align 8, !tbaa !8
  %176 = sub nsw i64 %175, 1
  %177 = getelementptr inbounds i64, ptr %174, i64 %176
  %178 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %167, ptr noundef nonnull align 8 dereferenceable(8) %177)
          to label %179 unwind label %143

179:                                              ; preds = %147
  %180 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %157, ptr noundef nonnull align 8 dereferenceable(8) %178)
          to label %181 unwind label %143

181:                                              ; preds = %179
  %182 = load i64, ptr %180, align 8, !tbaa !8
  %183 = load i64, ptr %14, align 8, !tbaa !8
  %184 = mul nuw i64 %44, %46
  %185 = mul nsw i64 %183, %184
  %186 = getelementptr inbounds i64, ptr %50, i64 %185
  %187 = load i64, ptr %16, align 8, !tbaa !8
  %188 = mul nsw i64 %187, %46
  %189 = getelementptr inbounds i64, ptr %186, i64 %188
  %190 = load i64, ptr %17, align 8, !tbaa !8
  %191 = getelementptr inbounds i64, ptr %189, i64 %190
  store i64 %182, ptr %191, align 8, !tbaa !8
  br label %192

192:                                              ; preds = %181, %119
  br label %193

193:                                              ; preds = %192, %81
  br label %194

194:                                              ; preds = %193
  %195 = load i64, ptr %17, align 8, !tbaa !8
  %196 = add nsw i64 %195, 1
  store i64 %196, ptr %17, align 8, !tbaa !8
  br label %67, !llvm.loop !12

197:                                              ; preds = %71
  br label %198

198:                                              ; preds = %197
  %199 = load i64, ptr %16, align 8, !tbaa !8
  %200 = add nsw i64 %199, 1
  store i64 %200, ptr %16, align 8, !tbaa !8
  br label %61, !llvm.loop !14

201:                                              ; preds = %65
  br label %202

202:                                              ; preds = %201
  %203 = load i64, ptr %14, align 8, !tbaa !8
  %204 = add nsw i64 %203, 1
  store i64 %204, ptr %14, align 8, !tbaa !8
  br label %51, !llvm.loop !15

205:                                              ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %206 = load i64, ptr %7, align 8, !tbaa !8
  %207 = mul nuw i64 %44, %46
  %208 = mul nsw i64 %206, %207
  %209 = getelementptr inbounds i64, ptr %50, i64 %208
  %210 = load i64, ptr %8, align 8, !tbaa !8
  %211 = mul nsw i64 %210, %46
  %212 = getelementptr inbounds i64, ptr %209, i64 %211
  %213 = load i64, ptr %9, align 8, !tbaa !8
  %214 = getelementptr inbounds i64, ptr %212, i64 %213
  %215 = load i64, ptr %214, align 8, !tbaa !8
  store i64 %215, ptr %18, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %216 = load i64, ptr %7, align 8, !tbaa !8
  store i64 %216, ptr %19, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %217 = load i64, ptr %8, align 8, !tbaa !8
  store i64 %217, ptr %20, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %218 = load i64, ptr %9, align 8, !tbaa !8
  store i64 %218, ptr %21, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %219 unwind label %273

219:                                              ; preds = %205
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #8
  br label %220

220:                                              ; preds = %388, %219
  %221 = load i64, ptr %19, align 8, !tbaa !8
  %222 = icmp sgt i64 %221, 0
  br i1 %222, label %223, label %229

223:                                              ; preds = %220
  %224 = load i64, ptr %20, align 8, !tbaa !8
  %225 = icmp sgt i64 %224, 0
  br i1 %225, label %226, label %229

226:                                              ; preds = %223
  %227 = load i64, ptr %21, align 8, !tbaa !8
  %228 = icmp sgt i64 %227, 0
  br label %229

229:                                              ; preds = %226, %223, %220
  %230 = phi i1 [ false, %223 ], [ false, %220 ], [ %228, %226 ]
  br i1 %230, label %231, label %389

231:                                              ; preds = %229
  %232 = load i64, ptr %19, align 8, !tbaa !8
  %233 = sub nsw i64 %232, 1
  %234 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %233)
          to label %235 unwind label %277

235:                                              ; preds = %231
  %236 = load i8, ptr %234, align 1, !tbaa !11
  %237 = sext i8 %236 to i32
  %238 = load i64, ptr %20, align 8, !tbaa !8
  %239 = sub nsw i64 %238, 1
  %240 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %239)
          to label %241 unwind label %277

241:                                              ; preds = %235
  %242 = load i8, ptr %240, align 1, !tbaa !11
  %243 = sext i8 %242 to i32
  %244 = icmp eq i32 %237, %243
  br i1 %244, label %245, label %281

245:                                              ; preds = %241
  %246 = load i64, ptr %20, align 8, !tbaa !8
  %247 = sub nsw i64 %246, 1
  %248 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %247)
          to label %249 unwind label %277

249:                                              ; preds = %245
  %250 = load i8, ptr %248, align 1, !tbaa !11
  %251 = sext i8 %250 to i32
  %252 = load i64, ptr %21, align 8, !tbaa !8
  %253 = sub nsw i64 %252, 1
  %254 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %253)
          to label %255 unwind label %277

255:                                              ; preds = %249
  %256 = load i8, ptr %254, align 1, !tbaa !11
  %257 = sext i8 %256 to i32
  %258 = icmp eq i32 %251, %257
  br i1 %258, label %259, label %281

259:                                              ; preds = %255
  %260 = load i64, ptr %19, align 8, !tbaa !8
  %261 = sub nsw i64 %260, 1
  %262 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %261)
          to label %263 unwind label %277

263:                                              ; preds = %259
  %264 = load i8, ptr %262, align 1, !tbaa !11
  %265 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %22, i8 noundef signext %264)
          to label %266 unwind label %277

266:                                              ; preds = %263
  %267 = load i64, ptr %19, align 8, !tbaa !8
  %268 = add nsw i64 %267, -1
  store i64 %268, ptr %19, align 8, !tbaa !8
  %269 = load i64, ptr %20, align 8, !tbaa !8
  %270 = add nsw i64 %269, -1
  store i64 %270, ptr %20, align 8, !tbaa !8
  %271 = load i64, ptr %21, align 8, !tbaa !8
  %272 = add nsw i64 %271, -1
  store i64 %272, ptr %21, align 8, !tbaa !8
  br label %388

273:                                              ; preds = %205
  %274 = landingpad { ptr, i32 }
          cleanup
  %275 = extractvalue { ptr, i32 } %274, 0
  store ptr %275, ptr %5, align 8
  %276 = extractvalue { ptr, i32 } %274, 1
  store i32 %276, ptr %6, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #8
  br label %407

277:                                              ; preds = %402, %400, %398, %389, %263, %259, %249, %245, %235, %231
  %278 = landingpad { ptr, i32 }
          cleanup
  %279 = extractvalue { ptr, i32 } %278, 0
  store ptr %279, ptr %5, align 8
  %280 = extractvalue { ptr, i32 } %278, 1
  store i32 %280, ptr %6, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #8
  br label %407

281:                                              ; preds = %255, %241
  %282 = load i64, ptr %19, align 8, !tbaa !8
  %283 = sub nsw i64 %282, 1
  %284 = mul nuw i64 %44, %46
  %285 = mul nsw i64 %283, %284
  %286 = getelementptr inbounds i64, ptr %50, i64 %285
  %287 = load i64, ptr %20, align 8, !tbaa !8
  %288 = mul nsw i64 %287, %46
  %289 = getelementptr inbounds i64, ptr %286, i64 %288
  %290 = load i64, ptr %21, align 8, !tbaa !8
  %291 = getelementptr inbounds i64, ptr %289, i64 %290
  %292 = load i64, ptr %291, align 8, !tbaa !8
  %293 = load i64, ptr %19, align 8, !tbaa !8
  %294 = mul nuw i64 %44, %46
  %295 = mul nsw i64 %293, %294
  %296 = getelementptr inbounds i64, ptr %50, i64 %295
  %297 = load i64, ptr %20, align 8, !tbaa !8
  %298 = sub nsw i64 %297, 1
  %299 = mul nsw i64 %298, %46
  %300 = getelementptr inbounds i64, ptr %296, i64 %299
  %301 = load i64, ptr %21, align 8, !tbaa !8
  %302 = getelementptr inbounds i64, ptr %300, i64 %301
  %303 = load i64, ptr %302, align 8, !tbaa !8
  %304 = icmp sgt i64 %292, %303
  br i1 %304, label %329, label %305

305:                                              ; preds = %281
  %306 = load i64, ptr %19, align 8, !tbaa !8
  %307 = sub nsw i64 %306, 1
  %308 = mul nuw i64 %44, %46
  %309 = mul nsw i64 %307, %308
  %310 = getelementptr inbounds i64, ptr %50, i64 %309
  %311 = load i64, ptr %20, align 8, !tbaa !8
  %312 = mul nsw i64 %311, %46
  %313 = getelementptr inbounds i64, ptr %310, i64 %312
  %314 = load i64, ptr %21, align 8, !tbaa !8
  %315 = getelementptr inbounds i64, ptr %313, i64 %314
  %316 = load i64, ptr %315, align 8, !tbaa !8
  %317 = load i64, ptr %19, align 8, !tbaa !8
  %318 = mul nuw i64 %44, %46
  %319 = mul nsw i64 %317, %318
  %320 = getelementptr inbounds i64, ptr %50, i64 %319
  %321 = load i64, ptr %20, align 8, !tbaa !8
  %322 = mul nsw i64 %321, %46
  %323 = getelementptr inbounds i64, ptr %320, i64 %322
  %324 = load i64, ptr %21, align 8, !tbaa !8
  %325 = sub nsw i64 %324, 1
  %326 = getelementptr inbounds i64, ptr %323, i64 %325
  %327 = load i64, ptr %326, align 8, !tbaa !8
  %328 = icmp sgt i64 %316, %327
  br i1 %328, label %329, label %332

329:                                              ; preds = %305, %281
  %330 = load i64, ptr %19, align 8, !tbaa !8
  %331 = add nsw i64 %330, -1
  store i64 %331, ptr %19, align 8, !tbaa !8
  br label %387

332:                                              ; preds = %305
  %333 = load i64, ptr %19, align 8, !tbaa !8
  %334 = mul nuw i64 %44, %46
  %335 = mul nsw i64 %333, %334
  %336 = getelementptr inbounds i64, ptr %50, i64 %335
  %337 = load i64, ptr %20, align 8, !tbaa !8
  %338 = sub nsw i64 %337, 1
  %339 = mul nsw i64 %338, %46
  %340 = getelementptr inbounds i64, ptr %336, i64 %339
  %341 = load i64, ptr %21, align 8, !tbaa !8
  %342 = getelementptr inbounds i64, ptr %340, i64 %341
  %343 = load i64, ptr %342, align 8, !tbaa !8
  %344 = load i64, ptr %19, align 8, !tbaa !8
  %345 = sub nsw i64 %344, 1
  %346 = mul nuw i64 %44, %46
  %347 = mul nsw i64 %345, %346
  %348 = getelementptr inbounds i64, ptr %50, i64 %347
  %349 = load i64, ptr %20, align 8, !tbaa !8
  %350 = mul nsw i64 %349, %46
  %351 = getelementptr inbounds i64, ptr %348, i64 %350
  %352 = load i64, ptr %21, align 8, !tbaa !8
  %353 = getelementptr inbounds i64, ptr %351, i64 %352
  %354 = load i64, ptr %353, align 8, !tbaa !8
  %355 = icmp sgt i64 %343, %354
  br i1 %355, label %380, label %356

356:                                              ; preds = %332
  %357 = load i64, ptr %19, align 8, !tbaa !8
  %358 = mul nuw i64 %44, %46
  %359 = mul nsw i64 %357, %358
  %360 = getelementptr inbounds i64, ptr %50, i64 %359
  %361 = load i64, ptr %20, align 8, !tbaa !8
  %362 = sub nsw i64 %361, 1
  %363 = mul nsw i64 %362, %46
  %364 = getelementptr inbounds i64, ptr %360, i64 %363
  %365 = load i64, ptr %21, align 8, !tbaa !8
  %366 = getelementptr inbounds i64, ptr %364, i64 %365
  %367 = load i64, ptr %366, align 8, !tbaa !8
  %368 = load i64, ptr %19, align 8, !tbaa !8
  %369 = mul nuw i64 %44, %46
  %370 = mul nsw i64 %368, %369
  %371 = getelementptr inbounds i64, ptr %50, i64 %370
  %372 = load i64, ptr %20, align 8, !tbaa !8
  %373 = mul nsw i64 %372, %46
  %374 = getelementptr inbounds i64, ptr %371, i64 %373
  %375 = load i64, ptr %21, align 8, !tbaa !8
  %376 = sub nsw i64 %375, 1
  %377 = getelementptr inbounds i64, ptr %374, i64 %376
  %378 = load i64, ptr %377, align 8, !tbaa !8
  %379 = icmp sgt i64 %367, %378
  br i1 %379, label %380, label %383

380:                                              ; preds = %356, %332
  %381 = load i64, ptr %20, align 8, !tbaa !8
  %382 = add nsw i64 %381, -1
  store i64 %382, ptr %20, align 8, !tbaa !8
  br label %386

383:                                              ; preds = %356
  %384 = load i64, ptr %21, align 8, !tbaa !8
  %385 = add nsw i64 %384, -1
  store i64 %385, ptr %21, align 8, !tbaa !8
  br label %386

386:                                              ; preds = %383, %380
  br label %387

387:                                              ; preds = %386, %329
  br label %388

388:                                              ; preds = %387, %266
  br label %220, !llvm.loop !16

389:                                              ; preds = %229
  %390 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %22) #8
  %391 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %390, ptr %391, align 8
  %392 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %22) #8
  %393 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %392, ptr %393, align 8
  %394 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  %395 = load ptr, ptr %394, align 8
  %396 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  %397 = load ptr, ptr %396, align 8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr %395, ptr %397)
          to label %398 unwind label %277

398:                                              ; preds = %389
  %399 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
          to label %400 unwind label %277

400:                                              ; preds = %398
  %401 = 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) %22)
          to label %402 unwind label %277

402:                                              ; preds = %400
  %403 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %401, ptr noundef @.str.2)
          to label %404 unwind label %277

404:                                              ; preds = %402
  store i32 0, ptr %1, align 4
  store i32 1, ptr %15, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  %405 = load ptr, ptr %10, align 8
  call void @llvm.stackrestore.p0(ptr %405)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #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 %4) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #8
  %406 = load i32, ptr %1, align 4
  ret i32 %406

407:                                              ; preds = %277, %273
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %408

408:                                              ; preds = %407, %143
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br label %409

409:                                              ; preds = %408, %56
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #8
  br label %410

410:                                              ; preds = %409
  %411 = load ptr, ptr %5, align 8
  %412 = load i32, ptr %6, align 4
  %413 = insertvalue { ptr, i32 } poison, ptr %411, 0
  %414 = insertvalue { ptr, i32 } %413, i32 %412, 1
  resume { ptr, i32 } %414
}

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

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

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_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) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) #6 align 2

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

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

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

; 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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

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

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


; 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] }
%"class.std::allocator" = type { i8 }

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %7 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %9
  %11 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #9
  %12 = 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 %13 unwind label %40

13:                                               ; preds = %0
  %14 = 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) %12, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %15 unwind label %40

15:                                               ; preds = %13
  %16 = 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) %14, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %17 unwind label %40

17:                                               ; preds = %15
  %18 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #9
  %19 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #9
  %20 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #9
  %21 = add i64 %18, 1
  %22 = add i64 %19, 1
  %23 = add i64 %20, 1
  %24 = call ptr @llvm.stacksave.p0()
  %25 = mul i64 %23, %22
  %26 = mul i64 %25, %21
  %27 = alloca i64, i64 %26, align 16
  %28 = or i64 %18, %19
  %29 = or i64 %28, %20
  %or.cond144.not = icmp sgt i64 %29, -1
  br i1 %or.cond144.not, label %.preheader118.preheader, label %._crit_edge127

.preheader118.preheader:                          ; preds = %17
  %30 = shl i64 %25, 3
  %31 = shl i64 %20, 3
  %32 = add i64 %31, 8
  %exitcond.peel.not = icmp eq i64 %20, 0
  br label %.preheader118

.preheader118:                                    ; preds = %.preheader118.preheader, %._crit_edge124.split
  %.0105126 = phi i64 [ %52, %._crit_edge124.split ], [ 0, %.preheader118.preheader ]
  %33 = mul i64 %30, %.0105126
  %factor.op.mul.reass = mul i64 %25, %.0105126
  %34 = icmp eq i64 %.0105126, 0
  %35 = add nsw i64 %.0105126, -1
  %36 = mul nsw i64 %35, %25
  %37 = getelementptr inbounds i64, ptr %27, i64 %36
  %38 = getelementptr inbounds i64, ptr %27, i64 %factor.op.mul.reass
  %39 = getelementptr i8, ptr %27, i64 %33
  br label %.preheader

._crit_edge127:                                   ; preds = %._crit_edge124.split, %17
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %81 unwind label %103

40:                                               ; preds = %15, %13, %0
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %143

.preheader:                                       ; preds = %.preheader118, %._crit_edge
  %.0104123 = phi i64 [ 0, %.preheader118 ], [ %53, %._crit_edge ]
  %42 = icmp eq i64 %.0104123, 0
  %or.cond = or i1 %34, %42
  %43 = add nsw i64 %.0104123, -1
  %44 = mul nuw nsw i64 %.0104123, %23
  %45 = getelementptr inbounds i64, ptr %37, i64 %44
  %46 = mul nsw i64 %43, %23
  %47 = getelementptr inbounds i64, ptr %38, i64 %46
  %48 = getelementptr inbounds i64, ptr %38, i64 %44
  %49 = getelementptr inbounds i64, ptr %37, i64 %46
  %or.cond.fr = freeze i1 %or.cond
  br i1 %or.cond.fr, label %.lr.ph.split.us.preheader, label %50

50:                                               ; preds = %.preheader
  store i64 0, ptr %48, align 8, !tbaa !8
  br i1 %exitcond.peel.not, label %._crit_edge, label %.lr.ph.split.peel.next

.lr.ph.split.us.preheader:                        ; preds = %.preheader
  %51 = mul i64 %32, %.0104123
  %scevgep = getelementptr i8, ptr %39, i64 %51
  call void @llvm.memset.p0.i64(ptr align 8 %scevgep, i8 0, i64 %32, i1 false), !tbaa !8
  br label %._crit_edge

._crit_edge124.split:                             ; preds = %._crit_edge
  %52 = add nuw i64 %.0105126, 1
  %exitcond142.not = icmp eq i64 %.0105126, %18
  br i1 %exitcond142.not, label %._crit_edge127, label %.preheader118, !llvm.loop !11

._crit_edge:                                      ; preds = %79, %50, %.lr.ph.split.us.preheader
  %53 = add nuw i64 %.0104123, 1
  %exitcond141.not = icmp eq i64 %.0104123, %19
  br i1 %exitcond141.not, label %._crit_edge124.split, label %.preheader, !llvm.loop !13

.lr.ph.split.peel.next:                           ; preds = %50, %79
  %.0103120 = phi i64 [ %80, %79 ], [ 1, %50 ]
  %54 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %35)
  %55 = load i8, ptr %54, align 1, !tbaa !14
  %56 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %43)
  %57 = load i8, ptr %56, align 1, !tbaa !14
  %58 = icmp eq i8 %55, %57
  br i1 %58, label %59, label %71

59:                                               ; preds = %.lr.ph.split.peel.next
  %60 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %43)
  %61 = load i8, ptr %60, align 1, !tbaa !14
  %62 = add nsw i64 %.0103120, -1
  %63 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %62)
  %64 = load i8, ptr %63, align 1, !tbaa !14
  %65 = icmp eq i8 %61, %64
  br i1 %65, label %66, label %71

66:                                               ; preds = %59
  %67 = getelementptr inbounds i64, ptr %49, i64 %62
  %68 = load i64, ptr %67, align 8, !tbaa !8
  %69 = add nsw i64 %68, 1
  %70 = getelementptr inbounds i64, ptr %48, i64 %.0103120
  store i64 %69, ptr %70, align 8, !tbaa !8
  br label %79

71:                                               ; preds = %59, %.lr.ph.split.peel.next
  %72 = getelementptr inbounds i64, ptr %45, i64 %.0103120
  %73 = getelementptr inbounds i64, ptr %47, i64 %.0103120
  %74 = getelementptr i64, ptr %48, i64 %.0103120
  %75 = getelementptr i8, ptr %74, i64 -8
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef nonnull align 8 dereferenceable(8) %75)
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %72, ptr noundef nonnull align 8 dereferenceable(8) %76)
  %78 = load i64, ptr %77, align 8, !tbaa !8
  store i64 %78, ptr %74, align 8, !tbaa !8
  br label %79

79:                                               ; preds = %71, %66
  %80 = add nuw i64 %.0103120, 1
  %exitcond.not = icmp eq i64 %.0103120, %20
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph.split.peel.next, !llvm.loop !15

81:                                               ; preds = %._crit_edge127
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #9
  %82 = icmp sgt i64 %18, 0
  %83 = icmp sgt i64 %19, 0
  %or.cond5131 = and i1 %82, %83
  %84 = icmp sgt i64 %20, 0
  %or.cond7132 = and i1 %or.cond5131, %84
  br i1 %or.cond7132, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %81, %129
  %.095135 = phi i64 [ %.196, %129 ], [ %20, %81 ]
  %.097134 = phi i64 [ %.198, %129 ], [ %19, %81 ]
  %.099133 = phi i64 [ %.1100, %129 ], [ %18, %81 ]
  %85 = add nsw i64 %.099133, -1
  %86 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %85)
  %87 = load i8, ptr %86, align 1, !tbaa !14
  %88 = add nsw i64 %.097134, -1
  %89 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %88)
  %90 = load i8, ptr %89, align 1, !tbaa !14
  %91 = icmp eq i8 %87, %90
  br i1 %91, label %92, label %106

92:                                               ; preds = %.lr.ph
  %93 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %88)
  %94 = load i8, ptr %93, align 1, !tbaa !14
  %95 = add nsw i64 %.095135, -1
  %96 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %95)
  %97 = load i8, ptr %96, align 1, !tbaa !14
  %98 = icmp eq i8 %94, %97
  br i1 %98, label %99, label %106

99:                                               ; preds = %92
  %100 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %85)
  %101 = load i8, ptr %100, align 1, !tbaa !14
  %102 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %4, i8 noundef signext %101)
          to label %129 unwind label %.loopexit

103:                                              ; preds = %._crit_edge127
  %104 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #9
  br label %142

.loopexit:                                        ; preds = %99
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %105

.loopexit.split-lp:                               ; preds = %.critedge, %135, %137, %139
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %105

105:                                              ; preds = %.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #9
  br label %142

106:                                              ; preds = %92, %.lr.ph
  %107 = mul nsw i64 %85, %25
  %108 = getelementptr inbounds i64, ptr %27, i64 %107
  %109 = mul nsw i64 %.097134, %23
  %110 = getelementptr inbounds i64, ptr %108, i64 %109
  %111 = getelementptr inbounds i64, ptr %110, i64 %.095135
  %112 = load i64, ptr %111, align 8, !tbaa !8
  %113 = mul nsw i64 %.099133, %25
  %114 = getelementptr inbounds i64, ptr %27, i64 %113
  %115 = mul nsw i64 %88, %23
  %116 = getelementptr inbounds i64, ptr %114, i64 %115
  %117 = getelementptr inbounds i64, ptr %116, i64 %.095135
  %118 = load i64, ptr %117, align 8, !tbaa !8
  %119 = icmp sgt i64 %112, %118
  br i1 %119, label %129, label %120

120:                                              ; preds = %106
  %121 = getelementptr inbounds i64, ptr %114, i64 %109
  %122 = getelementptr i64, ptr %121, i64 %.095135
  %123 = getelementptr i8, ptr %122, i64 -8
  %124 = load i64, ptr %123, align 8, !tbaa !8
  %125 = icmp sgt i64 %112, %124
  br i1 %125, label %129, label %126

126:                                              ; preds = %120
  %127 = icmp sle i64 %118, %112
  %spec.select = select i1 %127, i64 %.097134, i64 %88
  %128 = sext i1 %127 to i64
  %spec.select115 = add nsw i64 %.095135, %128
  br label %129

129:                                              ; preds = %126, %106, %120, %99
  %.1100 = phi i64 [ %85, %99 ], [ %85, %120 ], [ %85, %106 ], [ %.099133, %126 ]
  %.198 = phi i64 [ %88, %99 ], [ %.097134, %120 ], [ %.097134, %106 ], [ %spec.select, %126 ]
  %.196 = phi i64 [ %95, %99 ], [ %.095135, %120 ], [ %.095135, %106 ], [ %spec.select115, %126 ]
  %130 = icmp sgt i64 %.1100, 0
  %131 = icmp sgt i64 %.198, 0
  %or.cond5 = select i1 %130, i1 %131, i1 false
  %132 = icmp sgt i64 %.196, 0
  %or.cond7 = select i1 %or.cond5, i1 %132, i1 false
  br i1 %or.cond7, label %.lr.ph, label %.critedge, !llvm.loop !17

.critedge:                                        ; preds = %129, %81
  %133 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #9
  %134 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #9
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr %133, ptr %134)
          to label %135 unwind label %.loopexit.split-lp

135:                                              ; preds = %.critedge
  %136 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
          to label %137 unwind label %.loopexit.split-lp

137:                                              ; preds = %135
  %138 = 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 %139 unwind label %.loopexit.split-lp

139:                                              ; preds = %137
  %140 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %138, ptr noundef nonnull @.str.2)
          to label %141 unwind label %.loopexit.split-lp

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

142:                                              ; preds = %105, %103
  %.pn = phi { ptr, i32 } [ %lpad.phi, %105 ], [ %104, %103 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #9
  br label %143

143:                                              ; preds = %142, %40
  %.pn.pn = phi { ptr, i32 } [ %.pn, %142 ], [ %41, %40 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #9
  resume { ptr, i32 } %.pn.pn
}

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

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

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_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) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) local_unnamed_addr #6 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 #7

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

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

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #8

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

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

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


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