; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/LONG/AUG15/GRGUY (B)

; 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@t = external dso_local global i32, align 4
@_Z2s1B5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_Z2s2B5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %10 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %11 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %12 = getelementptr i8, ptr %11, i64 -24
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %13
  %15 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %14, ptr noundef null)
  %16 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %17 = getelementptr i8, ptr %16, i64 -24
  %18 = load i64, ptr %17, align 8
  %19 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %18
  %20 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %19, ptr noundef null)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @t)
  br label %22

22:                                               ; preds = %279, %277, %0
  %23 = load i32, ptr @t, align 4, !tbaa !8
  %24 = add nsw i32 %23, -1
  store i32 %24, ptr @t, align 4, !tbaa !8
  %25 = icmp ne i32 %23, 0
  br i1 %25, label %26, label %280

26:                                               ; preds = %22
  %27 = call 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) @_Z2s1B5cxx11)
  %28 = call 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) %27, ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  %29 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11) #7
  %30 = trunc i64 %29 to i32
  store i32 %30, ptr %3, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 1000000000, ptr %5, align 4, !tbaa !8
  %31 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i8 noundef signext 35)
  %32 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i8 noundef signext 35)
  %33 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef 0)
  %34 = load i8, ptr %33, align 1, !tbaa !11
  %35 = sext i8 %34 to i32
  %36 = icmp eq i32 %35, 35
  br i1 %36, label %37, label %44

37:                                               ; preds = %26
  %38 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef 0)
  %39 = load i8, ptr %38, align 1, !tbaa !11
  %40 = sext i8 %39 to i32
  %41 = icmp eq i32 %40, 35
  br i1 %41, label %42, label %44

42:                                               ; preds = %37
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  store i32 2, ptr %6, align 4
  br label %277, !llvm.loop !12

44:                                               ; preds = %37, %26
  store i32 0, ptr %4, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #7
  store i8 1, ptr %7, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !8
  br label %45

45:                                               ; preds = %146, %44
  %46 = load i32, ptr %8, align 4, !tbaa !8
  %47 = load i32, ptr %3, align 4, !tbaa !8
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  store i32 4, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %149

50:                                               ; preds = %45
  %51 = load i32, ptr %4, align 4, !tbaa !8
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %99, label %53

53:                                               ; preds = %50
  %54 = load i32, ptr %8, align 4, !tbaa !8
  %55 = sext i32 %54 to i64
  %56 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef %55)
  %57 = load i8, ptr %56, align 1, !tbaa !11
  %58 = sext i8 %57 to i32
  %59 = icmp eq i32 %58, 35
  br i1 %59, label %60, label %98

60:                                               ; preds = %53
  %61 = load i32, ptr %8, align 4, !tbaa !8
  %62 = sext i32 %61 to i64
  %63 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef %62)
  %64 = load i8, ptr %63, align 1, !tbaa !11
  %65 = sext i8 %64 to i32
  %66 = icmp eq i32 %65, 35
  br i1 %66, label %67, label %76

67:                                               ; preds = %60
  %68 = load i32, ptr %8, align 4, !tbaa !8
  %69 = add nsw i32 %68, 1
  %70 = sext i32 %69 to i64
  %71 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef %70)
  %72 = load i8, ptr %71, align 1, !tbaa !11
  %73 = sext i8 %72 to i32
  %74 = icmp eq i32 %73, 35
  br i1 %74, label %75, label %76

75:                                               ; preds = %67
  store i8 0, ptr %7, align 1, !tbaa !14
  br label %97

76:                                               ; preds = %67, %60
  %77 = load i32, ptr %8, align 4, !tbaa !8
  %78 = sext i32 %77 to i64
  %79 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef %78)
  %80 = load i8, ptr %79, align 1, !tbaa !11
  %81 = sext i8 %80 to i32
  %82 = icmp eq i32 %81, 35
  br i1 %82, label %83, label %94

83:                                               ; preds = %76
  %84 = load i32, ptr %8, align 4, !tbaa !8
  %85 = add nsw i32 %84, 1
  %86 = sext i32 %85 to i64
  %87 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef %86)
  %88 = load i8, ptr %87, align 1, !tbaa !11
  %89 = sext i8 %88 to i32
  %90 = icmp eq i32 %89, 46
  br i1 %90, label %91, label %94

91:                                               ; preds = %83
  %92 = load i32, ptr %8, align 4, !tbaa !8
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %8, align 4, !tbaa !8
  br label %94

94:                                               ; preds = %91, %83, %76
  store i32 1, ptr %4, align 4, !tbaa !8
  %95 = load i32, ptr %2, align 4, !tbaa !8
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %2, align 4, !tbaa !8
  br label %97

97:                                               ; preds = %94, %75
  br label %98

98:                                               ; preds = %97, %53
  br label %145

99:                                               ; preds = %50
  %100 = load i32, ptr %8, align 4, !tbaa !8
  %101 = sext i32 %100 to i64
  %102 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef %101)
  %103 = load i8, ptr %102, align 1, !tbaa !11
  %104 = sext i8 %103 to i32
  %105 = icmp eq i32 %104, 35
  br i1 %105, label %106, label %144

106:                                              ; preds = %99
  %107 = load i32, ptr %8, align 4, !tbaa !8
  %108 = sext i32 %107 to i64
  %109 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef %108)
  %110 = load i8, ptr %109, align 1, !tbaa !11
  %111 = sext i8 %110 to i32
  %112 = icmp eq i32 %111, 35
  br i1 %112, label %113, label %122

113:                                              ; preds = %106
  %114 = load i32, ptr %8, align 4, !tbaa !8
  %115 = add nsw i32 %114, 1
  %116 = sext i32 %115 to i64
  %117 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef %116)
  %118 = load i8, ptr %117, align 1, !tbaa !11
  %119 = sext i8 %118 to i32
  %120 = icmp eq i32 %119, 35
  br i1 %120, label %121, label %122

121:                                              ; preds = %113
  store i8 0, ptr %7, align 1, !tbaa !14
  br label %143

122:                                              ; preds = %113, %106
  %123 = load i32, ptr %8, align 4, !tbaa !8
  %124 = sext i32 %123 to i64
  %125 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef %124)
  %126 = load i8, ptr %125, align 1, !tbaa !11
  %127 = sext i8 %126 to i32
  %128 = icmp eq i32 %127, 35
  br i1 %128, label %129, label %140

129:                                              ; preds = %122
  %130 = load i32, ptr %8, align 4, !tbaa !8
  %131 = add nsw i32 %130, 1
  %132 = sext i32 %131 to i64
  %133 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef %132)
  %134 = load i8, ptr %133, align 1, !tbaa !11
  %135 = sext i8 %134 to i32
  %136 = icmp eq i32 %135, 46
  br i1 %136, label %137, label %140

137:                                              ; preds = %129
  %138 = load i32, ptr %8, align 4, !tbaa !8
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %8, align 4, !tbaa !8
  br label %140

140:                                              ; preds = %137, %129, %122
  store i32 0, ptr %4, align 4, !tbaa !8
  %141 = load i32, ptr %2, align 4, !tbaa !8
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %2, align 4, !tbaa !8
  br label %143

143:                                              ; preds = %140, %121
  br label %144

144:                                              ; preds = %143, %99
  br label %145

145:                                              ; preds = %144, %98
  br label %146

146:                                              ; preds = %145
  %147 = load i32, ptr %8, align 4, !tbaa !8
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %8, align 4, !tbaa !8
  br label %45, !llvm.loop !16

149:                                              ; preds = %49
  %150 = load i8, ptr %7, align 1, !tbaa !14, !range !17, !noundef !18
  %151 = trunc i8 %150 to i1
  br i1 %151, label %152, label %154

152:                                              ; preds = %149
  %153 = load i32, ptr %2, align 4, !tbaa !8
  store i32 %153, ptr %5, align 4, !tbaa !8
  br label %154

154:                                              ; preds = %152, %149
  store i32 1, ptr %4, align 4, !tbaa !8
  store i32 0, ptr %2, align 4, !tbaa !8
  store i8 1, ptr %7, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !8
  br label %155

155:                                              ; preds = %256, %154
  %156 = load i32, ptr %9, align 4, !tbaa !8
  %157 = load i32, ptr %3, align 4, !tbaa !8
  %158 = icmp slt i32 %156, %157
  br i1 %158, label %160, label %159

159:                                              ; preds = %155
  store i32 7, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %259

160:                                              ; preds = %155
  %161 = load i32, ptr %4, align 4, !tbaa !8
  %162 = icmp ne i32 %161, 0
  br i1 %162, label %209, label %163

163:                                              ; preds = %160
  %164 = load i32, ptr %9, align 4, !tbaa !8
  %165 = sext i32 %164 to i64
  %166 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef %165)
  %167 = load i8, ptr %166, align 1, !tbaa !11
  %168 = sext i8 %167 to i32
  %169 = icmp eq i32 %168, 35
  br i1 %169, label %170, label %208

170:                                              ; preds = %163
  %171 = load i32, ptr %9, align 4, !tbaa !8
  %172 = sext i32 %171 to i64
  %173 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef %172)
  %174 = load i8, ptr %173, align 1, !tbaa !11
  %175 = sext i8 %174 to i32
  %176 = icmp eq i32 %175, 35
  br i1 %176, label %177, label %186

177:                                              ; preds = %170
  %178 = load i32, ptr %9, align 4, !tbaa !8
  %179 = add nsw i32 %178, 1
  %180 = sext i32 %179 to i64
  %181 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef %180)
  %182 = load i8, ptr %181, align 1, !tbaa !11
  %183 = sext i8 %182 to i32
  %184 = icmp eq i32 %183, 35
  br i1 %184, label %185, label %186

185:                                              ; preds = %177
  store i8 0, ptr %7, align 1, !tbaa !14
  br label %207

186:                                              ; preds = %177, %170
  %187 = load i32, ptr %9, align 4, !tbaa !8
  %188 = sext i32 %187 to i64
  %189 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef %188)
  %190 = load i8, ptr %189, align 1, !tbaa !11
  %191 = sext i8 %190 to i32
  %192 = icmp eq i32 %191, 35
  br i1 %192, label %193, label %204

193:                                              ; preds = %186
  %194 = load i32, ptr %9, align 4, !tbaa !8
  %195 = add nsw i32 %194, 1
  %196 = sext i32 %195 to i64
  %197 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef %196)
  %198 = load i8, ptr %197, align 1, !tbaa !11
  %199 = sext i8 %198 to i32
  %200 = icmp eq i32 %199, 46
  br i1 %200, label %201, label %204

201:                                              ; preds = %193
  %202 = load i32, ptr %9, align 4, !tbaa !8
  %203 = add nsw i32 %202, 1
  store i32 %203, ptr %9, align 4, !tbaa !8
  br label %204

204:                                              ; preds = %201, %193, %186
  store i32 1, ptr %4, align 4, !tbaa !8
  %205 = load i32, ptr %2, align 4, !tbaa !8
  %206 = add nsw i32 %205, 1
  store i32 %206, ptr %2, align 4, !tbaa !8
  br label %207

207:                                              ; preds = %204, %185
  br label %208

208:                                              ; preds = %207, %163
  br label %255

209:                                              ; preds = %160
  %210 = load i32, ptr %9, align 4, !tbaa !8
  %211 = sext i32 %210 to i64
  %212 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef %211)
  %213 = load i8, ptr %212, align 1, !tbaa !11
  %214 = sext i8 %213 to i32
  %215 = icmp eq i32 %214, 35
  br i1 %215, label %216, label %254

216:                                              ; preds = %209
  %217 = load i32, ptr %9, align 4, !tbaa !8
  %218 = sext i32 %217 to i64
  %219 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef %218)
  %220 = load i8, ptr %219, align 1, !tbaa !11
  %221 = sext i8 %220 to i32
  %222 = icmp eq i32 %221, 35
  br i1 %222, label %223, label %232

223:                                              ; preds = %216
  %224 = load i32, ptr %9, align 4, !tbaa !8
  %225 = add nsw i32 %224, 1
  %226 = sext i32 %225 to i64
  %227 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef %226)
  %228 = load i8, ptr %227, align 1, !tbaa !11
  %229 = sext i8 %228 to i32
  %230 = icmp eq i32 %229, 35
  br i1 %230, label %231, label %232

231:                                              ; preds = %223
  store i8 0, ptr %7, align 1, !tbaa !14
  br label %253

232:                                              ; preds = %223, %216
  %233 = load i32, ptr %9, align 4, !tbaa !8
  %234 = sext i32 %233 to i64
  %235 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef %234)
  %236 = load i8, ptr %235, align 1, !tbaa !11
  %237 = sext i8 %236 to i32
  %238 = icmp eq i32 %237, 35
  br i1 %238, label %239, label %250

239:                                              ; preds = %232
  %240 = load i32, ptr %9, align 4, !tbaa !8
  %241 = add nsw i32 %240, 1
  %242 = sext i32 %241 to i64
  %243 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef %242)
  %244 = load i8, ptr %243, align 1, !tbaa !11
  %245 = sext i8 %244 to i32
  %246 = icmp eq i32 %245, 46
  br i1 %246, label %247, label %250

247:                                              ; preds = %239
  %248 = load i32, ptr %9, align 4, !tbaa !8
  %249 = add nsw i32 %248, 1
  store i32 %249, ptr %9, align 4, !tbaa !8
  br label %250

250:                                              ; preds = %247, %239, %232
  store i32 0, ptr %4, align 4, !tbaa !8
  %251 = load i32, ptr %2, align 4, !tbaa !8
  %252 = add nsw i32 %251, 1
  store i32 %252, ptr %2, align 4, !tbaa !8
  br label %253

253:                                              ; preds = %250, %231
  br label %254

254:                                              ; preds = %253, %209
  br label %255

255:                                              ; preds = %254, %208
  br label %256

256:                                              ; preds = %255
  %257 = load i32, ptr %9, align 4, !tbaa !8
  %258 = add nsw i32 %257, 1
  store i32 %258, ptr %9, align 4, !tbaa !8
  br label %155, !llvm.loop !19

259:                                              ; preds = %159
  %260 = load i8, ptr %7, align 1, !tbaa !14, !range !17, !noundef !18
  %261 = trunc i8 %260 to i1
  br i1 %261, label %262, label %265

262:                                              ; preds = %259
  %263 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %264 = load i32, ptr %263, align 4, !tbaa !8
  store i32 %264, ptr %5, align 4, !tbaa !8
  br label %265

265:                                              ; preds = %262, %259
  %266 = load i32, ptr %5, align 4, !tbaa !8
  %267 = sitofp i32 %266 to double
  %268 = fcmp une double %267, 1.000000e+09
  br i1 %268, label %269, label %274

269:                                              ; preds = %265
  %270 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
  %271 = load i32, ptr %5, align 4, !tbaa !8
  %272 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %270, i32 noundef %271)
  %273 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %272, ptr noundef @.str.4)
  br label %276

274:                                              ; preds = %265
  %275 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  br label %276

276:                                              ; preds = %274, %269
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #7
  store i32 0, ptr %6, align 4
  br label %277

277:                                              ; preds = %276, %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %278 = load i32, ptr %6, align 4
  switch i32 %278, label %281 [
    i32 0, label %279
    i32 2, label %22
  ]

279:                                              ; preds = %277
  br label %22, !llvm.loop !12

280:                                              ; preds = %22
  ret i32 0

281:                                              ; preds = %277
  unreachable
}

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #6

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!10, !10, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !10, i64 0}
!16 = distinct !{!16, !13}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@t = external dso_local global i32, align 4
@_Z2s1B5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_Z2s2B5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %4 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %5 = getelementptr i8, ptr %4, i64 -24
  %6 = load i64, ptr %5, align 8
  %7 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %6
  %8 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %7, ptr noundef null)
  %9 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %10 = getelementptr i8, ptr %9, i64 -24
  %11 = load i64, ptr %10, align 8
  %12 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %11
  %13 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %12, ptr noundef null)
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @t)
  %15 = load i32, ptr @t, align 4, !tbaa !8
  %16 = add nsw i32 %15, -1
  store i32 %16, ptr @t, align 4, !tbaa !8
  %.not63 = icmp eq i32 %15, 0
  br i1 %.not63, label %._crit_edge66, label %.lr.ph65

.lr.ph65:                                         ; preds = %0, %163
  %17 = call 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) @_Z2s1B5cxx11)
  %18 = call 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) %17, ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  store i32 0, ptr %1, align 4, !tbaa !8
  %19 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11) #7
  %20 = trunc i64 %19 to i32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  store i32 1000000000, ptr %2, align 4, !tbaa !8
  %21 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i8 noundef signext 35)
  %22 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i8 noundef signext 35)
  %23 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef 0)
  %24 = load i8, ptr %23, align 1, !tbaa !11
  %25 = icmp eq i8 %24, 35
  br i1 %25, label %26, label %32

26:                                               ; preds = %.lr.ph65
  %27 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef 0)
  %28 = load i8, ptr %27, align 1, !tbaa !11
  %29 = icmp eq i8 %28, 35
  br i1 %29, label %30, label %32

30:                                               ; preds = %26
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  br label %163, !llvm.loop !12

32:                                               ; preds = %26, %.lr.ph65
  %33 = icmp sgt i32 %20, 0
  br i1 %33, label %.lr.ph, label %.critedge

._crit_edge:                                      ; preds = %89
  br i1 %.139, label %.critedge, label %93

.lr.ph:                                           ; preds = %32, %89
  %.03455 = phi i32 [ %90, %89 ], [ 0, %32 ]
  %.03854 = phi i1 [ %.139, %89 ], [ true, %32 ]
  %.04253 = phi i32 [ %.143, %89 ], [ 0, %32 ]
  %.not49 = icmp eq i32 %.04253, 0
  %34 = sext i32 %.03455 to i64
  br i1 %.not49, label %35, label %62

35:                                               ; preds = %.lr.ph
  %36 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef %34)
  %37 = load i8, ptr %36, align 1, !tbaa !11
  %38 = icmp eq i8 %37, 35
  br i1 %38, label %39, label %89

39:                                               ; preds = %35
  %40 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef %34)
  %41 = load i8, ptr %40, align 1, !tbaa !11
  %42 = icmp eq i8 %41, 35
  br i1 %42, label %43, label %49

43:                                               ; preds = %39
  %44 = add nsw i32 %.03455, 1
  %45 = sext i32 %44 to i64
  %46 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef %45)
  %47 = load i8, ptr %46, align 1, !tbaa !11
  %48 = icmp eq i8 %47, 35
  br i1 %48, label %89, label %49

49:                                               ; preds = %43, %39
  %50 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef %34)
  %51 = load i8, ptr %50, align 1, !tbaa !11
  %52 = icmp eq i8 %51, 35
  br i1 %52, label %53, label %59

53:                                               ; preds = %49
  %54 = add nsw i32 %.03455, 1
  %55 = sext i32 %54 to i64
  %56 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef %55)
  %57 = load i8, ptr %56, align 1, !tbaa !11
  %58 = icmp eq i8 %57, 46
  %spec.select = select i1 %58, i32 %54, i32 %.03455
  br label %59

59:                                               ; preds = %53, %49
  %.135 = phi i32 [ %.03455, %49 ], [ %spec.select, %53 ]
  %60 = load i32, ptr %1, align 4, !tbaa !8
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %1, align 4, !tbaa !8
  br label %89

62:                                               ; preds = %.lr.ph
  %63 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef %34)
  %64 = load i8, ptr %63, align 1, !tbaa !11
  %65 = icmp eq i8 %64, 35
  br i1 %65, label %66, label %89

66:                                               ; preds = %62
  %67 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef %34)
  %68 = load i8, ptr %67, align 1, !tbaa !11
  %69 = icmp eq i8 %68, 35
  br i1 %69, label %70, label %76

70:                                               ; preds = %66
  %71 = add nsw i32 %.03455, 1
  %72 = sext i32 %71 to i64
  %73 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef %72)
  %74 = load i8, ptr %73, align 1, !tbaa !11
  %75 = icmp eq i8 %74, 35
  br i1 %75, label %89, label %76

76:                                               ; preds = %70, %66
  %77 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef %34)
  %78 = load i8, ptr %77, align 1, !tbaa !11
  %79 = icmp eq i8 %78, 35
  br i1 %79, label %80, label %86

80:                                               ; preds = %76
  %81 = add nsw i32 %.03455, 1
  %82 = sext i32 %81 to i64
  %83 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef %82)
  %84 = load i8, ptr %83, align 1, !tbaa !11
  %85 = icmp eq i8 %84, 46
  %spec.select50 = select i1 %85, i32 %81, i32 %.03455
  br label %86

86:                                               ; preds = %80, %76
  %.236 = phi i32 [ %.03455, %76 ], [ %spec.select50, %80 ]
  %87 = load i32, ptr %1, align 4, !tbaa !8
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %1, align 4, !tbaa !8
  br label %89

89:                                               ; preds = %70, %43, %59, %35, %86, %62
  %.143 = phi i32 [ 0, %86 ], [ 1, %62 ], [ 1, %59 ], [ 0, %35 ], [ 0, %43 ], [ 1, %70 ]
  %.139 = phi i1 [ %.03854, %86 ], [ %.03854, %62 ], [ %.03854, %59 ], [ %.03854, %35 ], [ false, %43 ], [ false, %70 ]
  %.337 = phi i32 [ %.236, %86 ], [ %.03455, %62 ], [ %.135, %59 ], [ %.03455, %35 ], [ %.03455, %43 ], [ %.03455, %70 ]
  %90 = add nsw i32 %.337, 1
  %91 = icmp slt i32 %90, %20
  br i1 %91, label %.lr.ph, label %._crit_edge, !llvm.loop !14

.critedge:                                        ; preds = %32, %._crit_edge
  %92 = load i32, ptr %1, align 4, !tbaa !8
  store i32 %92, ptr %2, align 4, !tbaa !8
  br label %93

93:                                               ; preds = %.critedge, %._crit_edge
  store i32 0, ptr %1, align 4, !tbaa !8
  br i1 %33, label %.lr.ph60, label %.critedge67

._crit_edge61:                                    ; preds = %149
  br i1 %.341, label %.critedge67, label %thread-pre-split

.lr.ph60:                                         ; preds = %93, %149
  %.058 = phi i32 [ %150, %149 ], [ 0, %93 ]
  %.24057 = phi i1 [ %.341, %149 ], [ true, %93 ]
  %.24456 = phi i32 [ %.345, %149 ], [ 1, %93 ]
  %.not48 = icmp eq i32 %.24456, 0
  %94 = sext i32 %.058 to i64
  br i1 %.not48, label %95, label %122

95:                                               ; preds = %.lr.ph60
  %96 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef %94)
  %97 = load i8, ptr %96, align 1, !tbaa !11
  %98 = icmp eq i8 %97, 35
  br i1 %98, label %99, label %149

99:                                               ; preds = %95
  %100 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef %94)
  %101 = load i8, ptr %100, align 1, !tbaa !11
  %102 = icmp eq i8 %101, 35
  br i1 %102, label %103, label %109

103:                                              ; preds = %99
  %104 = add nsw i32 %.058, 1
  %105 = sext i32 %104 to i64
  %106 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef %105)
  %107 = load i8, ptr %106, align 1, !tbaa !11
  %108 = icmp eq i8 %107, 35
  br i1 %108, label %149, label %109

109:                                              ; preds = %103, %99
  %110 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef %94)
  %111 = load i8, ptr %110, align 1, !tbaa !11
  %112 = icmp eq i8 %111, 35
  br i1 %112, label %113, label %119

113:                                              ; preds = %109
  %114 = add nsw i32 %.058, 1
  %115 = sext i32 %114 to i64
  %116 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef %115)
  %117 = load i8, ptr %116, align 1, !tbaa !11
  %118 = icmp eq i8 %117, 46
  %spec.select51 = select i1 %118, i32 %114, i32 %.058
  br label %119

119:                                              ; preds = %113, %109
  %.1 = phi i32 [ %.058, %109 ], [ %spec.select51, %113 ]
  %120 = load i32, ptr %1, align 4, !tbaa !8
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %1, align 4, !tbaa !8
  br label %149

122:                                              ; preds = %.lr.ph60
  %123 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s2B5cxx11, i64 noundef %94)
  %124 = load i8, ptr %123, align 1, !tbaa !11
  %125 = icmp eq i8 %124, 35
  br i1 %125, label %126, label %149

126:                                              ; preds = %122
  %127 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef %94)
  %128 = load i8, ptr %127, align 1, !tbaa !11
  %129 = icmp eq i8 %128, 35
  br i1 %129, label %130, label %136

130:                                              ; preds = %126
  %131 = add nsw i32 %.058, 1
  %132 = sext i32 %131 to i64
  %133 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef %132)
  %134 = load i8, ptr %133, align 1, !tbaa !11
  %135 = icmp eq i8 %134, 35
  br i1 %135, label %149, label %136

136:                                              ; preds = %130, %126
  %137 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef %94)
  %138 = load i8, ptr %137, align 1, !tbaa !11
  %139 = icmp eq i8 %138, 35
  br i1 %139, label %140, label %146

140:                                              ; preds = %136
  %141 = add nsw i32 %.058, 1
  %142 = sext i32 %141 to i64
  %143 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z2s1B5cxx11, i64 noundef %142)
  %144 = load i8, ptr %143, align 1, !tbaa !11
  %145 = icmp eq i8 %144, 46
  %spec.select52 = select i1 %145, i32 %141, i32 %.058
  br label %146

146:                                              ; preds = %140, %136
  %.2 = phi i32 [ %.058, %136 ], [ %spec.select52, %140 ]
  %147 = load i32, ptr %1, align 4, !tbaa !8
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %1, align 4, !tbaa !8
  br label %149

149:                                              ; preds = %130, %103, %119, %95, %146, %122
  %.345 = phi i32 [ 0, %146 ], [ 1, %122 ], [ 1, %119 ], [ 0, %95 ], [ 0, %103 ], [ 1, %130 ]
  %.341 = phi i1 [ %.24057, %146 ], [ %.24057, %122 ], [ %.24057, %119 ], [ %.24057, %95 ], [ false, %103 ], [ false, %130 ]
  %.3 = phi i32 [ %.2, %146 ], [ %.058, %122 ], [ %.1, %119 ], [ %.058, %95 ], [ %.058, %103 ], [ %.058, %130 ]
  %150 = add nsw i32 %.3, 1
  %151 = icmp slt i32 %150, %20
  br i1 %151, label %.lr.ph60, label %._crit_edge61, !llvm.loop !15

.critedge67:                                      ; preds = %93, %._crit_edge61
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %153 = load i32, ptr %152, align 4, !tbaa !8
  store i32 %153, ptr %2, align 4, !tbaa !8
  br label %154

thread-pre-split:                                 ; preds = %._crit_edge61
  %.pr = load i32, ptr %2, align 4, !tbaa !8
  br label %154

154:                                              ; preds = %thread-pre-split, %.critedge67
  %155 = phi i32 [ %.pr, %thread-pre-split ], [ %153, %.critedge67 ]
  %.not47 = icmp eq i32 %155, 1000000000
  br i1 %.not47, label %161, label %156

156:                                              ; preds = %154
  %157 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.3)
  %158 = load i32, ptr %2, align 4, !tbaa !8
  %159 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %157, i32 noundef %158)
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %159, ptr noundef nonnull @.str.4)
  br label %163

161:                                              ; preds = %154
  %162 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  br label %163

163:                                              ; preds = %156, %161, %30
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %164 = load i32, ptr @t, align 4, !tbaa !8
  %165 = add nsw i32 %164, -1
  store i32 %165, ptr @t, align 4, !tbaa !8
  %.not = icmp eq i32 %164, 0
  br i1 %.not, label %._crit_edge66, label %.lr.ph65

._crit_edge66:                                    ; preds = %163, %0
  ret i32 0
}

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1

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

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

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


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