; LLVM IR from kazunetakahashi/atcoder :: 2018/0114_AGC020/D.ll (Z1fB5cxx11xxxx)

; 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::__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 }

@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3repNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, i32 noundef) #0

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4repaB5cxx11i(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4repbB5cxx11i(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z6calc_Kxx(i64 noundef, i64 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z1fB5cxx11xxxx(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, i64 noundef %4) #0 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i32, align 4
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca %"class.std::__cxx11::basic_string", align 8
  %29 = alloca %"class.std::__cxx11::basic_string", align 8
  %30 = alloca %"class.std::__cxx11::basic_string", align 8
  %31 = alloca i1, align 1
  %32 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %33 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca %"class.std::__cxx11::basic_string", align 8
  %37 = alloca %"class.std::__cxx11::basic_string", align 8
  %38 = alloca %"class.std::__cxx11::basic_string", align 8
  %39 = alloca %"class.std::__cxx11::basic_string", align 8
  %40 = alloca %"class.std::__cxx11::basic_string", align 8
  %41 = alloca %"class.std::__cxx11::basic_string", align 8
  %42 = alloca %"class.std::__cxx11::basic_string", align 8
  %43 = alloca %"class.std::__cxx11::basic_string", align 8
  %44 = alloca %"class.std::__cxx11::basic_string", align 8
  %45 = alloca %"class.std::__cxx11::basic_string", align 8
  %46 = alloca %"class.std::__cxx11::basic_string", align 8
  %47 = alloca i32, align 4
  store ptr %0, ptr %6, align 8
  store i64 %1, ptr %7, align 8, !tbaa !5
  store i64 %2, ptr %8, align 8, !tbaa !5
  store i64 %3, ptr %9, align 8, !tbaa !5
  store i64 %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %48 = load i64, ptr %7, align 8, !tbaa !5
  %49 = load i64, ptr %8, align 8, !tbaa !5
  %50 = call noundef i64 @_Z6calc_Kxx(i64 noundef %48, i64 noundef %49)
  store i64 %50, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %51 = load i64, ptr %7, align 8, !tbaa !5
  %52 = load i64, ptr %8, align 8, !tbaa !5
  %53 = add nsw i64 %51, %52
  %54 = add nsw i64 %53, 1
  store i64 %54, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store i64 0, ptr %13, align 8, !tbaa !5
  br label %55

55:                                               ; preds = %88, %5
  %56 = load i64, ptr %12, align 8, !tbaa !5
  %57 = load i64, ptr %13, align 8, !tbaa !5
  %58 = sub nsw i64 %56, %57
  %59 = icmp sgt i64 %58, 1
  br i1 %59, label %60, label %89

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %61 = load i64, ptr %12, align 8, !tbaa !5
  %62 = load i64, ptr %13, align 8, !tbaa !5
  %63 = add nsw i64 %61, %62
  %64 = sdiv i64 %63, 2
  store i64 %64, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %65 = load i64, ptr %14, align 8, !tbaa !5
  %66 = load i64, ptr %11, align 8, !tbaa !5
  %67 = add nsw i64 %66, 1
  %68 = sdiv i64 %65, %67
  store i64 %68, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %69 = load i64, ptr %14, align 8, !tbaa !5
  %70 = load i64, ptr %15, align 8, !tbaa !5
  %71 = sub nsw i64 %69, %70
  store i64 %71, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %72 = load i64, ptr %7, align 8, !tbaa !5
  %73 = load i64, ptr %16, align 8, !tbaa !5
  %74 = sub nsw i64 %72, %73
  store i64 %74, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %75 = load i64, ptr %8, align 8, !tbaa !5
  %76 = load i64, ptr %15, align 8, !tbaa !5
  %77 = sub nsw i64 %75, %76
  store i64 %77, ptr %18, align 8, !tbaa !5
  %78 = load i64, ptr %18, align 8, !tbaa !5
  %79 = load i64, ptr %17, align 8, !tbaa !5
  %80 = add nsw i64 %79, 1
  %81 = load i64, ptr %11, align 8, !tbaa !5
  %82 = mul nsw i64 %80, %81
  %83 = icmp sle i64 %78, %82
  br i1 %83, label %84, label %86

84:                                               ; preds = %60
  %85 = load i64, ptr %14, align 8, !tbaa !5
  store i64 %85, ptr %13, align 8, !tbaa !5
  br label %88

86:                                               ; preds = %60
  %87 = load i64, ptr %14, align 8, !tbaa !5
  store i64 %87, ptr %12, align 8, !tbaa !5
  br label %88

88:                                               ; preds = %86, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %55, !llvm.loop !9

89:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %90 = load i64, ptr %13, align 8, !tbaa !5
  store i64 %90, ptr %19, align 8, !tbaa !5
  %91 = load i64, ptr %10, align 8, !tbaa !5
  %92 = load i64, ptr %19, align 8, !tbaa !5
  %93 = icmp sle i64 %91, %92
  br i1 %93, label %94, label %137

94:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %95 = load i64, ptr %9, align 8, !tbaa !5
  %96 = load i64, ptr %11, align 8, !tbaa !5
  %97 = add nsw i64 %96, 1
  %98 = sdiv i64 %95, %97
  %99 = sub nsw i64 %98, 1
  %100 = load i64, ptr %11, align 8, !tbaa !5
  %101 = add nsw i64 %100, 1
  %102 = mul nsw i64 %99, %101
  %103 = trunc i64 %102 to i32
  store i32 %103, ptr %20, align 4, !tbaa !11
  %104 = load i32, ptr %20, align 4, !tbaa !11
  %105 = sext i32 %104 to i64
  %106 = load i64, ptr %9, align 8, !tbaa !5
  %107 = sub nsw i64 %106, %105
  store i64 %107, ptr %9, align 8, !tbaa !5
  %108 = load i32, ptr %20, align 4, !tbaa !11
  %109 = sext i32 %108 to i64
  %110 = load i64, ptr %10, align 8, !tbaa !5
  %111 = sub nsw i64 %110, %109
  store i64 %111, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #4
  %112 = load i64, ptr %11, align 8, !tbaa !5
  %113 = trunc i64 %112 to i32
  call void @_Z4repaB5cxx11i(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %23, i32 noundef %113)
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %22, ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef @.str.2)
          to label %114 unwind label %123

114:                                              ; preds = %94
  invoke void @_Z3repNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %21, ptr noundef %22, i32 noundef 100)
          to label %115 unwind label %127

115:                                              ; preds = %114
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #4
  %116 = load i64, ptr %9, align 8, !tbaa !5
  %117 = sub nsw i64 %116, 1
  %118 = load i64, ptr %10, align 8, !tbaa !5
  %119 = load i64, ptr %9, align 8, !tbaa !5
  %120 = sub nsw i64 %118, %119
  %121 = add nsw i64 %120, 1
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %21, i64 noundef %117, i64 noundef %121)
          to label %122 unwind label %132

122:                                              ; preds = %115
  store i32 1, ptr %26, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %323

123:                                              ; preds = %94
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %24, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %25, align 4
  br label %131

127:                                              ; preds = %114
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %24, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %25, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #4
  br label %131

131:                                              ; preds = %127, %123
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #4
  br label %136

132:                                              ; preds = %115
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %24, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %25, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #4
  br label %136

136:                                              ; preds = %132, %131
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %324

137:                                              ; preds = %89
  %138 = load i64, ptr %9, align 8, !tbaa !5
  %139 = load i64, ptr %19, align 8, !tbaa !5
  %140 = icmp sgt i64 %138, %139
  br i1 %140, label %141, label %213

141:                                              ; preds = %137
  %142 = load i64, ptr %7, align 8, !tbaa !5
  %143 = load i64, ptr %8, align 8, !tbaa !5
  %144 = add nsw i64 %142, %143
  %145 = add nsw i64 %144, 1
  %146 = load i64, ptr %9, align 8, !tbaa !5
  %147 = sub nsw i64 %145, %146
  store i64 %147, ptr %9, align 8, !tbaa !5
  %148 = load i64, ptr %7, align 8, !tbaa !5
  %149 = load i64, ptr %8, align 8, !tbaa !5
  %150 = add nsw i64 %148, %149
  %151 = add nsw i64 %150, 1
  %152 = load i64, ptr %10, align 8, !tbaa !5
  %153 = sub nsw i64 %151, %152
  store i64 %153, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #4
  %154 = load i64, ptr %10, align 8, !tbaa !5
  %155 = load i64, ptr %11, align 8, !tbaa !5
  %156 = add nsw i64 %155, 1
  %157 = sdiv i64 %154, %156
  %158 = sub nsw i64 %157, 1
  %159 = load i64, ptr %11, align 8, !tbaa !5
  %160 = add nsw i64 %159, 1
  %161 = mul nsw i64 %158, %160
  %162 = trunc i64 %161 to i32
  store i32 %162, ptr %27, align 4, !tbaa !11
  %163 = load i32, ptr %27, align 4, !tbaa !11
  %164 = sext i32 %163 to i64
  %165 = load i64, ptr %9, align 8, !tbaa !5
  %166 = sub nsw i64 %165, %164
  store i64 %166, ptr %9, align 8, !tbaa !5
  %167 = load i32, ptr %27, align 4, !tbaa !11
  %168 = sext i32 %167 to i64
  %169 = load i64, ptr %10, align 8, !tbaa !5
  %170 = sub nsw i64 %169, %168
  store i64 %170, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %30) #4
  %171 = load i64, ptr %11, align 8, !tbaa !5
  %172 = trunc i64 %171 to i32
  call void @_Z4repbB5cxx11i(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %30, i32 noundef %172)
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %29, ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef @.str.1)
          to label %173 unwind label %192

173:                                              ; preds = %141
  invoke void @_Z3repNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %28, ptr noundef %29, i32 noundef 100)
          to label %174 unwind label %196

174:                                              ; preds = %173
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %30) #4
  store i1 false, ptr %31, align 1
  %175 = load i64, ptr %10, align 8, !tbaa !5
  %176 = sub nsw i64 %175, 1
  %177 = load i64, ptr %9, align 8, !tbaa !5
  %178 = load i64, ptr %10, align 8, !tbaa !5
  %179 = sub nsw i64 %177, %178
  %180 = add nsw i64 %179, 1
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %28, i64 noundef %176, i64 noundef %180)
          to label %181 unwind label %201

181:                                              ; preds = %174
  %182 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  %183 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %32, i32 0, i32 0
  store ptr %182, ptr %183, align 8
  %184 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  %185 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %33, i32 0, i32 0
  store ptr %184, ptr %185, align 8
  %186 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %32, i32 0, i32 0
  %187 = load ptr, ptr %186, align 8
  %188 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %33, i32 0, i32 0
  %189 = load ptr, ptr %188, align 8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr %187, ptr %189)
          to label %190 unwind label %205

190:                                              ; preds = %181
  store i1 true, ptr %31, align 1
  store i32 1, ptr %26, align 4
  %191 = load i1, ptr %31, align 1
  br i1 %191, label %210, label %209

192:                                              ; preds = %141
  %193 = landingpad { ptr, i32 }
          cleanup
  %194 = extractvalue { ptr, i32 } %193, 0
  store ptr %194, ptr %24, align 8
  %195 = extractvalue { ptr, i32 } %193, 1
  store i32 %195, ptr %25, align 4
  br label %200

196:                                              ; preds = %173
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %24, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %25, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #4
  br label %200

200:                                              ; preds = %196, %192
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %30) #4
  br label %212

201:                                              ; preds = %174
  %202 = landingpad { ptr, i32 }
          cleanup
  %203 = extractvalue { ptr, i32 } %202, 0
  store ptr %203, ptr %24, align 8
  %204 = extractvalue { ptr, i32 } %202, 1
  store i32 %204, ptr %25, align 4
  br label %211

205:                                              ; preds = %181
  %206 = landingpad { ptr, i32 }
          cleanup
  %207 = extractvalue { ptr, i32 } %206, 0
  store ptr %207, ptr %24, align 8
  %208 = extractvalue { ptr, i32 } %206, 1
  store i32 %208, ptr %25, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  br label %211

209:                                              ; preds = %190
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  br label %210

210:                                              ; preds = %209, %190
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  br label %323

211:                                              ; preds = %205, %201
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #4
  br label %212

212:                                              ; preds = %211, %200
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  br label %324

213:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #4
  %214 = load i64, ptr %19, align 8, !tbaa !5
  %215 = load i64, ptr %11, align 8, !tbaa !5
  %216 = add nsw i64 %215, 1
  %217 = srem i64 %214, %216
  %218 = trunc i64 %217 to i32
  store i32 %218, ptr %34, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #4
  %219 = load i64, ptr %7, align 8, !tbaa !5
  %220 = load i64, ptr %8, align 8, !tbaa !5
  %221 = add nsw i64 %219, %220
  %222 = load i64, ptr %19, align 8, !tbaa !5
  %223 = sub nsw i64 %221, %222
  %224 = load i64, ptr %11, align 8, !tbaa !5
  %225 = add nsw i64 %224, 1
  %226 = srem i64 %223, %225
  %227 = trunc i64 %226 to i32
  store i32 %227, ptr %35, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 32, ptr %36) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %37) #4
  %228 = load i32, ptr %34, align 4, !tbaa !11
  call void @_Z4repaB5cxx11i(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %37, i32 noundef %228)
  call void @llvm.lifetime.start.p0(i64 32, ptr %38) #4
  %229 = load i32, ptr %35, align 4, !tbaa !11
  invoke void @_Z4repbB5cxx11i(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %38, i32 noundef %229)
          to label %230 unwind label %269

230:                                              ; preds = %213
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %36, ptr noundef nonnull align 8 dereferenceable(32) %37, ptr noundef nonnull align 8 dereferenceable(32) %38)
          to label %231 unwind label %273

231:                                              ; preds = %230
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %38) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %37) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %37) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %39) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %40) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %41) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %43) #4
  %232 = load i64, ptr %11, align 8, !tbaa !5
  %233 = trunc i64 %232 to i32
  invoke void @_Z4repaB5cxx11i(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %43, i32 noundef %233)
          to label %234 unwind label %278

234:                                              ; preds = %231
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %42, ptr noundef nonnull align 8 dereferenceable(32) %43, ptr noundef @.str.2)
          to label %235 unwind label %282

235:                                              ; preds = %234
  invoke void @_Z3repNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %41, ptr noundef %42, i32 noundef 100)
          to label %236 unwind label %286

236:                                              ; preds = %235
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %40, ptr noundef nonnull align 8 dereferenceable(32) %41, ptr noundef nonnull align 8 dereferenceable(32) %36)
          to label %237 unwind label %290

237:                                              ; preds = %236
  call void @llvm.lifetime.start.p0(i64 32, ptr %44) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %46) #4
  %238 = load i64, ptr %11, align 8, !tbaa !5
  %239 = trunc i64 %238 to i32
  invoke void @_Z4repbB5cxx11i(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %46, i32 noundef %239)
          to label %240 unwind label %294

240:                                              ; preds = %237
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %45, ptr noundef @.str.1, ptr noundef nonnull align 8 dereferenceable(32) %46)
          to label %241 unwind label %298

241:                                              ; preds = %240
  invoke void @_Z3repNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %44, ptr noundef %45, i32 noundef 100)
          to label %242 unwind label %302

242:                                              ; preds = %241
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %39, ptr noundef nonnull align 8 dereferenceable(32) %40, ptr noundef nonnull align 8 dereferenceable(32) %44)
          to label %243 unwind label %306

243:                                              ; preds = %242
  %244 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %36, ptr noundef nonnull align 8 dereferenceable(32) %39) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %39) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %44) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %45) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %46) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %46) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %44) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %40) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %41) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %42) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %43) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %43) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %41) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %40) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %39) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #4
  %245 = load i64, ptr %19, align 8, !tbaa !5
  %246 = load i64, ptr %11, align 8, !tbaa !5
  %247 = add nsw i64 %246, 1
  %248 = mul nsw i64 100, %247
  %249 = load i32, ptr %34, align 4, !tbaa !11
  %250 = sext i32 %249 to i64
  %251 = add nsw i64 %248, %250
  %252 = sub nsw i64 %245, %251
  %253 = trunc i64 %252 to i32
  store i32 %253, ptr %47, align 4, !tbaa !11
  %254 = load i32, ptr %47, align 4, !tbaa !11
  %255 = sext i32 %254 to i64
  %256 = load i64, ptr %9, align 8, !tbaa !5
  %257 = sub nsw i64 %256, %255
  store i64 %257, ptr %9, align 8, !tbaa !5
  %258 = load i32, ptr %47, align 4, !tbaa !11
  %259 = sext i32 %258 to i64
  %260 = load i64, ptr %10, align 8, !tbaa !5
  %261 = sub nsw i64 %260, %259
  store i64 %261, ptr %10, align 8, !tbaa !5
  %262 = load i64, ptr %9, align 8, !tbaa !5
  %263 = sub nsw i64 %262, 1
  %264 = load i64, ptr %10, align 8, !tbaa !5
  %265 = load i64, ptr %9, align 8, !tbaa !5
  %266 = sub nsw i64 %264, %265
  %267 = add nsw i64 %266, 1
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %36, i64 noundef %263, i64 noundef %267)
          to label %268 unwind label %317

268:                                              ; preds = %243
  store i32 1, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %36) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #4
  br label %323

269:                                              ; preds = %213
  %270 = landingpad { ptr, i32 }
          cleanup
  %271 = extractvalue { ptr, i32 } %270, 0
  store ptr %271, ptr %24, align 8
  %272 = extractvalue { ptr, i32 } %270, 1
  store i32 %272, ptr %25, align 4
  br label %277

273:                                              ; preds = %230
  %274 = landingpad { ptr, i32 }
          cleanup
  %275 = extractvalue { ptr, i32 } %274, 0
  store ptr %275, ptr %24, align 8
  %276 = extractvalue { ptr, i32 } %274, 1
  store i32 %276, ptr %25, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #4
  br label %277

277:                                              ; preds = %273, %269
  call void @llvm.lifetime.end.p0(i64 32, ptr %38) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %37) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %37) #4
  br label %322

278:                                              ; preds = %231
  %279 = landingpad { ptr, i32 }
          cleanup
  %280 = extractvalue { ptr, i32 } %279, 0
  store ptr %280, ptr %24, align 8
  %281 = extractvalue { ptr, i32 } %279, 1
  store i32 %281, ptr %25, align 4
  br label %316

282:                                              ; preds = %234
  %283 = landingpad { ptr, i32 }
          cleanup
  %284 = extractvalue { ptr, i32 } %283, 0
  store ptr %284, ptr %24, align 8
  %285 = extractvalue { ptr, i32 } %283, 1
  store i32 %285, ptr %25, align 4
  br label %315

286:                                              ; preds = %235
  %287 = landingpad { ptr, i32 }
          cleanup
  %288 = extractvalue { ptr, i32 } %287, 0
  store ptr %288, ptr %24, align 8
  %289 = extractvalue { ptr, i32 } %287, 1
  store i32 %289, ptr %25, align 4
  br label %314

290:                                              ; preds = %236
  %291 = landingpad { ptr, i32 }
          cleanup
  %292 = extractvalue { ptr, i32 } %291, 0
  store ptr %292, ptr %24, align 8
  %293 = extractvalue { ptr, i32 } %291, 1
  store i32 %293, ptr %25, align 4
  br label %313

294:                                              ; preds = %237
  %295 = landingpad { ptr, i32 }
          cleanup
  %296 = extractvalue { ptr, i32 } %295, 0
  store ptr %296, ptr %24, align 8
  %297 = extractvalue { ptr, i32 } %295, 1
  store i32 %297, ptr %25, align 4
  br label %312

298:                                              ; preds = %240
  %299 = landingpad { ptr, i32 }
          cleanup
  %300 = extractvalue { ptr, i32 } %299, 0
  store ptr %300, ptr %24, align 8
  %301 = extractvalue { ptr, i32 } %299, 1
  store i32 %301, ptr %25, align 4
  br label %311

302:                                              ; preds = %241
  %303 = landingpad { ptr, i32 }
          cleanup
  %304 = extractvalue { ptr, i32 } %303, 0
  store ptr %304, ptr %24, align 8
  %305 = extractvalue { ptr, i32 } %303, 1
  store i32 %305, ptr %25, align 4
  br label %310

306:                                              ; preds = %242
  %307 = landingpad { ptr, i32 }
          cleanup
  %308 = extractvalue { ptr, i32 } %307, 0
  store ptr %308, ptr %24, align 8
  %309 = extractvalue { ptr, i32 } %307, 1
  store i32 %309, ptr %25, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %44) #4
  br label %310

310:                                              ; preds = %306, %302
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %45) #4
  br label %311

311:                                              ; preds = %310, %298
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %46) #4
  br label %312

312:                                              ; preds = %311, %294
  call void @llvm.lifetime.end.p0(i64 32, ptr %46) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %44) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %40) #4
  br label %313

313:                                              ; preds = %312, %290
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %41) #4
  br label %314

314:                                              ; preds = %313, %286
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %42) #4
  br label %315

315:                                              ; preds = %314, %282
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %43) #4
  br label %316

316:                                              ; preds = %315, %278
  call void @llvm.lifetime.end.p0(i64 32, ptr %43) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %41) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %40) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %39) #4
  br label %321

317:                                              ; preds = %243
  %318 = landingpad { ptr, i32 }
          cleanup
  %319 = extractvalue { ptr, i32 } %318, 0
  store ptr %319, ptr %24, align 8
  %320 = extractvalue { ptr, i32 } %318, 1
  store i32 %320, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #4
  br label %321

321:                                              ; preds = %317, %316
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #4
  br label %322

322:                                              ; preds = %321, %277
  call void @llvm.lifetime.end.p0(i64 32, ptr %36) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #4
  br label %324

323:                                              ; preds = %268, %210, %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  ret void

324:                                              ; preds = %322, %212, %136
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %325

325:                                              ; preds = %324
  %326 = load ptr, ptr %24, align 8
  %327 = load i32, ptr %25, align 4
  %328 = insertvalue { ptr, i32 } poison, ptr %326, 0
  %329 = insertvalue { ptr, i32 } %328, i32 %327, 1
  resume { ptr, i32 } %329
}

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

; 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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr, ptr) #3

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

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

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

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

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

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

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


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

@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3repNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, i32 noundef) local_unnamed_addr #0

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4repaB5cxx11i(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4repbB5cxx11i(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z6calc_Kxx(i64 noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z1fB5cxx11xxxx(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, i64 noundef %4) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = tail call noundef i64 @_Z6calc_Kxx(i64 noundef %1, i64 noundef %2)
  %24 = add nsw i64 %2, %1
  %25 = add nsw i64 %24, 1
  %26 = icmp sgt i64 %24, 0
  br i1 %26, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %5
  %27 = add nsw i64 %23, 1
  %.neg = add i64 %1, 1
  br label %28

28:                                               ; preds = %.lr.ph, %28
  %.0135 = phi i64 [ %25, %.lr.ph ], [ %..0, %28 ]
  %.077134 = phi i64 [ 0, %.lr.ph ], [ %.077., %28 ]
  %29 = add nsw i64 %.0135, %.077134
  %30 = sdiv i64 %29, 2
  %31 = sdiv i64 %30, %27
  %32 = sub nsw i64 %2, %31
  %33 = sub i64 %.neg, %30
  %34 = add i64 %33, %31
  %35 = mul nsw i64 %34, %23
  %.not125 = icmp sgt i64 %32, %35
  %.077. = select i1 %.not125, i64 %.077134, i64 %30
  %..0 = select i1 %.not125, i64 %30, i64 %.0135
  %36 = sub nsw i64 %..0, %.077.
  %37 = icmp sgt i64 %36, 1
  br i1 %37, label %28, label %._crit_edge, !llvm.loop !5

._crit_edge:                                      ; preds = %28, %5
  %.077.lcssa = phi i64 [ 0, %5 ], [ %.077., %28 ]
  %.not = icmp slt i64 %.077.lcssa, %4
  br i1 %.not, label %59, label %38

38:                                               ; preds = %._crit_edge
  %39 = add nsw i64 %23, 1
  %40 = sdiv i64 %3, %39
  %41 = add i64 %40, 4294967295
  %42 = shl i64 %39, 32
  %sext119 = mul i64 %42, %41
  %43 = ashr exact i64 %sext119, 32
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #4
  %44 = trunc i64 %23 to i32
  call void @_Z4repaB5cxx11i(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, i32 noundef %44)
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.2)
          to label %45 unwind label %51

45:                                               ; preds = %38
  invoke void @_Z3repNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull %7, i32 noundef 100)
          to label %46 unwind label %53

46:                                               ; preds = %45
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  %47 = xor i64 %43, -1
  %48 = add i64 %47, %3
  %reass.sub = sub i64 %4, %3
  %49 = add i64 %reass.sub, 1
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %6, i64 noundef %48, i64 noundef %49)
          to label %50 unwind label %56

50:                                               ; preds = %46
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  br label %148

51:                                               ; preds = %38
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %55

53:                                               ; preds = %45
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  br label %55

55:                                               ; preds = %53, %51
  %.pn120 = phi { ptr, i32 } [ %54, %53 ], [ %52, %51 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  br label %58

56:                                               ; preds = %46
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  br label %58

58:                                               ; preds = %56, %55
  %.pn122 = phi { ptr, i32 } [ %57, %56 ], [ %.pn120, %55 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  br label %149

59:                                               ; preds = %._crit_edge
  %60 = icmp slt i64 %.077.lcssa, %3
  br i1 %60, label %61, label %91

61:                                               ; preds = %59
  %62 = sub nsw i64 %25, %4
  %63 = add nsw i64 %23, 1
  %64 = sdiv i64 %62, %63
  %65 = add i64 %64, 4294967295
  %66 = shl i64 %63, 32
  %sext113 = mul i64 %66, %65
  %67 = ashr exact i64 %sext113, 32
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #4
  %68 = trunc i64 %23 to i32
  call void @_Z4repbB5cxx11i(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %11, i32 noundef %68)
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull @.str.1)
          to label %69 unwind label %79

69:                                               ; preds = %61
  invoke void @_Z3repNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull %10, i32 noundef 100)
          to label %70 unwind label %81

70:                                               ; preds = %69
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #4
  %71 = xor i64 %67, -1
  %72 = add i64 %62, %71
  %73 = add i64 %24, 2
  %74 = add i64 %62, %3
  %75 = sub i64 %73, %74
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %9, i64 noundef %72, i64 noundef %75)
          to label %76 unwind label %84

76:                                               ; preds = %70
  %77 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  %78 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr %77, ptr %78)
          to label %88 unwind label %86

79:                                               ; preds = %61
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %83

81:                                               ; preds = %69
  %82 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  br label %83

83:                                               ; preds = %81, %79
  %.pn114 = phi { ptr, i32 } [ %82, %81 ], [ %80, %79 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #4
  br label %90

84:                                               ; preds = %70
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %89

86:                                               ; preds = %76
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  br label %89

88:                                               ; preds = %76
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  br label %148

89:                                               ; preds = %86, %84
  %.pn116 = phi { ptr, i32 } [ %87, %86 ], [ %85, %84 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  br label %90

90:                                               ; preds = %89, %83
  %.pn116.pn = phi { ptr, i32 } [ %.pn116, %89 ], [ %.pn114, %83 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  br label %149

91:                                               ; preds = %59
  %92 = add nsw i64 %23, 1
  %93 = srem i64 %.077.lcssa, %92
  %94 = trunc i64 %93 to i32
  %95 = sub nsw i64 %24, %.077.lcssa
  %96 = srem i64 %95, %92
  %97 = trunc i64 %96 to i32
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #4
  call void @_Z4repaB5cxx11i(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %13, i32 noundef %94)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #4
  invoke void @_Z4repbB5cxx11i(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %14, i32 noundef %97)
          to label %98 unwind label %116

98:                                               ; preds = %91
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %99 unwind label %118

99:                                               ; preds = %98
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %16) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %17) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %19) #4
  %100 = trunc i64 %23 to i32
  invoke void @_Z4repaB5cxx11i(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %19, i32 noundef %100)
          to label %101 unwind label %121

101:                                              ; preds = %99
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %18, ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull @.str.2)
          to label %102 unwind label %123

102:                                              ; preds = %101
  invoke void @_Z3repNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %17, ptr noundef nonnull %18, i32 noundef 100)
          to label %103 unwind label %125

103:                                              ; preds = %102
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %104 unwind label %127

104:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %20) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %22) #4
  invoke void @_Z4repbB5cxx11i(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %22, i32 noundef %100)
          to label %105 unwind label %129

105:                                              ; preds = %104
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %21, ptr noundef nonnull @.str.1, ptr noundef nonnull align 8 dereferenceable(32) %22)
          to label %106 unwind label %131

106:                                              ; preds = %105
  invoke void @_Z3repNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %20, ptr noundef nonnull %21, i32 noundef 100)
          to label %107 unwind label %133

107:                                              ; preds = %106
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %108 unwind label %135

108:                                              ; preds = %107
  %109 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %22) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %20) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #4
  %.neg128 = mul i64 %92, 4294967196
  %.neg130 = add i64 %.077.lcssa, %.neg128
  %110 = sub i64 %.neg130, %93
  %sext = shl i64 %110, 32
  %111 = ashr exact i64 %sext, 32
  %112 = xor i64 %111, -1
  %113 = add i64 %112, %3
  %reass.sub136 = sub i64 %4, %3
  %114 = add i64 %reass.sub136, 1
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %12, i64 noundef %113, i64 noundef %114)
          to label %115 unwind label %144

115:                                              ; preds = %108
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #4
  br label %148

116:                                              ; preds = %91
  %117 = landingpad { ptr, i32 }
          cleanup
  br label %120

118:                                              ; preds = %98
  %119 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #4
  br label %120

120:                                              ; preds = %118, %116
  %.pn = phi { ptr, i32 } [ %119, %118 ], [ %117, %116 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #4
  br label %147

121:                                              ; preds = %99
  %122 = landingpad { ptr, i32 }
          cleanup
  br label %143

123:                                              ; preds = %101
  %124 = landingpad { ptr, i32 }
          cleanup
  br label %142

125:                                              ; preds = %102
  %126 = landingpad { ptr, i32 }
          cleanup
  br label %141

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

129:                                              ; preds = %104
  %130 = landingpad { ptr, i32 }
          cleanup
  br label %139

131:                                              ; preds = %105
  %132 = landingpad { ptr, i32 }
          cleanup
  br label %138

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

135:                                              ; preds = %107
  %136 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #4
  br label %137

137:                                              ; preds = %135, %133
  %.pn102 = phi { ptr, i32 } [ %136, %135 ], [ %134, %133 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #4
  br label %138

138:                                              ; preds = %137, %131
  %.pn102.pn = phi { ptr, i32 } [ %.pn102, %137 ], [ %132, %131 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #4
  br label %139

139:                                              ; preds = %138, %129
  %.pn102.pn.pn = phi { ptr, i32 } [ %.pn102.pn, %138 ], [ %130, %129 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %22) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %20) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  br label %140

140:                                              ; preds = %139, %127
  %.pn102.pn.pn.pn = phi { ptr, i32 } [ %.pn102.pn.pn, %139 ], [ %128, %127 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #4
  br label %141

141:                                              ; preds = %140, %125
  %.pn102.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn102.pn.pn.pn, %140 ], [ %126, %125 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #4
  br label %142

142:                                              ; preds = %141, %123
  %.pn102.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn102.pn.pn.pn.pn, %141 ], [ %124, %123 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #4
  br label %143

143:                                              ; preds = %142, %121
  %.pn102.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn102.pn.pn.pn.pn.pn, %142 ], [ %122, %121 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #4
  br label %146

144:                                              ; preds = %108
  %145 = landingpad { ptr, i32 }
          cleanup
  br label %146

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

147:                                              ; preds = %146, %120
  %.pn110.pn = phi { ptr, i32 } [ %.pn110, %146 ], [ %.pn, %120 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #4
  br label %149

148:                                              ; preds = %115, %88, %50
  ret void

149:                                              ; preds = %147, %90, %58
  %.pn122.pn = phi { ptr, i32 } [ %.pn122, %58 ], [ %.pn116.pn, %90 ], [ %.pn110.pn, %147 ]
  resume { ptr, i32 } %.pn122.pn
}

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

; 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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr, ptr) local_unnamed_addr #3

; 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_S9_(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 #3

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { 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 #4 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}


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