; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/77 Beta Division 1/Problem A (A)

; 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" }

@n = external dso_local global i32, align 4
@m = external dso_local global [100 x i32], align 16
@_Z1fB5cxx11 = external dso_local global [100 x %"class.std::__cxx11::basic_string"], align 16
@_Z1wB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_Z1oB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@c = external dso_local global i8, align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 {
  %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 i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %15 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %16 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %17 = getelementptr i8, ptr %16, i64 -24
  %18 = load i64, ptr %17, align 8
  %19 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %18
  %20 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %19, ptr noundef null)
  %21 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %22 = getelementptr i8, ptr %21, i64 -24
  %23 = load i64, ptr %22, align 8
  %24 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %23
  %25 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %24, ptr noundef null)
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !8
  br label %27

27:                                               ; preds = %78, %0
  %28 = load i32, ptr %2, align 4, !tbaa !8
  %29 = load i32, ptr @n, align 4, !tbaa !8
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %27
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %81

32:                                               ; preds = %27
  %33 = load i32, ptr %2, align 4, !tbaa !8
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z1fB5cxx11, i64 0, i64 %34
  %36 = 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) %35)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !8
  br label %37

37:                                               ; preds = %74, %32
  %38 = load i32, ptr %4, align 4, !tbaa !8
  %39 = sext i32 %38 to i64
  %40 = load i32, ptr %2, align 4, !tbaa !8
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z1fB5cxx11, i64 0, i64 %41
  %43 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %42) #7
  %44 = icmp ult i64 %39, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %37
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %77

46:                                               ; preds = %37
  %47 = load i32, ptr %2, align 4, !tbaa !8
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z1fB5cxx11, i64 0, i64 %48
  %50 = load i32, ptr %4, align 4, !tbaa !8
  %51 = sext i32 %50 to i64
  %52 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %49, i64 noundef %51)
  %53 = load i8, ptr %52, align 1, !tbaa !11
  %54 = sext i8 %53 to i32
  %55 = icmp sle i32 %54, 90
  br i1 %55, label %56, label %73

56:                                               ; preds = %46
  %57 = load i32, ptr %2, align 4, !tbaa !8
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z1fB5cxx11, i64 0, i64 %58
  %60 = load i32, ptr %4, align 4, !tbaa !8
  %61 = sext i32 %60 to i64
  %62 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %59, i64 noundef %61)
  %63 = load i8, ptr %62, align 1, !tbaa !11
  %64 = sext i8 %63 to i32
  %65 = add nsw i32 %64, 32
  %66 = trunc i32 %65 to i8
  %67 = load i32, ptr %2, align 4, !tbaa !8
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z1fB5cxx11, i64 0, i64 %68
  %70 = load i32, ptr %4, align 4, !tbaa !8
  %71 = sext i32 %70 to i64
  %72 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %69, i64 noundef %71)
  store i8 %66, ptr %72, align 1, !tbaa !11
  br label %73

73:                                               ; preds = %56, %46
  br label %74

74:                                               ; preds = %73
  %75 = load i32, ptr %4, align 4, !tbaa !8
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %4, align 4, !tbaa !8
  br label %37, !llvm.loop !12

77:                                               ; preds = %45
  br label %78

78:                                               ; preds = %77
  %79 = load i32, ptr %2, align 4, !tbaa !8
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %2, align 4, !tbaa !8
  br label %27, !llvm.loop !14

81:                                               ; preds = %31
  %82 = 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) @_Z1oB5cxx11)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !8
  br label %83

83:                                               ; preds = %112, %81
  %84 = load i32, ptr %5, align 4, !tbaa !8
  %85 = sext i32 %84 to i64
  %86 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1oB5cxx11) #7
  %87 = icmp ult i64 %85, %86
  br i1 %87, label %89, label %88

88:                                               ; preds = %83
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %115

89:                                               ; preds = %83
  %90 = load i32, ptr %5, align 4, !tbaa !8
  %91 = sext i32 %90 to i64
  %92 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1oB5cxx11, i64 noundef %91)
  %93 = load i8, ptr %92, align 1, !tbaa !11
  %94 = sext i8 %93 to i32
  %95 = icmp sle i32 %94, 90
  br i1 %95, label %96, label %105

96:                                               ; preds = %89
  %97 = load i32, ptr %5, align 4, !tbaa !8
  %98 = sext i32 %97 to i64
  %99 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1oB5cxx11, i64 noundef %98)
  %100 = load i8, ptr %99, align 1, !tbaa !11
  %101 = sext i8 %100 to i32
  %102 = add nsw i32 %101, 32
  %103 = trunc i32 %102 to i8
  %104 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11, i8 noundef signext %103)
  br label %111

105:                                              ; preds = %89
  %106 = load i32, ptr %5, align 4, !tbaa !8
  %107 = sext i32 %106 to i64
  %108 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1oB5cxx11, i64 noundef %107)
  %109 = load i8, ptr %108, align 1, !tbaa !11
  %110 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11, i8 noundef signext %109)
  br label %111

111:                                              ; preds = %105, %96
  br label %112

112:                                              ; preds = %111
  %113 = load i32, ptr %5, align 4, !tbaa !8
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %5, align 4, !tbaa !8
  br label %83, !llvm.loop !15

115:                                              ; preds = %88
  %116 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) @c)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !8
  br label %117

117:                                              ; preds = %175, %115
  %118 = load i32, ptr %6, align 4, !tbaa !8
  %119 = load i32, ptr @n, align 4, !tbaa !8
  %120 = icmp slt i32 %118, %119
  br i1 %120, label %122, label %121

121:                                              ; preds = %117
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %178

122:                                              ; preds = %117
  %123 = load i32, ptr %6, align 4, !tbaa !8
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z1fB5cxx11, i64 0, i64 %124
  %126 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %125) #7
  %127 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11) #7
  %128 = icmp ugt i64 %126, %127
  br i1 %128, label %129, label %130

129:                                              ; preds = %122
  br label %175

130:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %131 = load i32, ptr %6, align 4, !tbaa !8
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z1fB5cxx11, i64 0, i64 %132
  %134 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %133) #7
  %135 = trunc i64 %134 to i32
  store i32 %135, ptr %7, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %136 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11) #7
  %137 = trunc i64 %136 to i32
  store i32 %137, ptr %8, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !8
  br label %138

138:                                              ; preds = %171, %130
  %139 = load i32, ptr %9, align 4, !tbaa !8
  %140 = load i32, ptr %8, align 4, !tbaa !8
  %141 = load i32, ptr %7, align 4, !tbaa !8
  %142 = sub nsw i32 %140, %141
  %143 = icmp sle i32 %139, %142
  br i1 %143, label %145, label %144

144:                                              ; preds = %138
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %174

145:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #7
  %146 = load i32, ptr %9, align 4, !tbaa !8
  %147 = sext i32 %146 to i64
  %148 = load i32, ptr %7, align 4, !tbaa !8
  %149 = sext i32 %148 to i64
  call void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11, i64 noundef %147, i64 noundef %149)
  %150 = load i32, ptr %6, align 4, !tbaa !8
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z1fB5cxx11, i64 0, i64 %151
  %153 = call noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %152) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #7
  br i1 %153, label %154, label %170

154:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !8
  br label %155

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

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

160:                                              ; preds = %155
  %161 = load i32, ptr %9, align 4, !tbaa !8
  %162 = load i32, ptr %11, align 4, !tbaa !8
  %163 = add nsw i32 %161, %162
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [100 x i32], ptr @m, i64 0, i64 %164
  store i32 1, ptr %165, align 4, !tbaa !8
  br label %166

166:                                              ; preds = %160
  %167 = load i32, ptr %11, align 4, !tbaa !8
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %11, align 4, !tbaa !8
  br label %155, !llvm.loop !16

169:                                              ; preds = %159
  br label %170

170:                                              ; preds = %169, %145
  br label %171

171:                                              ; preds = %170
  %172 = load i32, ptr %9, align 4, !tbaa !8
  %173 = add nsw i32 %172, 1
  store i32 %173, ptr %9, align 4, !tbaa !8
  br label %138, !llvm.loop !17

174:                                              ; preds = %144
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %175

175:                                              ; preds = %174, %129
  %176 = load i32, ptr %6, align 4, !tbaa !8
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %6, align 4, !tbaa !8
  br label %117, !llvm.loop !18

178:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !8
  br label %179

179:                                              ; preds = %233, %178
  %180 = load i32, ptr %12, align 4, !tbaa !8
  %181 = sext i32 %180 to i64
  %182 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11) #7
  %183 = icmp ult i64 %181, %182
  br i1 %183, label %185, label %184

184:                                              ; preds = %179
  store i32 20, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %236

185:                                              ; preds = %179
  %186 = load i32, ptr %12, align 4, !tbaa !8
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [100 x i32], ptr @m, i64 0, i64 %187
  %189 = load i32, ptr %188, align 4, !tbaa !8
  %190 = icmp eq i32 %189, 1
  br i1 %190, label %191, label %232

191:                                              ; preds = %185
  %192 = load i32, ptr %12, align 4, !tbaa !8
  %193 = sext i32 %192 to i64
  %194 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11, i64 noundef %193)
  %195 = load i8, ptr %194, align 1, !tbaa !11
  %196 = sext i8 %195 to i32
  %197 = load i8, ptr @c, align 1, !tbaa !11
  %198 = sext i8 %197 to i32
  %199 = icmp ne i32 %196, %198
  br i1 %199, label %200, label %205

200:                                              ; preds = %191
  %201 = load i8, ptr @c, align 1, !tbaa !11
  %202 = load i32, ptr %12, align 4, !tbaa !8
  %203 = sext i32 %202 to i64
  %204 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11, i64 noundef %203)
  store i8 %201, ptr %204, align 1, !tbaa !11
  br label %231

205:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !8
  br label %206

206:                                              ; preds = %226, %205
  %207 = load i32, ptr %13, align 4, !tbaa !8
  %208 = icmp slt i32 %207, 26
  br i1 %208, label %210, label %209

209:                                              ; preds = %206
  store i32 23, ptr %3, align 4
  br label %229

210:                                              ; preds = %206
  %211 = load i32, ptr %13, align 4, !tbaa !8
  %212 = add nsw i32 %211, 97
  %213 = trunc i32 %212 to i8
  %214 = sext i8 %213 to i32
  %215 = load i8, ptr @c, align 1, !tbaa !11
  %216 = sext i8 %215 to i32
  %217 = icmp ne i32 %214, %216
  br i1 %217, label %218, label %225

218:                                              ; preds = %210
  %219 = load i32, ptr %13, align 4, !tbaa !8
  %220 = add nsw i32 %219, 97
  %221 = trunc i32 %220 to i8
  %222 = load i32, ptr %12, align 4, !tbaa !8
  %223 = sext i32 %222 to i64
  %224 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11, i64 noundef %223)
  store i8 %221, ptr %224, align 1, !tbaa !11
  store i32 23, ptr %3, align 4
  br label %229

225:                                              ; preds = %210
  br label %226

226:                                              ; preds = %225
  %227 = load i32, ptr %13, align 4, !tbaa !8
  %228 = add nsw i32 %227, 1
  store i32 %228, ptr %13, align 4, !tbaa !8
  br label %206, !llvm.loop !19

229:                                              ; preds = %218, %209
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %230

230:                                              ; preds = %229
  br label %231

231:                                              ; preds = %230, %200
  br label %232

232:                                              ; preds = %231, %185
  br label %233

233:                                              ; preds = %232
  %234 = load i32, ptr %12, align 4, !tbaa !8
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %12, align 4, !tbaa !8
  br label %179, !llvm.loop !20

236:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !8
  br label %237

237:                                              ; preds = %295, %236
  %238 = load i32, ptr %14, align 4, !tbaa !8
  %239 = sext i32 %238 to i64
  %240 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11) #7
  %241 = icmp ult i64 %239, %240
  br i1 %241, label %243, label %242

242:                                              ; preds = %237
  store i32 26, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %298

243:                                              ; preds = %237
  %244 = load i32, ptr %14, align 4, !tbaa !8
  %245 = sext i32 %244 to i64
  %246 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11, i64 noundef %245)
  %247 = load i8, ptr %246, align 1, !tbaa !11
  %248 = sext i8 %247 to i32
  %249 = icmp sle i32 %248, 90
  br i1 %249, label %250, label %268

250:                                              ; preds = %243
  %251 = load i32, ptr %14, align 4, !tbaa !8
  %252 = sext i32 %251 to i64
  %253 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1oB5cxx11, i64 noundef %252)
  %254 = load i8, ptr %253, align 1, !tbaa !11
  %255 = sext i8 %254 to i32
  %256 = icmp sge i32 %255, 97
  br i1 %256, label %257, label %268

257:                                              ; preds = %250
  %258 = load i32, ptr %14, align 4, !tbaa !8
  %259 = sext i32 %258 to i64
  %260 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11, i64 noundef %259)
  %261 = load i8, ptr %260, align 1, !tbaa !11
  %262 = sext i8 %261 to i32
  %263 = add nsw i32 %262, 32
  %264 = trunc i32 %263 to i8
  %265 = load i32, ptr %14, align 4, !tbaa !8
  %266 = sext i32 %265 to i64
  %267 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11, i64 noundef %266)
  store i8 %264, ptr %267, align 1, !tbaa !11
  br label %294

268:                                              ; preds = %250, %243
  %269 = load i32, ptr %14, align 4, !tbaa !8
  %270 = sext i32 %269 to i64
  %271 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11, i64 noundef %270)
  %272 = load i8, ptr %271, align 1, !tbaa !11
  %273 = sext i8 %272 to i32
  %274 = icmp sge i32 %273, 97
  br i1 %274, label %275, label %293

275:                                              ; preds = %268
  %276 = load i32, ptr %14, align 4, !tbaa !8
  %277 = sext i32 %276 to i64
  %278 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1oB5cxx11, i64 noundef %277)
  %279 = load i8, ptr %278, align 1, !tbaa !11
  %280 = sext i8 %279 to i32
  %281 = icmp sle i32 %280, 90
  br i1 %281, label %282, label %293

282:                                              ; preds = %275
  %283 = load i32, ptr %14, align 4, !tbaa !8
  %284 = sext i32 %283 to i64
  %285 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11, i64 noundef %284)
  %286 = load i8, ptr %285, align 1, !tbaa !11
  %287 = sext i8 %286 to i32
  %288 = sub nsw i32 %287, 32
  %289 = trunc i32 %288 to i8
  %290 = load i32, ptr %14, align 4, !tbaa !8
  %291 = sext i32 %290 to i64
  %292 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11, i64 noundef %291)
  store i8 %289, ptr %292, align 1, !tbaa !11
  br label %293

293:                                              ; preds = %282, %275, %268
  br label %294

294:                                              ; preds = %293, %257
  br label %295

295:                                              ; preds = %294
  %296 = load i32, ptr %14, align 4, !tbaa !8
  %297 = add nsw i32 %296, 1
  store i32 %297, ptr %14, align 4, !tbaa !8
  br label %237, !llvm.loop !21

298:                                              ; preds = %242
  %299 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11)
  %300 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %299, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #0 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)) #2

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

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

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

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

; 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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #6

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

attributes #0 = { 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 #1 = { 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 #2 = { "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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #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}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}
!19 = distinct !{!19, !13}
!20 = distinct !{!20, !13}
!21 = distinct !{!21, !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" }

@n = external dso_local global i32, align 4
@m = external dso_local local_unnamed_addr global [100 x i32], align 16
@_Z1fB5cxx11 = external dso_local global [100 x %"class.std::__cxx11::basic_string"], align 16
@_Z1wB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_Z1oB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@c = external dso_local global i8, align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  %2 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %3 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %4 = getelementptr i8, ptr %3, i64 -24
  %5 = load i64, ptr %4, align 8
  %6 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %5
  %7 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %6, ptr noundef null)
  %8 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %9 = getelementptr i8, ptr %8, i64 -24
  %10 = load i64, ptr %9, align 8
  %11 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %10
  %12 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %11, ptr noundef null)
  %13 = 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) @n)
  %14 = load i32, ptr @n, align 4, !tbaa !8
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.lr.ph75, label %._crit_edge76

._crit_edge76:                                    ; preds = %._crit_edge, %0
  %16 = tail 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) @_Z1oB5cxx11)
  %17 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1oB5cxx11) #7
  %.not98 = icmp eq i64 %17, 0
  br i1 %.not98, label %._crit_edge80, label %.lr.ph79

.lr.ph75:                                         ; preds = %0, %._crit_edge
  %indvars.iv104 = phi i64 [ %indvars.iv.next105, %._crit_edge ], [ 0, %0 ]
  %18 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z1fB5cxx11, i64 0, i64 %indvars.iv104
  %19 = tail 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) %18)
  %20 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  %.not97 = icmp eq i64 %20, 0
  br i1 %.not97, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %32, %.lr.ph75
  %indvars.iv.next105 = add nuw nsw i64 %indvars.iv104, 1
  %21 = load i32, ptr @n, align 4, !tbaa !8
  %22 = sext i32 %21 to i64
  %23 = icmp slt i64 %indvars.iv.next105, %22
  br i1 %23, label %.lr.ph75, label %._crit_edge76, !llvm.loop !11

.lr.ph:                                           ; preds = %.lr.ph75, %32
  %indvars.iv = phi i64 [ %indvars.iv.next, %32 ], [ 0, %.lr.ph75 ]
  %24 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %18, i64 noundef %indvars.iv)
  %25 = load i8, ptr %24, align 1, !tbaa !13
  %26 = icmp slt i8 %25, 91
  br i1 %26, label %27, label %32

27:                                               ; preds = %.lr.ph
  %28 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %18, i64 noundef %indvars.iv)
  %29 = load i8, ptr %28, align 1, !tbaa !13
  %30 = add i8 %29, 32
  %31 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %18, i64 noundef %indvars.iv)
  store i8 %30, ptr %31, align 1, !tbaa !13
  br label %32

32:                                               ; preds = %.lr.ph, %27
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %33 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  %34 = icmp ugt i64 %33, %indvars.iv.next
  br i1 %34, label %.lr.ph, label %._crit_edge, !llvm.loop !14

._crit_edge80:                                    ; preds = %.lr.ph79, %._crit_edge76
  %35 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) @c)
  %36 = load i32, ptr @n, align 4, !tbaa !8
  %37 = icmp sgt i32 %36, 0
  br i1 %37, label %.lr.ph90, label %.preheader68

.lr.ph79:                                         ; preds = %._crit_edge76, %.lr.ph79
  %indvars.iv107 = phi i64 [ %indvars.iv.next108, %.lr.ph79 ], [ 0, %._crit_edge76 ]
  %38 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1oB5cxx11, i64 noundef %indvars.iv107)
  %39 = load i8, ptr %38, align 1, !tbaa !13
  %40 = icmp slt i8 %39, 91
  %41 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1oB5cxx11, i64 noundef %indvars.iv107)
  %42 = load i8, ptr %41, align 1, !tbaa !13
  %43 = add i8 %42, 32
  %.sink = select i1 %40, i8 %43, i8 %42
  %44 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11, i8 noundef signext %.sink)
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %45 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1oB5cxx11) #7
  %46 = icmp ugt i64 %45, %indvars.iv.next108
  br i1 %46, label %.lr.ph79, label %._crit_edge80, !llvm.loop !15

.preheader68:                                     ; preds = %.loopexit71, %._crit_edge80
  %47 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11) #7
  %.not99 = icmp eq i64 %47, 0
  br i1 %.not99, label %.preheader, label %.lr.ph93

.lr.ph90:                                         ; preds = %._crit_edge80, %.loopexit71
  %indvars.iv123 = phi i64 [ %indvars.iv.next124, %.loopexit71 ], [ 0, %._crit_edge80 ]
  %48 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z1fB5cxx11, i64 0, i64 %indvars.iv123
  %49 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %48) #7
  %50 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11) #7
  %51 = icmp ugt i64 %49, %50
  br i1 %51, label %.loopexit71, label %52

52:                                               ; preds = %.lr.ph90
  %53 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %48) #7
  %54 = trunc i64 %53 to i32
  %55 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11) #7
  %56 = trunc i64 %55 to i32
  %.not6683 = icmp slt i32 %56, %54
  br i1 %.not6683, label %.loopexit71, label %.lr.ph87

.lr.ph87:                                         ; preds = %52
  %sext = shl i64 %53, 32
  %57 = ashr exact i64 %sext, 32
  %58 = icmp sgt i32 %54, 0
  %59 = add i64 %55, 1
  %60 = sub i64 %59, %53
  %wide.trip.count121 = and i64 %60, 4294967295
  br i1 %58, label %.lr.ph87.split.us.preheader, label %.lr.ph87.split

.lr.ph87.split.us.preheader:                      ; preds = %.lr.ph87
  %wide.trip.count116 = and i64 %53, 2147483647
  %min.iters.check = icmp ult i64 %wide.trip.count116, 8
  %n.mod.vf = and i64 %53, 7
  %n.vec = sub nsw i64 %wide.trip.count116, %n.mod.vf
  %cmp.n = icmp eq i64 %n.mod.vf, 0
  br label %.lr.ph87.split.us

.lr.ph87.split.us:                                ; preds = %.lr.ph87.split.us.preheader, %..loopexit70_crit_edge.us
  %indvars.iv118 = phi i64 [ 0, %.lr.ph87.split.us.preheader ], [ %indvars.iv.next119, %..loopexit70_crit_edge.us ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #7
  call void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %1, ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11, i64 noundef %indvars.iv118, i64 noundef %57)
  %61 = call noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %48) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #7
  br i1 %61, label %.preheader69.us.preheader, label %..loopexit70_crit_edge.us

.preheader69.us.preheader:                        ; preds = %.lr.ph87.split.us
  br i1 %min.iters.check, label %.preheader69.us.preheader141, label %vector.body

.preheader69.us.preheader141:                     ; preds = %middle.block, %.preheader69.us.preheader
  %indvars.iv113.ph = phi i64 [ 0, %.preheader69.us.preheader ], [ %n.vec, %middle.block ]
  br label %.preheader69.us

vector.body:                                      ; preds = %.preheader69.us.preheader, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.preheader69.us.preheader ]
  %62 = add nuw nsw i64 %index, %indvars.iv118
  %63 = getelementptr inbounds [100 x i32], ptr @m, i64 0, i64 %62
  %64 = getelementptr inbounds i8, ptr %63, i64 16
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %63, align 4, !tbaa !8
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %64, align 4, !tbaa !8
  %index.next = add nuw i64 %index, 8
  %65 = icmp eq i64 %index.next, %n.vec
  br i1 %65, label %middle.block, label %vector.body, !llvm.loop !16

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %..loopexit70_crit_edge.us, label %.preheader69.us.preheader141

..loopexit70_crit_edge.us:                        ; preds = %.preheader69.us, %middle.block, %.lr.ph87.split.us
  %indvars.iv.next119 = add nuw nsw i64 %indvars.iv118, 1
  %exitcond122.not = icmp eq i64 %indvars.iv.next119, %wide.trip.count121
  br i1 %exitcond122.not, label %.loopexit71, label %.lr.ph87.split.us, !llvm.loop !19

.preheader69.us:                                  ; preds = %.preheader69.us.preheader141, %.preheader69.us
  %indvars.iv113 = phi i64 [ %indvars.iv.next114, %.preheader69.us ], [ %indvars.iv113.ph, %.preheader69.us.preheader141 ]
  %66 = add nuw nsw i64 %indvars.iv113, %indvars.iv118
  %67 = getelementptr inbounds [100 x i32], ptr @m, i64 0, i64 %66
  store i32 1, ptr %67, align 4, !tbaa !8
  %indvars.iv.next114 = add nuw nsw i64 %indvars.iv113, 1
  %exitcond117.not = icmp eq i64 %indvars.iv.next114, %wide.trip.count116
  br i1 %exitcond117.not, label %..loopexit70_crit_edge.us, label %.preheader69.us, !llvm.loop !20

.lr.ph87.split:                                   ; preds = %.lr.ph87, %.lr.ph87.split
  %indvars.iv110 = phi i64 [ %indvars.iv.next111, %.lr.ph87.split ], [ 0, %.lr.ph87 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #7
  call void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %1, ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11, i64 noundef %indvars.iv110, i64 noundef %57)
  %68 = call noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %48) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #7
  %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next111, %wide.trip.count121
  br i1 %exitcond.not, label %.loopexit71, label %.lr.ph87.split, !llvm.loop !19

.loopexit71:                                      ; preds = %.lr.ph87.split, %..loopexit70_crit_edge.us, %52, %.lr.ph90
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1
  %69 = load i32, ptr @n, align 4, !tbaa !8
  %70 = sext i32 %69 to i64
  %71 = icmp slt i64 %indvars.iv.next124, %70
  br i1 %71, label %.lr.ph90, label %.preheader68, !llvm.loop !21

.preheader:                                       ; preds = %.loopexit, %.preheader68
  %72 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11) #7
  %.not100 = icmp eq i64 %72, 0
  br i1 %.not100, label %._crit_edge96, label %.lr.ph95

.lr.ph93:                                         ; preds = %.preheader68, %.loopexit
  %indvars.iv127 = phi i64 [ %indvars.iv.next128, %.loopexit ], [ 0, %.preheader68 ]
  %73 = getelementptr inbounds [100 x i32], ptr @m, i64 0, i64 %indvars.iv127
  %74 = load i32, ptr %73, align 4, !tbaa !8
  %75 = icmp eq i32 %74, 1
  br i1 %75, label %.loopexit.sink.split, label %.loopexit

.loopexit.sink.split:                             ; preds = %.lr.ph93
  %76 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11, i64 noundef %indvars.iv127)
  %77 = load i8, ptr %76, align 1, !tbaa !13
  %78 = load i8, ptr @c, align 1, !tbaa !13
  %.not = icmp eq i8 %77, %78
  %.not65 = icmp eq i8 %77, 97
  %spec.select = select i1 %.not65, i8 98, i8 97
  %spec.select.sink = select i1 %.not, i8 %spec.select, i8 %78
  %79 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11, i64 noundef %indvars.iv127)
  store i8 %spec.select.sink, ptr %79, align 1, !tbaa !13
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.sink.split, %.lr.ph93
  %indvars.iv.next128 = add nuw nsw i64 %indvars.iv127, 1
  %80 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11) #7
  %81 = icmp ugt i64 %80, %indvars.iv.next128
  br i1 %81, label %.lr.ph93, label %.preheader, !llvm.loop !22

._crit_edge96:                                    ; preds = %103, %.preheader
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11)
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %82, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

.lr.ph95:                                         ; preds = %.preheader, %103
  %indvars.iv130 = phi i64 [ %indvars.iv.next131, %103 ], [ 0, %.preheader ]
  %84 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11, i64 noundef %indvars.iv130)
  %85 = load i8, ptr %84, align 1, !tbaa !13
  %86 = icmp slt i8 %85, 91
  br i1 %86, label %87, label %91

87:                                               ; preds = %.lr.ph95
  %88 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1oB5cxx11, i64 noundef %indvars.iv130)
  %89 = load i8, ptr %88, align 1, !tbaa !13
  %90 = icmp sgt i8 %89, 96
  br i1 %90, label %.sink.split, label %91

91:                                               ; preds = %87, %.lr.ph95
  %92 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11, i64 noundef %indvars.iv130)
  %93 = load i8, ptr %92, align 1, !tbaa !13
  %94 = icmp sgt i8 %93, 96
  br i1 %94, label %95, label %103

95:                                               ; preds = %91
  %96 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1oB5cxx11, i64 noundef %indvars.iv130)
  %97 = load i8, ptr %96, align 1, !tbaa !13
  %98 = icmp slt i8 %97, 91
  br i1 %98, label %.sink.split, label %103

.sink.split:                                      ; preds = %95, %87
  %.sink138 = phi i8 [ 32, %87 ], [ -32, %95 ]
  %99 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11, i64 noundef %indvars.iv130)
  %100 = load i8, ptr %99, align 1, !tbaa !13
  %101 = add i8 %100, %.sink138
  %102 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11, i64 noundef %indvars.iv130)
  store i8 %101, ptr %102, align 1, !tbaa !13
  br label %103

103:                                              ; preds = %.sink.split, %95, %91
  %indvars.iv.next131 = add nuw nsw i64 %indvars.iv130, 1
  %104 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1wB5cxx11) #7
  %105 = icmp ugt i64 %104, %indvars.iv.next131
  br i1 %105, label %.lr.ph95, label %._crit_edge96, !llvm.loop !23
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #0 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 #2

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

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

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

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

; Function Attrs: mustprogress 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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

attributes #0 = { 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 #1 = { 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 #2 = { "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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!10, !10, i64 0}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12, !17, !18}
!17 = !{!"llvm.loop.isvectorized", i32 1}
!18 = !{!"llvm.loop.unroll.runtime.disable"}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12, !18, !17}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass