; LLVM IR from VastoLorde95/Competitive-Programming :: SPOJ/Week 2/Julka/julka.ll/Z3addNSt7 (cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_)

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

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

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

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

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

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

; 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) #1 align 2

; 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)) #1 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3addNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef %1, ptr noundef %2) #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i1, align 1
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %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 = alloca %"class.std::__cxx11::basic_string", align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  %24 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #3
  %25 = trunc i64 %24 to i32
  store i32 %25, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %26 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #3
  %27 = trunc i64 %26 to i32
  store i32 %27, ptr %8, align 4, !tbaa !9
  store i1 false, ptr %9, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #3
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #3
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %28 unwind label %68

28:                                               ; preds = %3
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %29 = load i32, ptr %7, align 4, !tbaa !9
  %30 = sub nsw i32 %29, 1
  store i32 %30, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  store i32 0, ptr %18, align 4, !tbaa !9
  %31 = load i32, ptr %8, align 4, !tbaa !9
  %32 = sub nsw i32 %31, 1
  store i32 %32, ptr %14, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %84, %28
  %34 = load i32, ptr %14, align 4, !tbaa !9
  %35 = icmp sge i32 %34, 0
  br i1 %35, label %36, label %39

36:                                               ; preds = %33
  %37 = load i32, ptr %13, align 4, !tbaa !9
  %38 = icmp sge i32 %37, 0
  br label %39

39:                                               ; preds = %36, %33
  %40 = phi i1 [ false, %33 ], [ %38, %36 ]
  br i1 %40, label %41, label %91

41:                                               ; preds = %39
  %42 = load i32, ptr %13, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %43)
          to label %45 unwind label %72

45:                                               ; preds = %41
  %46 = load i8, ptr %44, align 1, !tbaa !11
  %47 = sext i8 %46 to i32
  %48 = sub nsw i32 %47, 48
  store i32 %48, ptr %15, align 4, !tbaa !9
  %49 = load i32, ptr %14, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %50)
          to label %52 unwind label %72

52:                                               ; preds = %45
  %53 = load i8, ptr %51, align 1, !tbaa !11
  %54 = sext i8 %53 to i32
  %55 = sub nsw i32 %54, 48
  store i32 %55, ptr %16, align 4, !tbaa !9
  %56 = load i32, ptr %15, align 4, !tbaa !9
  %57 = load i32, ptr %16, align 4, !tbaa !9
  %58 = add nsw i32 %56, %57
  %59 = load i32, ptr %18, align 4, !tbaa !9
  %60 = add nsw i32 %58, %59
  store i32 %60, ptr %17, align 4, !tbaa !9
  %61 = load i32, ptr %17, align 4, !tbaa !9
  %62 = sdiv i32 %61, 10
  store i32 %62, ptr %18, align 4, !tbaa !9
  %63 = load i32, ptr %18, align 4, !tbaa !9
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %76

65:                                               ; preds = %52
  %66 = load i32, ptr %17, align 4, !tbaa !9
  %67 = sub nsw i32 %66, 10
  store i32 %67, ptr %17, align 4, !tbaa !9
  br label %76

68:                                               ; preds = %3
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %11, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %12, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #3
  br label %210

72:                                               ; preds = %202, %181, %136, %98, %45, %41
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %11, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %12, align 4
  br label %207

76:                                               ; preds = %65, %52
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #3
  %77 = load i32, ptr %17, align 4, !tbaa !9
  %78 = add nsw i32 %77, 48
  %79 = trunc i32 %78 to i8
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EES5_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %19, i8 noundef signext %79, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %80 unwind label %87

80:                                               ; preds = %76
  %81 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %19) #3
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #3
  %82 = load i32, ptr %13, align 4, !tbaa !9
  %83 = add nsw i32 %82, -1
  store i32 %83, ptr %13, align 4, !tbaa !9
  br label %84

84:                                               ; preds = %80
  %85 = load i32, ptr %14, align 4, !tbaa !9
  %86 = add nsw i32 %85, -1
  store i32 %86, ptr %14, align 4, !tbaa !9
  br label %33, !llvm.loop !12

87:                                               ; preds = %76
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %11, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #3
  br label %207

91:                                               ; preds = %39
  %92 = load i32, ptr %13, align 4, !tbaa !9
  %93 = icmp sge i32 %92, 0
  br i1 %93, label %94, label %129

94:                                               ; preds = %91
  br label %95

95:                                               ; preds = %120, %94
  %96 = load i32, ptr %13, align 4, !tbaa !9
  %97 = icmp sge i32 %96, 0
  br i1 %97, label %98, label %128

98:                                               ; preds = %95
  %99 = load i32, ptr %13, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %100)
          to label %102 unwind label %72

102:                                              ; preds = %98
  %103 = load i8, ptr %101, align 1, !tbaa !11
  %104 = sext i8 %103 to i32
  %105 = sub nsw i32 %104, 48
  store i32 %105, ptr %15, align 4, !tbaa !9
  %106 = load i32, ptr %15, align 4, !tbaa !9
  %107 = load i32, ptr %18, align 4, !tbaa !9
  %108 = add nsw i32 %106, %107
  store i32 %108, ptr %17, align 4, !tbaa !9
  %109 = load i32, ptr %17, align 4, !tbaa !9
  %110 = sdiv i32 %109, 10
  store i32 %110, ptr %18, align 4, !tbaa !9
  %111 = load i32, ptr %18, align 4, !tbaa !9
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %116

113:                                              ; preds = %102
  %114 = load i32, ptr %17, align 4, !tbaa !9
  %115 = sub nsw i32 %114, 10
  store i32 %115, ptr %17, align 4, !tbaa !9
  br label %116

116:                                              ; preds = %113, %102
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #3
  %117 = load i32, ptr %17, align 4, !tbaa !9
  %118 = add nsw i32 %117, 48
  %119 = trunc i32 %118 to i8
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EES5_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %20, i8 noundef signext %119, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %120 unwind label %124

120:                                              ; preds = %116
  %121 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %20) #3
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #3
  %122 = load i32, ptr %13, align 4, !tbaa !9
  %123 = add nsw i32 %122, -1
  store i32 %123, ptr %13, align 4, !tbaa !9
  br label %95, !llvm.loop !14

124:                                              ; preds = %116
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %11, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #3
  br label %207

128:                                              ; preds = %95
  br label %129

129:                                              ; preds = %128, %91
  %130 = load i32, ptr %14, align 4, !tbaa !9
  %131 = icmp sge i32 %130, 0
  br i1 %131, label %132, label %167

132:                                              ; preds = %129
  br label %133

133:                                              ; preds = %158, %132
  %134 = load i32, ptr %14, align 4, !tbaa !9
  %135 = icmp sge i32 %134, 0
  br i1 %135, label %136, label %166

136:                                              ; preds = %133
  %137 = load i32, ptr %14, align 4, !tbaa !9
  %138 = sext i32 %137 to i64
  %139 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %138)
          to label %140 unwind label %72

140:                                              ; preds = %136
  %141 = load i8, ptr %139, align 1, !tbaa !11
  %142 = sext i8 %141 to i32
  %143 = sub nsw i32 %142, 48
  store i32 %143, ptr %15, align 4, !tbaa !9
  %144 = load i32, ptr %15, align 4, !tbaa !9
  %145 = load i32, ptr %18, align 4, !tbaa !9
  %146 = add nsw i32 %144, %145
  store i32 %146, ptr %17, align 4, !tbaa !9
  %147 = load i32, ptr %17, align 4, !tbaa !9
  %148 = sdiv i32 %147, 10
  store i32 %148, ptr %18, align 4, !tbaa !9
  %149 = load i32, ptr %18, align 4, !tbaa !9
  %150 = icmp ne i32 %149, 0
  br i1 %150, label %151, label %154

151:                                              ; preds = %140
  %152 = load i32, ptr %17, align 4, !tbaa !9
  %153 = sub nsw i32 %152, 10
  store i32 %153, ptr %17, align 4, !tbaa !9
  br label %154

154:                                              ; preds = %151, %140
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #3
  %155 = load i32, ptr %17, align 4, !tbaa !9
  %156 = add nsw i32 %155, 48
  %157 = trunc i32 %156 to i8
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EES5_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %21, i8 noundef signext %157, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %158 unwind label %162

158:                                              ; preds = %154
  %159 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %21) #3
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #3
  %160 = load i32, ptr %14, align 4, !tbaa !9
  %161 = add nsw i32 %160, -1
  store i32 %161, ptr %14, align 4, !tbaa !9
  br label %133, !llvm.loop !15

162:                                              ; preds = %154
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %11, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #3
  br label %207

166:                                              ; preds = %133
  br label %167

167:                                              ; preds = %166, %129
  %168 = load i32, ptr %18, align 4, !tbaa !9
  %169 = icmp ne i32 %168, 0
  br i1 %169, label %170, label %180

170:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #3
  %171 = load i32, ptr %18, align 4, !tbaa !9
  %172 = add nsw i32 %171, 48
  %173 = trunc i32 %172 to i8
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EES5_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %22, i8 noundef signext %173, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %174 unwind label %176

174:                                              ; preds = %170
  %175 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %22) #3
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #3
  br label %180

176:                                              ; preds = %170
  %177 = landingpad { ptr, i32 }
          cleanup
  %178 = extractvalue { ptr, i32 } %177, 0
  store ptr %178, ptr %11, align 8
  %179 = extractvalue { ptr, i32 } %177, 1
  store i32 %179, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #3
  br label %207

180:                                              ; preds = %174, %167
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %181

181:                                              ; preds = %193, %180
  %182 = load i32, ptr %14, align 4, !tbaa !9
  %183 = sext i32 %182 to i64
  %184 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %183)
          to label %185 unwind label %72

185:                                              ; preds = %181
  %186 = load i8, ptr %184, align 1, !tbaa !11
  %187 = sext i8 %186 to i32
  %188 = icmp eq i32 %187, 48
  br i1 %188, label %189, label %199

189:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #3
  %190 = load i32, ptr %14, align 4, !tbaa !9
  %191 = add nsw i32 %190, 1
  %192 = sext i32 %191 to i64
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %23, ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %192, i64 noundef -1)
          to label %193 unwind label %195

193:                                              ; preds = %189
  %194 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %23) #3
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #3
  br label %181, !llvm.loop !16

195:                                              ; preds = %189
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %11, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #3
  br label %207

199:                                              ; preds = %185
  %200 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #3
  %201 = icmp eq i64 %200, 0
  br i1 %201, label %202, label %205

202:                                              ; preds = %199
  %203 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEc(ptr noundef nonnull align 8 dereferenceable(32) %0, i8 noundef signext 48)
          to label %204 unwind label %72

204:                                              ; preds = %202
  br label %205

205:                                              ; preds = %204, %199
  store i1 true, ptr %9, align 1
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  %206 = load i1, ptr %9, align 1
  br i1 %206, label %209, label %208

207:                                              ; preds = %195, %176, %162, %124, %87, %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #3
  br label %210

208:                                              ; preds = %205
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #3
  br label %209

209:                                              ; preds = %208, %205
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  ret void

210:                                              ; preds = %207, %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %211

211:                                              ; preds = %210
  %212 = load ptr, ptr %11, align 8
  %213 = load i32, ptr %12, align 4
  %214 = insertvalue { ptr, i32 } poison, ptr %212, 0
  %215 = insertvalue { ptr, i32 } %214, i32 %213, 1
  resume { ptr, i32 } %215
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, 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::__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 }

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

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

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

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

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

; 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 #1 align 2

; 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 #1 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3addNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull %1, ptr noundef %2) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #3
  %11 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #3
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #3
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %12 unwind label %32

12:                                               ; preds = %3
  %13 = trunc i64 %11 to i32
  %14 = trunc i64 %10 to i32
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #3
  %.05079 = add i32 %13, -1
  %.05280 = add i32 %14, -1
  %15 = icmp sgt i32 %13, 0
  %16 = icmp sgt i32 %14, 0
  %17 = and i1 %15, %16
  br i1 %17, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %12
  %18 = zext nneg i32 %.05280 to i64
  %19 = zext nneg i32 %.05079 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %36
  %indvars.iv97 = phi i64 [ %19, %.lr.ph.preheader ], [ %indvars.iv.next98, %36 ]
  %indvars.iv = phi i64 [ %18, %.lr.ph.preheader ], [ %indvars.iv.next, %36 ]
  %.081 = phi i32 [ 0, %.lr.ph.preheader ], [ %37, %36 ]
  %20 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv)
  %21 = load i8, ptr %20, align 1, !tbaa !5
  %22 = sext i8 %21 to i32
  %23 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %indvars.iv97)
  %24 = load i8, ptr %23, align 1, !tbaa !5
  %25 = sext i8 %24 to i32
  %26 = add nsw i32 %.081, -96
  %27 = add nsw i32 %26, %22
  %28 = add nsw i32 %27, %25
  %.off64 = add nsw i32 %28, 9
  %.not63 = icmp ult i32 %.off64, 19
  %29 = add nsw i32 %28, 246
  %spec.select = select i1 %.not63, i32 %28, i32 %29
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #3
  %30 = trunc i32 %spec.select to i8
  %31 = add i8 %30, 48
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EES5_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, i8 noundef signext %31, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %36 unwind label %42

32:                                               ; preds = %3
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #3
  br label %100

34:                                               ; preds = %96
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %98

36:                                               ; preds = %.lr.ph
  %37 = sdiv i32 %28, 10
  %38 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %5) #3
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #3
  %indvars.iv.next98 = add nsw i64 %indvars.iv97, -1
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %39 = icmp sgt i64 %indvars.iv97, 0
  %40 = icmp sgt i64 %indvars.iv, 0
  %41 = and i1 %39, %40
  br i1 %41, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !8

42:                                               ; preds = %.lr.ph
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #3
  br label %98

._crit_edge.loopexit:                             ; preds = %36
  %44 = trunc nsw i64 %indvars.iv.next98 to i32
  %45 = trunc nsw i64 %indvars.iv.next to i32
  br i1 %40, label %.preheader69.preheader, label %.loopexit70

._crit_edge:                                      ; preds = %12
  br i1 %16, label %.preheader69.preheader, label %.loopexit70

.preheader69.preheader:                           ; preds = %._crit_edge.loopexit, %._crit_edge
  %.lcssa74113 = phi i1 [ %39, %._crit_edge.loopexit ], [ %15, %._crit_edge ]
  %.052.lcssa111 = phi i32 [ %45, %._crit_edge.loopexit ], [ %.05280, %._crit_edge ]
  %.050.lcssa110 = phi i32 [ %44, %._crit_edge.loopexit ], [ %.05079, %._crit_edge ]
  %.0.lcssa108 = phi i32 [ %37, %._crit_edge.loopexit ], [ 0, %._crit_edge ]
  %46 = zext i32 %.052.lcssa111 to i64
  br label %.preheader69

.preheader69:                                     ; preds = %.preheader69.preheader, %55
  %indvars.iv102 = phi i64 [ %46, %.preheader69.preheader ], [ %indvars.iv.next103, %55 ]
  %.1 = phi i32 [ %.0.lcssa108, %.preheader69.preheader ], [ %56, %55 ]
  %47 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv102)
  %48 = load i8, ptr %47, align 1, !tbaa !5
  %49 = sext i8 %48 to i32
  %50 = add nsw i32 %.1, -48
  %51 = add nsw i32 %50, %49
  %.off = add nsw i32 %51, 9
  %.not = icmp ult i32 %.off, 19
  %52 = add nsw i32 %51, 246
  %spec.select67 = select i1 %.not, i32 %51, i32 %52
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #3
  %53 = trunc i32 %spec.select67 to i8
  %54 = add i8 %53, 48
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EES5_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, i8 noundef signext %54, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %55 unwind label %59

55:                                               ; preds = %.preheader69
  %56 = sdiv i32 %51, 10
  %57 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %6) #3
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #3
  %indvars.iv.next103 = add nsw i64 %indvars.iv102, -1
  %58 = trunc nuw i64 %indvars.iv102 to i32
  %.old1 = icmp sgt i32 %58, 0
  br i1 %.old1, label %.preheader69, label %.loopexit70

59:                                               ; preds = %.preheader69
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #3
  br label %98

.loopexit70:                                      ; preds = %55, %._crit_edge.loopexit, %._crit_edge
  %.lcssa74112 = phi i1 [ %15, %._crit_edge ], [ %39, %._crit_edge.loopexit ], [ %.lcssa74113, %55 ]
  %.050.lcssa109 = phi i32 [ %.05079, %._crit_edge ], [ %44, %._crit_edge.loopexit ], [ %.050.lcssa110, %55 ]
  %.2 = phi i32 [ 0, %._crit_edge ], [ %37, %._crit_edge.loopexit ], [ %56, %55 ]
  br i1 %.lcssa74112, label %.preheader.preheader, label %.loopexit

.preheader.preheader:                             ; preds = %.loopexit70
  %61 = zext i32 %.050.lcssa109 to i64
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %70
  %indvars.iv105 = phi i64 [ %61, %.preheader.preheader ], [ %indvars.iv.next106, %70 ]
  %.3 = phi i32 [ %.2, %.preheader.preheader ], [ %71, %70 ]
  %62 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %indvars.iv105)
  %63 = load i8, ptr %62, align 1, !tbaa !5
  %64 = sext i8 %63 to i32
  %65 = add nsw i32 %.3, -48
  %66 = add nsw i32 %65, %64
  %.off61 = add nsw i32 %66, 9
  %.not60 = icmp ult i32 %.off61, 19
  %67 = add nsw i32 %66, 246
  %spec.select68 = select i1 %.not60, i32 %66, i32 %67
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #3
  %68 = trunc i32 %spec.select68 to i8
  %69 = add i8 %68, 48
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EES5_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, i8 noundef signext %69, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %70 unwind label %74

70:                                               ; preds = %.preheader
  %71 = sdiv i32 %66, 10
  %72 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %7) #3
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #3
  %indvars.iv.next106 = add nsw i64 %indvars.iv105, -1
  %73 = trunc nuw i64 %indvars.iv105 to i32
  %.old3 = icmp sgt i32 %73, 0
  br i1 %.old3, label %.preheader, label %.loopexit

74:                                               ; preds = %.preheader
  %75 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #3
  br label %98

.loopexit:                                        ; preds = %70, %.loopexit70
  %.4 = phi i32 [ %.2, %.loopexit70 ], [ %71, %70 ]
  %.not62 = icmp eq i32 %.4, 0
  br i1 %.not62, label %83, label %76

76:                                               ; preds = %.loopexit
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #3
  %77 = trunc i32 %.4 to i8
  %78 = add i8 %77, 48
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EES5_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, i8 noundef signext %78, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %79 unwind label %81

79:                                               ; preds = %76
  %80 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %8) #3
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #3
  br label %83

81:                                               ; preds = %76
  %82 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #3
  br label %98

83:                                               ; preds = %79, %.loopexit
  %84 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef 0)
  %85 = load i8, ptr %84, align 1, !tbaa !5
  %86 = icmp eq i8 %85, 48
  br i1 %86, label %.lr.ph89, label %._crit_edge90

.lr.ph89:                                         ; preds = %83, %87
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #3
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef 1, i64 noundef -1)
          to label %87 unwind label %92

87:                                               ; preds = %.lr.ph89
  %88 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %9) #3
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #3
  %89 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef 0)
  %90 = load i8, ptr %89, align 1, !tbaa !5
  %91 = icmp eq i8 %90, 48
  br i1 %91, label %.lr.ph89, label %._crit_edge90, !llvm.loop !10

92:                                               ; preds = %.lr.ph89
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #3
  br label %98

._crit_edge90:                                    ; preds = %87, %83
  %94 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #3
  %95 = icmp eq i64 %94, 0
  br i1 %95, label %96, label %99

96:                                               ; preds = %._crit_edge90
  %97 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEc(ptr noundef nonnull align 8 dereferenceable(32) %0, i8 noundef signext 48)
          to label %99 unwind label %34

98:                                               ; preds = %92, %81, %74, %59, %42, %34
  %.pn = phi { ptr, i32 } [ %43, %42 ], [ %93, %92 ], [ %35, %34 ], [ %82, %81 ], [ %75, %74 ], [ %60, %59 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #3
  br label %100

99:                                               ; preds = %._crit_edge90, %96
  ret void

100:                                              ; preds = %98, %32
  %.pn.pn = phi { ptr, i32 } [ %.pn, %98 ], [ %33, %32 ]
  resume { ptr, i32 } %.pn.pn
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { nounwind }

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

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


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