; LLVM IR from AdarshGaur/Competitive-Programming :: Atcoder/AtCoder Beginner Contest 241（Sponsored by Panasoni) (C - Connect 6)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solveB5cxx11v(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0) #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca %"class.std::allocator", align 1
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca %"class.std::allocator", align 1
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca %"class.std::allocator", align 1
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca %"class.std::allocator", align 1
  %27 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %29 = load i64, ptr %3, align 8, !tbaa !5
  %30 = call ptr @llvm.stacksave.p0()
  store ptr %30, ptr %4, align 8
  %31 = alloca %"class.std::__cxx11::basic_string", i64 %29, align 16
  store i64 %29, ptr %5, align 8
  %32 = icmp eq i64 %29, 0
  br i1 %32, label %39, label %33

33:                                               ; preds = %1
  %34 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %31, i64 %29
  br label %35

35:                                               ; preds = %35, %33
  %36 = phi ptr [ %31, %33 ], [ %37, %35 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #5
  %37 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %36, i64 1
  %38 = icmp eq ptr %37, %34
  br i1 %38, label %39, label %35

39:                                               ; preds = %35, %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store ptr %31, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %40 = load ptr, ptr %6, align 8, !tbaa !9
  store ptr %40, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %41 = load ptr, ptr %6, align 8, !tbaa !9
  %42 = mul nuw i64 32, %29
  %43 = udiv i64 %42, 32
  %44 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %41, i64 %43
  store ptr %44, ptr %8, align 8, !tbaa !9
  br label %45

45:                                               ; preds = %55, %39
  %46 = load ptr, ptr %7, align 8, !tbaa !9
  %47 = load ptr, ptr %8, align 8, !tbaa !9
  %48 = icmp ne ptr %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %62

50:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %51 = load ptr, ptr %7, align 8, !tbaa !9
  store ptr %51, ptr %9, align 8, !tbaa !9
  %52 = load ptr, ptr %9, align 8, !tbaa !9
  %53 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %52)
          to label %54 unwind label %58

54:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %55

55:                                               ; preds = %54
  %56 = load ptr, ptr %7, align 8, !tbaa !9
  %57 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %56, i32 1
  store ptr %57, ptr %7, align 8, !tbaa !9
  br label %45

58:                                               ; preds = %50
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %10, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %303

62:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store i64 0, ptr %12, align 8, !tbaa !5
  br label %63

63:                                               ; preds = %283, %62
  %64 = load i64, ptr %12, align 8, !tbaa !5
  %65 = load i64, ptr %3, align 8, !tbaa !5
  %66 = icmp slt i64 %64, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %63
  store i32 4, ptr %13, align 4
  br label %286

68:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store i64 0, ptr %14, align 8, !tbaa !5
  br label %69

69:                                               ; preds = %276, %68
  %70 = load i64, ptr %14, align 8, !tbaa !5
  %71 = load i64, ptr %3, align 8, !tbaa !5
  %72 = icmp slt i64 %70, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %69
  store i32 7, ptr %13, align 4
  br label %279

74:                                               ; preds = %69
  %75 = load i64, ptr %14, align 8, !tbaa !5
  %76 = add nsw i64 %75, 5
  %77 = load i64, ptr %3, align 8, !tbaa !5
  %78 = icmp slt i64 %76, %77
  br i1 %78, label %79, label %121

79:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store i64 0, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  store i64 0, ptr %16, align 8, !tbaa !5
  br label %80

80:                                               ; preds = %100, %79
  %81 = load i64, ptr %16, align 8, !tbaa !5
  %82 = icmp slt i64 %81, 6
  br i1 %82, label %84, label %83

83:                                               ; preds = %80
  store i32 10, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %107

84:                                               ; preds = %80
  %85 = load i64, ptr %12, align 8, !tbaa !5
  %86 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %31, i64 %85
  %87 = load i64, ptr %14, align 8, !tbaa !5
  %88 = load i64, ptr %16, align 8, !tbaa !5
  %89 = add nsw i64 %87, %88
  %90 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %86, i64 noundef %89)
          to label %91 unwind label %103

91:                                               ; preds = %84
  %92 = load i8, ptr %90, align 1, !tbaa !11
  %93 = sext i8 %92 to i32
  %94 = icmp eq i32 %93, 46
  %95 = zext i1 %94 to i64
  %96 = select i1 %94, i32 1, i32 0
  %97 = sext i32 %96 to i64
  %98 = load i64, ptr %15, align 8, !tbaa !5
  %99 = add nsw i64 %98, %97
  store i64 %99, ptr %15, align 8, !tbaa !5
  br label %100

100:                                              ; preds = %91
  %101 = load i64, ptr %16, align 8, !tbaa !5
  %102 = add nsw i64 %101, 1
  store i64 %102, ptr %16, align 8, !tbaa !5
  br label %80, !llvm.loop !12

103:                                              ; preds = %84
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %10, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %120

107:                                              ; preds = %83
  %108 = load i64, ptr %15, align 8, !tbaa !5
  %109 = icmp sle i64 %108, 2
  br i1 %109, label %110, label %116

110:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  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) %17)
          to label %111 unwind label %112

111:                                              ; preds = %110
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  store i32 1, ptr %13, align 4
  br label %117

112:                                              ; preds = %110
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %10, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %11, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  br label %120

116:                                              ; preds = %107
  store i32 0, ptr %13, align 4
  br label %117

117:                                              ; preds = %116, %111
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  %118 = load i32, ptr %13, align 4
  switch i32 %118, label %279 [
    i32 0, label %119
  ]

119:                                              ; preds = %117
  br label %121

120:                                              ; preds = %112, %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %281

121:                                              ; preds = %119, %74
  %122 = load i64, ptr %12, align 8, !tbaa !5
  %123 = add nsw i64 %122, 5
  %124 = load i64, ptr %3, align 8, !tbaa !5
  %125 = icmp slt i64 %123, %124
  br i1 %125, label %126, label %168

126:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  store i64 0, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  store i64 0, ptr %19, align 8, !tbaa !5
  br label %127

127:                                              ; preds = %147, %126
  %128 = load i64, ptr %19, align 8, !tbaa !5
  %129 = icmp slt i64 %128, 6
  br i1 %129, label %131, label %130

130:                                              ; preds = %127
  store i32 13, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %154

131:                                              ; preds = %127
  %132 = load i64, ptr %12, align 8, !tbaa !5
  %133 = load i64, ptr %19, align 8, !tbaa !5
  %134 = add nsw i64 %132, %133
  %135 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %31, i64 %134
  %136 = load i64, ptr %14, align 8, !tbaa !5
  %137 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %135, i64 noundef %136)
          to label %138 unwind label %150

138:                                              ; preds = %131
  %139 = load i8, ptr %137, align 1, !tbaa !11
  %140 = sext i8 %139 to i32
  %141 = icmp eq i32 %140, 46
  %142 = zext i1 %141 to i64
  %143 = select i1 %141, i32 1, i32 0
  %144 = sext i32 %143 to i64
  %145 = load i64, ptr %18, align 8, !tbaa !5
  %146 = add nsw i64 %145, %144
  store i64 %146, ptr %18, align 8, !tbaa !5
  br label %147

147:                                              ; preds = %138
  %148 = load i64, ptr %19, align 8, !tbaa !5
  %149 = add nsw i64 %148, 1
  store i64 %149, ptr %19, align 8, !tbaa !5
  br label %127, !llvm.loop !14

150:                                              ; preds = %131
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %10, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %167

154:                                              ; preds = %130
  %155 = load i64, ptr %18, align 8, !tbaa !5
  %156 = icmp sle i64 %155, 2
  br i1 %156, label %157, label %163

157:                                              ; preds = %154
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  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) %20)
          to label %158 unwind label %159

158:                                              ; preds = %157
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  store i32 1, ptr %13, align 4
  br label %164

159:                                              ; preds = %157
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %10, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %11, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  br label %167

163:                                              ; preds = %154
  store i32 0, ptr %13, align 4
  br label %164

164:                                              ; preds = %163, %158
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  %165 = load i32, ptr %13, align 4
  switch i32 %165, label %279 [
    i32 0, label %166
  ]

166:                                              ; preds = %164
  br label %168

167:                                              ; preds = %159, %150
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %281

168:                                              ; preds = %166, %121
  %169 = load i64, ptr %12, align 8, !tbaa !5
  %170 = add nsw i64 %169, 5
  %171 = load i64, ptr %3, align 8, !tbaa !5
  %172 = icmp slt i64 %170, %171
  br i1 %172, label %173, label %222

173:                                              ; preds = %168
  %174 = load i64, ptr %14, align 8, !tbaa !5
  %175 = add nsw i64 %174, 5
  %176 = load i64, ptr %3, align 8, !tbaa !5
  %177 = icmp slt i64 %175, %176
  br i1 %177, label %178, label %222

178:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  store i64 0, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  store i64 0, ptr %22, align 8, !tbaa !5
  br label %179

179:                                              ; preds = %201, %178
  %180 = load i64, ptr %22, align 8, !tbaa !5
  %181 = icmp slt i64 %180, 6
  br i1 %181, label %183, label %182

182:                                              ; preds = %179
  store i32 16, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br label %208

183:                                              ; preds = %179
  %184 = load i64, ptr %12, align 8, !tbaa !5
  %185 = load i64, ptr %22, align 8, !tbaa !5
  %186 = add nsw i64 %184, %185
  %187 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %31, i64 %186
  %188 = load i64, ptr %14, align 8, !tbaa !5
  %189 = load i64, ptr %22, align 8, !tbaa !5
  %190 = add nsw i64 %188, %189
  %191 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %187, i64 noundef %190)
          to label %192 unwind label %204

192:                                              ; preds = %183
  %193 = load i8, ptr %191, align 1, !tbaa !11
  %194 = sext i8 %193 to i32
  %195 = icmp eq i32 %194, 46
  %196 = zext i1 %195 to i64
  %197 = select i1 %195, i32 1, i32 0
  %198 = sext i32 %197 to i64
  %199 = load i64, ptr %21, align 8, !tbaa !5
  %200 = add nsw i64 %199, %198
  store i64 %200, ptr %21, align 8, !tbaa !5
  br label %201

201:                                              ; preds = %192
  %202 = load i64, ptr %22, align 8, !tbaa !5
  %203 = add nsw i64 %202, 1
  store i64 %203, ptr %22, align 8, !tbaa !5
  br label %179, !llvm.loop !15

204:                                              ; preds = %183
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %10, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br label %221

208:                                              ; preds = %182
  %209 = load i64, ptr %21, align 8, !tbaa !5
  %210 = icmp sle i64 %209, 2
  br i1 %210, label %211, label %217

211:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #5
  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) %23)
          to label %212 unwind label %213

212:                                              ; preds = %211
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #5
  store i32 1, ptr %13, align 4
  br label %218

213:                                              ; preds = %211
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %10, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %11, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #5
  br label %221

217:                                              ; preds = %208
  store i32 0, ptr %13, align 4
  br label %218

218:                                              ; preds = %217, %212
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  %219 = load i32, ptr %13, align 4
  switch i32 %219, label %279 [
    i32 0, label %220
  ]

220:                                              ; preds = %218
  br label %222

221:                                              ; preds = %213, %204
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %281

222:                                              ; preds = %220, %173, %168
  %223 = load i64, ptr %12, align 8, !tbaa !5
  %224 = add nsw i64 %223, 5
  %225 = load i64, ptr %3, align 8, !tbaa !5
  %226 = icmp slt i64 %224, %225
  br i1 %226, label %227, label %275

227:                                              ; preds = %222
  %228 = load i64, ptr %14, align 8, !tbaa !5
  %229 = sub nsw i64 %228, 5
  %230 = icmp sge i64 %229, 0
  br i1 %230, label %231, label %275

231:                                              ; preds = %227
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  store i64 0, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  store i64 0, ptr %25, align 8, !tbaa !5
  br label %232

232:                                              ; preds = %254, %231
  %233 = load i64, ptr %25, align 8, !tbaa !5
  %234 = icmp slt i64 %233, 6
  br i1 %234, label %236, label %235

235:                                              ; preds = %232
  store i32 19, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  br label %261

236:                                              ; preds = %232
  %237 = load i64, ptr %12, align 8, !tbaa !5
  %238 = load i64, ptr %25, align 8, !tbaa !5
  %239 = add nsw i64 %237, %238
  %240 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %31, i64 %239
  %241 = load i64, ptr %14, align 8, !tbaa !5
  %242 = load i64, ptr %25, align 8, !tbaa !5
  %243 = sub nsw i64 %241, %242
  %244 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %240, i64 noundef %243)
          to label %245 unwind label %257

245:                                              ; preds = %236
  %246 = load i8, ptr %244, align 1, !tbaa !11
  %247 = sext i8 %246 to i32
  %248 = icmp eq i32 %247, 46
  %249 = zext i1 %248 to i64
  %250 = select i1 %248, i32 1, i32 0
  %251 = sext i32 %250 to i64
  %252 = load i64, ptr %24, align 8, !tbaa !5
  %253 = add nsw i64 %252, %251
  store i64 %253, ptr %24, align 8, !tbaa !5
  br label %254

254:                                              ; preds = %245
  %255 = load i64, ptr %25, align 8, !tbaa !5
  %256 = add nsw i64 %255, 1
  store i64 %256, ptr %25, align 8, !tbaa !5
  br label %232, !llvm.loop !16

257:                                              ; preds = %236
  %258 = landingpad { ptr, i32 }
          cleanup
  %259 = extractvalue { ptr, i32 } %258, 0
  store ptr %259, ptr %10, align 8
  %260 = extractvalue { ptr, i32 } %258, 1
  store i32 %260, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  br label %274

261:                                              ; preds = %235
  %262 = load i64, ptr %24, align 8, !tbaa !5
  %263 = icmp sle i64 %262, 2
  br i1 %263, label %264, label %270

264:                                              ; preds = %261
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #5
  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) %26)
          to label %265 unwind label %266

265:                                              ; preds = %264
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #5
  store i32 1, ptr %13, align 4
  br label %271

266:                                              ; preds = %264
  %267 = landingpad { ptr, i32 }
          cleanup
  %268 = extractvalue { ptr, i32 } %267, 0
  store ptr %268, ptr %10, align 8
  %269 = extractvalue { ptr, i32 } %267, 1
  store i32 %269, ptr %11, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #5
  br label %274

270:                                              ; preds = %261
  store i32 0, ptr %13, align 4
  br label %271

271:                                              ; preds = %270, %265
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  %272 = load i32, ptr %13, align 4
  switch i32 %272, label %279 [
    i32 0, label %273
  ]

273:                                              ; preds = %271
  br label %275

274:                                              ; preds = %266, %257
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %281

275:                                              ; preds = %273, %227, %222
  br label %276

276:                                              ; preds = %275
  %277 = load i64, ptr %14, align 8, !tbaa !5
  %278 = add nsw i64 %277, 1
  store i64 %278, ptr %14, align 8, !tbaa !5
  br label %69, !llvm.loop !17

279:                                              ; preds = %271, %218, %164, %117, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  %280 = load i32, ptr %13, align 4
  switch i32 %280, label %286 [
    i32 7, label %282
  ]

281:                                              ; preds = %274, %221, %167, %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %303

282:                                              ; preds = %279
  br label %283

283:                                              ; preds = %282
  %284 = load i64, ptr %12, align 8, !tbaa !5
  %285 = add nsw i64 %284, 1
  store i64 %285, ptr %12, align 8, !tbaa !5
  br label %63, !llvm.loop !18

286:                                              ; preds = %279, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %287 = load i32, ptr %13, align 4
  switch i32 %287, label %294 [
    i32 4, label %288
  ]

288:                                              ; preds = %286
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %289 unwind label %290

289:                                              ; preds = %288
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #5
  store i32 1, ptr %13, align 4
  br label %294

290:                                              ; preds = %288
  %291 = landingpad { ptr, i32 }
          cleanup
  %292 = extractvalue { ptr, i32 } %291, 0
  store ptr %292, ptr %10, align 8
  %293 = extractvalue { ptr, i32 } %291, 1
  store i32 %293, ptr %11, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #5
  br label %303

294:                                              ; preds = %289, %286
  %295 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %31, i64 %29
  %296 = icmp eq ptr %31, %295
  br i1 %296, label %301, label %297

297:                                              ; preds = %297, %294
  %298 = phi ptr [ %295, %294 ], [ %299, %297 ]
  %299 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %298, i64 -1
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %299) #5
  %300 = icmp eq ptr %299, %31
  br i1 %300, label %301, label %297

301:                                              ; preds = %297, %294
  %302 = load ptr, ptr %4, align 8
  call void @llvm.stackrestore.p0(ptr %302)
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret void

303:                                              ; preds = %290, %281, %58
  %304 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %31, i64 %29
  %305 = icmp eq ptr %31, %304
  br i1 %305, label %310, label %306

306:                                              ; preds = %306, %303
  %307 = phi ptr [ %304, %303 ], [ %308, %306 ]
  %308 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %307, i64 -1
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %308) #5
  %309 = icmp eq ptr %308, %31
  br i1 %309, label %310, label %306

310:                                              ; preds = %306, %303
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %311

311:                                              ; preds = %310
  %312 = load ptr, ptr %10, align 8
  %313 = load i32, ptr %11, align 4
  %314 = insertvalue { ptr, i32 } poison, ptr %312, 0
  %315 = insertvalue { ptr, i32 } %314, i32 %313, 1
  resume { ptr, i32 } %315
}

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

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

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

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

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

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 noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #3 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 = { nocallback nofree nosync nounwind willreturn }
attributes #3 = { 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 #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !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}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solveB5cxx11v(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca i64, align 8
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %9 = load i64, ptr %2, align 8, !tbaa !5
  %10 = call ptr @llvm.stacksave.p0()
  %11 = alloca %"class.std::__cxx11::basic_string", i64 %9, align 16
  %12 = icmp eq i64 %9, 0
  %13 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %11, i64 %9
  br i1 %12, label %.preheader103, label %.preheader127

.preheader127:                                    ; preds = %1, %.preheader127
  %14 = phi ptr [ %15, %.preheader127 ], [ %11, %1 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  %15 = getelementptr inbounds i8, ptr %14, i64 32
  %16 = icmp eq ptr %15, %13
  br i1 %16, label %.loopexit104, label %.preheader127

.loopexit104:                                     ; preds = %.preheader127
  %17 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %11, i64 %9
  br i1 %12, label %.preheader103, label %.lr.ph

.preheader103:                                    ; preds = %21, %1, %.loopexit104
  %18 = phi ptr [ %17, %.loopexit104 ], [ %13, %1 ], [ %17, %21 ]
  %19 = load i64, ptr %2, align 8, !tbaa !5
  %.not82118 = icmp sgt i64 %19, 0
  br i1 %.not82118, label %.preheader102, label %.critedge95

.lr.ph:                                           ; preds = %.loopexit104, %21
  %.074106 = phi ptr [ %22, %21 ], [ %11, %.loopexit104 ]
  %20 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %.074106)
          to label %21 unwind label %23

21:                                               ; preds = %.lr.ph
  %22 = getelementptr inbounds i8, ptr %.074106, i64 32
  %.not = icmp eq ptr %22, %17
  br i1 %.not, label %.preheader103, label %.lr.ph

23:                                               ; preds = %.lr.ph
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %220

.preheader102:                                    ; preds = %.preheader103, %.critedge93
  %25 = phi i64 [ %211, %.critedge93 ], [ %19, %.preheader103 ]
  %.069119 = phi i64 [ %212, %.critedge93 ], [ 0, %.preheader103 ]
  %.not81115 = icmp sgt i64 %25, 0
  br i1 %.not81115, label %.lr.ph117, label %.critedge93

.lr.ph117:                                        ; preds = %.preheader102
  %26 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %11, i64 %.069119
  %27 = add nuw nsw i64 %.069119, 5
  %28 = getelementptr inbounds i8, ptr %26, i64 32
  %29 = getelementptr inbounds i8, ptr %26, i64 64
  %30 = getelementptr inbounds i8, ptr %26, i64 96
  %31 = getelementptr inbounds i8, ptr %26, i64 128
  %32 = getelementptr inbounds i8, ptr %26, i64 160
  %33 = getelementptr inbounds i8, ptr %26, i64 32
  %34 = getelementptr inbounds i8, ptr %26, i64 64
  %35 = getelementptr inbounds i8, ptr %26, i64 96
  %36 = getelementptr inbounds i8, ptr %26, i64 128
  %37 = getelementptr inbounds i8, ptr %26, i64 160
  %38 = getelementptr inbounds i8, ptr %26, i64 32
  %39 = getelementptr inbounds i8, ptr %26, i64 64
  %40 = getelementptr inbounds i8, ptr %26, i64 96
  %41 = getelementptr inbounds i8, ptr %26, i64 128
  %42 = getelementptr inbounds i8, ptr %26, i64 160
  br label %43

43:                                               ; preds = %.lr.ph117, %.critedge91
  %44 = phi i64 [ %25, %.lr.ph117 ], [ %208, %.critedge91 ]
  %45 = phi i64 [ %25, %.lr.ph117 ], [ %209, %.critedge91 ]
  %.067116 = phi i64 [ 0, %.lr.ph117 ], [ %210, %.critedge91 ]
  %46 = add nuw nsw i64 %.067116, 5
  %47 = icmp slt i64 %46, %45
  br i1 %47, label %.preheader101.preheader, label %.critedge

.preheader101.preheader:                          ; preds = %43
  %48 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %26, i64 noundef %.067116)
  %49 = load i8, ptr %48, align 1, !tbaa !9
  %50 = icmp eq i8 %49, 46
  %51 = zext i1 %50 to i64
  %52 = add nuw nsw i64 %.067116, 1
  %53 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %26, i64 noundef %52)
  %54 = load i8, ptr %53, align 1, !tbaa !9
  %55 = icmp eq i8 %54, 46
  %56 = zext i1 %55 to i64
  %57 = add nuw nsw i64 %51, %56
  %58 = add nuw nsw i64 %.067116, 2
  %59 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %26, i64 noundef %58)
  %60 = load i8, ptr %59, align 1, !tbaa !9
  %61 = icmp eq i8 %60, 46
  %62 = zext i1 %61 to i64
  %63 = add nuw nsw i64 %57, %62
  %64 = add nuw nsw i64 %.067116, 3
  %65 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %26, i64 noundef %64)
  %66 = load i8, ptr %65, align 1, !tbaa !9
  %67 = icmp eq i8 %66, 46
  %68 = zext i1 %67 to i64
  %69 = add nuw nsw i64 %63, %68
  %70 = add nuw nsw i64 %.067116, 4
  %71 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %26, i64 noundef %70)
  %72 = load i8, ptr %71, align 1, !tbaa !9
  %73 = icmp eq i8 %72, 46
  %74 = zext i1 %73 to i64
  %75 = add nuw nsw i64 %69, %74
  %76 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %26, i64 noundef %46)
  %77 = load i8, ptr %76, align 1, !tbaa !9
  %78 = icmp eq i8 %77, 46
  %79 = zext i1 %78 to i64
  %80 = add nuw nsw i64 %75, %79
  %81 = icmp ugt i64 %80, 2
  br i1 %81, label %.preheader101.preheader..critedge_crit_edge, label %82

.preheader101.preheader..critedge_crit_edge:      ; preds = %.preheader101.preheader
  %.pre = load i64, ptr %2, align 8, !tbaa !5
  br label %.critedge

82:                                               ; preds = %.preheader101.preheader
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  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) %3)
          to label %83 unwind label %84

83:                                               ; preds = %82
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  br label %216

84:                                               ; preds = %82
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  br label %220

.critedge:                                        ; preds = %.preheader101.preheader..critedge_crit_edge, %43
  %86 = phi i64 [ %.pre, %.preheader101.preheader..critedge_crit_edge ], [ %44, %43 ]
  %87 = phi i64 [ %.pre, %.preheader101.preheader..critedge_crit_edge ], [ %45, %43 ]
  %88 = icmp slt i64 %27, %87
  br i1 %88, label %.preheader100.preheader, label %.critedge86

.preheader100.preheader:                          ; preds = %.critedge
  %89 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %26, i64 noundef %.067116)
  %90 = load i8, ptr %89, align 1, !tbaa !9
  %91 = icmp eq i8 %90, 46
  %92 = zext i1 %91 to i64
  %93 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %28, i64 noundef %.067116)
  %94 = load i8, ptr %93, align 1, !tbaa !9
  %95 = icmp eq i8 %94, 46
  %96 = zext i1 %95 to i64
  %97 = add nuw nsw i64 %92, %96
  %98 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %29, i64 noundef %.067116)
  %99 = load i8, ptr %98, align 1, !tbaa !9
  %100 = icmp eq i8 %99, 46
  %101 = zext i1 %100 to i64
  %102 = add nuw nsw i64 %97, %101
  %103 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %30, i64 noundef %.067116)
  %104 = load i8, ptr %103, align 1, !tbaa !9
  %105 = icmp eq i8 %104, 46
  %106 = zext i1 %105 to i64
  %107 = add nuw nsw i64 %102, %106
  %108 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %31, i64 noundef %.067116)
  %109 = load i8, ptr %108, align 1, !tbaa !9
  %110 = icmp eq i8 %109, 46
  %111 = zext i1 %110 to i64
  %112 = add nuw nsw i64 %107, %111
  %113 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %32, i64 noundef %.067116)
  %114 = load i8, ptr %113, align 1, !tbaa !9
  %115 = icmp eq i8 %114, 46
  %116 = zext i1 %115 to i64
  %117 = add nuw nsw i64 %112, %116
  %118 = icmp ugt i64 %117, 2
  br i1 %118, label %.preheader100.preheader..critedge86_crit_edge, label %119

.preheader100.preheader..critedge86_crit_edge:    ; preds = %.preheader100.preheader
  %.pre124 = load i64, ptr %2, align 8, !tbaa !5
  br label %.critedge86

119:                                              ; preds = %.preheader100.preheader
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  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 %120 unwind label %121

120:                                              ; preds = %119
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  br label %216

121:                                              ; preds = %119
  %122 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  br label %220

.critedge86:                                      ; preds = %.preheader100.preheader..critedge86_crit_edge, %.critedge
  %123 = phi i64 [ %.pre124, %.preheader100.preheader..critedge86_crit_edge ], [ %86, %.critedge ]
  %124 = phi i64 [ %.pre124, %.preheader100.preheader..critedge86_crit_edge ], [ %87, %.critedge ]
  %125 = icmp slt i64 %27, %124
  %126 = icmp slt i64 %46, %124
  %or.cond = and i1 %125, %126
  br i1 %or.cond, label %.preheader99.preheader, label %.critedge88

.preheader99.preheader:                           ; preds = %.critedge86
  %127 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %26, i64 noundef %.067116)
  %128 = load i8, ptr %127, align 1, !tbaa !9
  %129 = icmp eq i8 %128, 46
  %130 = zext i1 %129 to i64
  %131 = add nuw nsw i64 %.067116, 1
  %132 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %33, i64 noundef %131)
  %133 = load i8, ptr %132, align 1, !tbaa !9
  %134 = icmp eq i8 %133, 46
  %135 = zext i1 %134 to i64
  %136 = add nuw nsw i64 %130, %135
  %137 = add nuw nsw i64 %.067116, 2
  %138 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %34, i64 noundef %137)
  %139 = load i8, ptr %138, align 1, !tbaa !9
  %140 = icmp eq i8 %139, 46
  %141 = zext i1 %140 to i64
  %142 = add nuw nsw i64 %136, %141
  %143 = add nuw nsw i64 %.067116, 3
  %144 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %35, i64 noundef %143)
  %145 = load i8, ptr %144, align 1, !tbaa !9
  %146 = icmp eq i8 %145, 46
  %147 = zext i1 %146 to i64
  %148 = add nuw nsw i64 %142, %147
  %149 = add nuw nsw i64 %.067116, 4
  %150 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %36, i64 noundef %149)
  %151 = load i8, ptr %150, align 1, !tbaa !9
  %152 = icmp eq i8 %151, 46
  %153 = zext i1 %152 to i64
  %154 = add nuw nsw i64 %148, %153
  %155 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %37, i64 noundef %46)
  %156 = load i8, ptr %155, align 1, !tbaa !9
  %157 = icmp eq i8 %156, 46
  %158 = zext i1 %157 to i64
  %159 = add nuw nsw i64 %154, %158
  %160 = icmp ugt i64 %159, 2
  br i1 %160, label %.preheader99.preheader..critedge88_crit_edge, label %161

.preheader99.preheader..critedge88_crit_edge:     ; preds = %.preheader99.preheader
  %.pre125 = load i64, ptr %2, align 8, !tbaa !5
  br label %.critedge88

161:                                              ; preds = %.preheader99.preheader
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  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) %5)
          to label %162 unwind label %163

162:                                              ; preds = %161
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  br label %216

163:                                              ; preds = %161
  %164 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  br label %220

.critedge88:                                      ; preds = %.preheader99.preheader..critedge88_crit_edge, %.critedge86
  %165 = phi i64 [ %.pre125, %.preheader99.preheader..critedge88_crit_edge ], [ %123, %.critedge86 ]
  %166 = phi i64 [ %.pre125, %.preheader99.preheader..critedge88_crit_edge ], [ %124, %.critedge86 ]
  %167 = icmp slt i64 %27, %166
  %168 = icmp ugt i64 %.067116, 4
  %or.cond89 = and i1 %168, %167
  br i1 %or.cond89, label %.preheader98.preheader, label %.critedge91

.preheader98.preheader:                           ; preds = %.critedge88
  %169 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %26, i64 noundef %.067116)
  %170 = load i8, ptr %169, align 1, !tbaa !9
  %171 = icmp eq i8 %170, 46
  %172 = zext i1 %171 to i64
  %173 = add nsw i64 %.067116, -1
  %174 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %38, i64 noundef %173)
  %175 = load i8, ptr %174, align 1, !tbaa !9
  %176 = icmp eq i8 %175, 46
  %177 = zext i1 %176 to i64
  %178 = add nuw nsw i64 %172, %177
  %179 = add nsw i64 %.067116, -2
  %180 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %39, i64 noundef %179)
  %181 = load i8, ptr %180, align 1, !tbaa !9
  %182 = icmp eq i8 %181, 46
  %183 = zext i1 %182 to i64
  %184 = add nuw nsw i64 %178, %183
  %185 = add nsw i64 %.067116, -3
  %186 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %40, i64 noundef %185)
  %187 = load i8, ptr %186, align 1, !tbaa !9
  %188 = icmp eq i8 %187, 46
  %189 = zext i1 %188 to i64
  %190 = add nuw nsw i64 %184, %189
  %191 = add nsw i64 %.067116, -4
  %192 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %41, i64 noundef %191)
  %193 = load i8, ptr %192, align 1, !tbaa !9
  %194 = icmp eq i8 %193, 46
  %195 = zext i1 %194 to i64
  %196 = add nuw nsw i64 %190, %195
  %197 = add nsw i64 %.067116, -5
  %198 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %42, i64 noundef %197)
  %199 = load i8, ptr %198, align 1, !tbaa !9
  %200 = icmp eq i8 %199, 46
  %201 = zext i1 %200 to i64
  %202 = add nuw nsw i64 %196, %201
  %203 = icmp ugt i64 %202, 2
  br i1 %203, label %.preheader98.preheader..critedge91_crit_edge, label %204

.preheader98.preheader..critedge91_crit_edge:     ; preds = %.preheader98.preheader
  %.pre126 = load i64, ptr %2, align 8, !tbaa !5
  br label %.critedge91

204:                                              ; preds = %.preheader98.preheader
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  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) %6)
          to label %205 unwind label %206

205:                                              ; preds = %204
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  br label %216

206:                                              ; preds = %204
  %207 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  br label %220

.critedge91:                                      ; preds = %.preheader98.preheader..critedge91_crit_edge, %.critedge88
  %208 = phi i64 [ %.pre126, %.preheader98.preheader..critedge91_crit_edge ], [ %165, %.critedge88 ]
  %209 = phi i64 [ %.pre126, %.preheader98.preheader..critedge91_crit_edge ], [ %166, %.critedge88 ]
  %210 = add nuw nsw i64 %.067116, 1
  %.not81 = icmp slt i64 %210, %209
  br i1 %.not81, label %43, label %.critedge93, !llvm.loop !10

.critedge93:                                      ; preds = %.critedge91, %.preheader102
  %211 = phi i64 [ %25, %.preheader102 ], [ %208, %.critedge91 ]
  %212 = add nuw nsw i64 %.069119, 1
  %.not82 = icmp slt i64 %212, %211
  br i1 %.not82, label %.preheader102, label %.critedge95, !llvm.loop !12

.critedge95:                                      ; preds = %.critedge93, %.preheader103
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %213 unwind label %214

213:                                              ; preds = %.critedge95
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  br label %216

214:                                              ; preds = %.critedge95
  %215 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  br label %220

216:                                              ; preds = %205, %162, %120, %83, %213
  br i1 %12, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %216, %.preheader
  %217 = phi ptr [ %218, %.preheader ], [ %18, %216 ]
  %218 = getelementptr inbounds i8, ptr %217, i64 -32
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %218) #5
  %219 = icmp eq ptr %218, %11
  br i1 %219, label %.loopexit, label %.preheader

.loopexit:                                        ; preds = %.preheader, %216
  call void @llvm.stackrestore.p0(ptr %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  ret void

220:                                              ; preds = %84, %121, %163, %206, %214, %23
  %221 = phi ptr [ %17, %23 ], [ %18, %214 ], [ %18, %206 ], [ %18, %163 ], [ %18, %121 ], [ %18, %84 ]
  %.pn83 = phi { ptr, i32 } [ %24, %23 ], [ %215, %214 ], [ %207, %206 ], [ %164, %163 ], [ %122, %121 ], [ %85, %84 ]
  br i1 %12, label %.loopexit97, label %.preheader96

.preheader96:                                     ; preds = %220, %.preheader96
  %222 = phi ptr [ %223, %.preheader96 ], [ %221, %220 ]
  %223 = getelementptr inbounds i8, ptr %222, i64 -32
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %223) #5
  %224 = icmp eq ptr %223, %11
  br i1 %224, label %.loopexit97, label %.preheader96

.loopexit97:                                      ; preds = %.preheader96, %220
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn83
}

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

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

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

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

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

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 noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 nocallback nofree nosync nounwind willreturn }
attributes #3 = { 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 #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

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

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


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