; LLVM IR from VastoLorde95/Competitive-Programming :: Hackerrank/Company Contests/Morgan Stanley/Morgan Stanley 2015/Problem B (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
@cnt = external dso_local global [26 x i32], align 16
@cost = external dso_local global i32, align 4
@_Z1aB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_Z1bB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@x = external dso_local global i32, align 4
@y = external dso_local global i32, align 4
@z = external dso_local global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = 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 i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %23 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %24 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %25 = getelementptr i8, ptr %24, i64 -24
  %26 = load i64, ptr %25, align 8
  %27 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %26
  %28 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %27, ptr noundef null)
  %29 = load ptr, ptr @_ZSt4cerr, align 8, !tbaa !5
  %30 = getelementptr i8, ptr %29, i64 -24
  %31 = load i64, ptr %30, align 8
  %32 = getelementptr inbounds i8, ptr @_ZSt4cerr, i64 %31
  %33 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %32, ptr noundef null)
  %34 = 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 %35

35:                                               ; preds = %343, %0
  %36 = load i32, ptr @t, align 4, !tbaa !8
  %37 = add nsw i32 %36, -1
  store i32 %37, ptr @t, align 4, !tbaa !8
  %38 = icmp ne i32 %36, 0
  br i1 %38, label %39, label %347

39:                                               ; preds = %35
  %40 = 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) @_Z1bB5cxx11)
  %41 = 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) %40, ptr noundef nonnull align 8 dereferenceable(32) @_Z1aB5cxx11)
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @x)
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %42, ptr noundef nonnull align 4 dereferenceable(4) @y)
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 4 dereferenceable(4) @z)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  %45 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1aB5cxx11) #8
  %46 = trunc i64 %45 to i32
  store i32 %46, ptr %2, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  %47 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1bB5cxx11) #8
  %48 = trunc i64 %47 to i32
  store i32 %48, ptr %3, align 4, !tbaa !8
  store i32 0, ptr @cost, align 4, !tbaa !8
  call void @llvm.memset.p0.i64(ptr align 16 @cnt, i8 0, i64 104, i1 false)
  %49 = load i32, ptr %2, align 4, !tbaa !8
  %50 = load i32, ptr %3, align 4, !tbaa !8
  %51 = icmp eq i32 %49, %50
  br i1 %51, label %52, label %123

52:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 0, ptr %4, align 4, !tbaa !8
  br label %53

53:                                               ; preds = %69, %52
  %54 = load i32, ptr %4, align 4, !tbaa !8
  %55 = load i32, ptr %2, align 4, !tbaa !8
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  br label %72

58:                                               ; preds = %53
  %59 = load i32, ptr %4, align 4, !tbaa !8
  %60 = sext i32 %59 to i64
  %61 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1aB5cxx11, i64 noundef %60)
  %62 = load i8, ptr %61, align 1, !tbaa !11
  %63 = sext i8 %62 to i32
  %64 = sub nsw i32 %63, 97
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !8
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %66, align 4, !tbaa !8
  br label %69

69:                                               ; preds = %58
  %70 = load i32, ptr %4, align 4, !tbaa !8
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %4, align 4, !tbaa !8
  br label %53, !llvm.loop !12

72:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !8
  br label %73

73:                                               ; preds = %89, %72
  %74 = load i32, ptr %5, align 4, !tbaa !8
  %75 = load i32, ptr %3, align 4, !tbaa !8
  %76 = icmp slt i32 %74, %75
  br i1 %76, label %78, label %77

77:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %92

78:                                               ; preds = %73
  %79 = load i32, ptr %5, align 4, !tbaa !8
  %80 = sext i32 %79 to i64
  %81 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1bB5cxx11, i64 noundef %80)
  %82 = load i8, ptr %81, align 1, !tbaa !11
  %83 = sext i8 %82 to i32
  %84 = sub nsw i32 %83, 97
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !8
  %88 = add nsw i32 %87, -1
  store i32 %88, ptr %86, align 4, !tbaa !8
  br label %89

89:                                               ; preds = %78
  %90 = load i32, ptr %5, align 4, !tbaa !8
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %5, align 4, !tbaa !8
  br label %73, !llvm.loop !14

92:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %93 = load i32, ptr @x, align 4, !tbaa !8
  %94 = load i32, ptr @y, align 4, !tbaa !8
  %95 = add nsw i32 %93, %94
  store i32 %95, ptr %7, align 4, !tbaa !8
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) @z)
  %97 = load i32, ptr %96, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  store i32 %97, ptr %6, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !8
  br label %98

98:                                               ; preds = %119, %92
  %99 = load i32, ptr %8, align 4, !tbaa !8
  %100 = icmp slt i32 %99, 26
  br i1 %100, label %102, label %101

101:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %122

102:                                              ; preds = %98
  %103 = load i32, ptr %8, align 4, !tbaa !8
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %104
  %106 = load i32, ptr %105, align 4, !tbaa !8
  %107 = icmp sgt i32 %106, 0
  br i1 %107, label %108, label %118

108:                                              ; preds = %102
  %109 = load i32, ptr %6, align 4, !tbaa !8
  %110 = load i32, ptr %8, align 4, !tbaa !8
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !8
  %114 = call i32 @llvm.abs.i32(i32 %113, i1 true)
  %115 = mul nsw i32 %109, %114
  %116 = load i32, ptr @cost, align 4, !tbaa !8
  %117 = add nsw i32 %116, %115
  store i32 %117, ptr @cost, align 4, !tbaa !8
  br label %118

118:                                              ; preds = %108, %102
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %8, align 4, !tbaa !8
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %8, align 4, !tbaa !8
  br label %98, !llvm.loop !15

122:                                              ; preds = %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %343

123:                                              ; preds = %39
  %124 = load i32, ptr %3, align 4, !tbaa !8
  %125 = load i32, ptr %2, align 4, !tbaa !8
  %126 = icmp slt i32 %124, %125
  br i1 %126, label %127, label %232

127:                                              ; preds = %123
  %128 = load i32, ptr @y, align 4, !tbaa !8
  %129 = load i32, ptr %2, align 4, !tbaa !8
  %130 = load i32, ptr %3, align 4, !tbaa !8
  %131 = sub nsw i32 %129, %130
  %132 = mul nsw i32 %128, %131
  %133 = load i32, ptr @cost, align 4, !tbaa !8
  %134 = add nsw i32 %133, %132
  store i32 %134, ptr @cost, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %135 = load i32, ptr %2, align 4, !tbaa !8
  %136 = load i32, ptr %3, align 4, !tbaa !8
  %137 = sub nsw i32 %135, %136
  store i32 %137, ptr %9, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 0, ptr %10, align 4, !tbaa !8
  br label %138

138:                                              ; preds = %154, %127
  %139 = load i32, ptr %10, align 4, !tbaa !8
  %140 = load i32, ptr %2, align 4, !tbaa !8
  %141 = icmp slt i32 %139, %140
  br i1 %141, label %143, label %142

142:                                              ; preds = %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %157

143:                                              ; preds = %138
  %144 = load i32, ptr %10, align 4, !tbaa !8
  %145 = sext i32 %144 to i64
  %146 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1aB5cxx11, i64 noundef %145)
  %147 = load i8, ptr %146, align 1, !tbaa !11
  %148 = sext i8 %147 to i32
  %149 = sub nsw i32 %148, 97
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %150
  %152 = load i32, ptr %151, align 4, !tbaa !8
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %151, align 4, !tbaa !8
  br label %154

154:                                              ; preds = %143
  %155 = load i32, ptr %10, align 4, !tbaa !8
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %10, align 4, !tbaa !8
  br label %138, !llvm.loop !16

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

158:                                              ; preds = %174, %157
  %159 = load i32, ptr %11, align 4, !tbaa !8
  %160 = load i32, ptr %3, align 4, !tbaa !8
  %161 = icmp slt i32 %159, %160
  br i1 %161, label %163, label %162

162:                                              ; preds = %158
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %177

163:                                              ; preds = %158
  %164 = load i32, ptr %11, 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) @_Z1bB5cxx11, i64 noundef %165)
  %167 = load i8, ptr %166, align 1, !tbaa !11
  %168 = sext i8 %167 to i32
  %169 = sub nsw i32 %168, 97
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %170
  %172 = load i32, ptr %171, align 4, !tbaa !8
  %173 = add nsw i32 %172, -1
  store i32 %173, ptr %171, align 4, !tbaa !8
  br label %174

174:                                              ; preds = %163
  %175 = load i32, ptr %11, align 4, !tbaa !8
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %11, align 4, !tbaa !8
  br label %158, !llvm.loop !17

177:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %178 = load i32, ptr @x, align 4, !tbaa !8
  %179 = load i32, ptr @y, align 4, !tbaa !8
  %180 = add nsw i32 %178, %179
  store i32 %180, ptr %13, align 4, !tbaa !8
  %181 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) @z)
  %182 = load i32, ptr %181, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  store i32 %182, ptr %12, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 0, ptr %14, align 4, !tbaa !8
  br label %183

183:                                              ; preds = %228, %177
  %184 = load i32, ptr %14, align 4, !tbaa !8
  %185 = icmp slt i32 %184, 26
  br i1 %185, label %187, label %186

186:                                              ; preds = %183
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %231

187:                                              ; preds = %183
  %188 = load i32, ptr %9, align 4, !tbaa !8
  %189 = icmp sgt i32 %188, 0
  br i1 %189, label %190, label %211

190:                                              ; preds = %187
  %191 = load i32, ptr %14, align 4, !tbaa !8
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %192
  %194 = load i32, ptr %193, align 4, !tbaa !8
  %195 = icmp sgt i32 %194, 0
  br i1 %195, label %196, label %211

196:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %197 = load i32, ptr %14, align 4, !tbaa !8
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %198
  %200 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %199, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %201 = load i32, ptr %200, align 4, !tbaa !8
  store i32 %201, ptr %15, align 4, !tbaa !8
  %202 = load i32, ptr %15, align 4, !tbaa !8
  %203 = load i32, ptr %14, align 4, !tbaa !8
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %204
  %206 = load i32, ptr %205, align 4, !tbaa !8
  %207 = sub nsw i32 %206, %202
  store i32 %207, ptr %205, align 4, !tbaa !8
  %208 = load i32, ptr %15, align 4, !tbaa !8
  %209 = load i32, ptr %9, align 4, !tbaa !8
  %210 = sub nsw i32 %209, %208
  store i32 %210, ptr %9, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %211

211:                                              ; preds = %196, %190, %187
  %212 = load i32, ptr %14, align 4, !tbaa !8
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %213
  %215 = load i32, ptr %214, align 4, !tbaa !8
  %216 = icmp sgt i32 %215, 0
  br i1 %216, label %217, label %227

217:                                              ; preds = %211
  %218 = load i32, ptr %12, align 4, !tbaa !8
  %219 = load i32, ptr %14, align 4, !tbaa !8
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %220
  %222 = load i32, ptr %221, align 4, !tbaa !8
  %223 = call i32 @llvm.abs.i32(i32 %222, i1 true)
  %224 = mul nsw i32 %218, %223
  %225 = load i32, ptr @cost, align 4, !tbaa !8
  %226 = add nsw i32 %225, %224
  store i32 %226, ptr @cost, align 4, !tbaa !8
  br label %227

227:                                              ; preds = %217, %211
  br label %228

228:                                              ; preds = %227
  %229 = load i32, ptr %14, align 4, !tbaa !8
  %230 = add nsw i32 %229, 1
  store i32 %230, ptr %14, align 4, !tbaa !8
  br label %183, !llvm.loop !18

231:                                              ; preds = %186
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %342

232:                                              ; preds = %123
  %233 = load i32, ptr %3, align 4, !tbaa !8
  %234 = load i32, ptr %2, align 4, !tbaa !8
  %235 = icmp sgt i32 %233, %234
  br i1 %235, label %236, label %341

236:                                              ; preds = %232
  %237 = load i32, ptr @x, align 4, !tbaa !8
  %238 = load i32, ptr %3, align 4, !tbaa !8
  %239 = load i32, ptr %2, align 4, !tbaa !8
  %240 = sub nsw i32 %238, %239
  %241 = mul nsw i32 %237, %240
  %242 = load i32, ptr @cost, align 4, !tbaa !8
  %243 = add nsw i32 %242, %241
  store i32 %243, ptr @cost, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %244 = load i32, ptr %3, align 4, !tbaa !8
  %245 = load i32, ptr %2, align 4, !tbaa !8
  %246 = sub nsw i32 %244, %245
  store i32 %246, ptr %16, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 0, ptr %17, align 4, !tbaa !8
  br label %247

247:                                              ; preds = %263, %236
  %248 = load i32, ptr %17, align 4, !tbaa !8
  %249 = load i32, ptr %2, align 4, !tbaa !8
  %250 = icmp slt i32 %248, %249
  br i1 %250, label %252, label %251

251:                                              ; preds = %247
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %266

252:                                              ; preds = %247
  %253 = load i32, ptr %17, align 4, !tbaa !8
  %254 = sext i32 %253 to i64
  %255 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1aB5cxx11, i64 noundef %254)
  %256 = load i8, ptr %255, align 1, !tbaa !11
  %257 = sext i8 %256 to i32
  %258 = sub nsw i32 %257, 97
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %259
  %261 = load i32, ptr %260, align 4, !tbaa !8
  %262 = add nsw i32 %261, 1
  store i32 %262, ptr %260, align 4, !tbaa !8
  br label %263

263:                                              ; preds = %252
  %264 = load i32, ptr %17, align 4, !tbaa !8
  %265 = add nsw i32 %264, 1
  store i32 %265, ptr %17, align 4, !tbaa !8
  br label %247, !llvm.loop !19

266:                                              ; preds = %251
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 0, ptr %18, align 4, !tbaa !8
  br label %267

267:                                              ; preds = %283, %266
  %268 = load i32, ptr %18, align 4, !tbaa !8
  %269 = load i32, ptr %3, align 4, !tbaa !8
  %270 = icmp slt i32 %268, %269
  br i1 %270, label %272, label %271

271:                                              ; preds = %267
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %286

272:                                              ; preds = %267
  %273 = load i32, ptr %18, align 4, !tbaa !8
  %274 = sext i32 %273 to i64
  %275 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1bB5cxx11, i64 noundef %274)
  %276 = load i8, ptr %275, align 1, !tbaa !11
  %277 = sext i8 %276 to i32
  %278 = sub nsw i32 %277, 97
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %279
  %281 = load i32, ptr %280, align 4, !tbaa !8
  %282 = add nsw i32 %281, -1
  store i32 %282, ptr %280, align 4, !tbaa !8
  br label %283

283:                                              ; preds = %272
  %284 = load i32, ptr %18, align 4, !tbaa !8
  %285 = add nsw i32 %284, 1
  store i32 %285, ptr %18, align 4, !tbaa !8
  br label %267, !llvm.loop !20

286:                                              ; preds = %271
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %287 = load i32, ptr @x, align 4, !tbaa !8
  %288 = load i32, ptr @y, align 4, !tbaa !8
  %289 = add nsw i32 %287, %288
  store i32 %289, ptr %20, align 4, !tbaa !8
  %290 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) @z)
  %291 = load i32, ptr %290, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  store i32 %291, ptr %19, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !8
  br label %292

292:                                              ; preds = %337, %286
  %293 = load i32, ptr %21, align 4, !tbaa !8
  %294 = icmp slt i32 %293, 26
  br i1 %294, label %296, label %295

295:                                              ; preds = %292
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %340

296:                                              ; preds = %292
  %297 = load i32, ptr %16, align 4, !tbaa !8
  %298 = icmp sgt i32 %297, 0
  br i1 %298, label %299, label %320

299:                                              ; preds = %296
  %300 = load i32, ptr %21, align 4, !tbaa !8
  %301 = sext i32 %300 to i64
  %302 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %301
  %303 = load i32, ptr %302, align 4, !tbaa !8
  %304 = icmp slt i32 %303, 0
  br i1 %304, label %305, label %320

305:                                              ; preds = %299
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %306 = load i32, ptr %21, align 4, !tbaa !8
  %307 = sext i32 %306 to i64
  %308 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %307
  %309 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %308, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %310 = load i32, ptr %309, align 4, !tbaa !8
  store i32 %310, ptr %22, align 4, !tbaa !8
  %311 = load i32, ptr %22, align 4, !tbaa !8
  %312 = load i32, ptr %21, align 4, !tbaa !8
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %313
  %315 = load i32, ptr %314, align 4, !tbaa !8
  %316 = add nsw i32 %315, %311
  store i32 %316, ptr %314, align 4, !tbaa !8
  %317 = load i32, ptr %22, align 4, !tbaa !8
  %318 = load i32, ptr %16, align 4, !tbaa !8
  %319 = sub nsw i32 %318, %317
  store i32 %319, ptr %16, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %320

320:                                              ; preds = %305, %299, %296
  %321 = load i32, ptr %21, align 4, !tbaa !8
  %322 = sext i32 %321 to i64
  %323 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %322
  %324 = load i32, ptr %323, align 4, !tbaa !8
  %325 = icmp sgt i32 %324, 0
  br i1 %325, label %326, label %336

326:                                              ; preds = %320
  %327 = load i32, ptr %19, align 4, !tbaa !8
  %328 = load i32, ptr %21, align 4, !tbaa !8
  %329 = sext i32 %328 to i64
  %330 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %329
  %331 = load i32, ptr %330, align 4, !tbaa !8
  %332 = call i32 @llvm.abs.i32(i32 %331, i1 true)
  %333 = mul nsw i32 %327, %332
  %334 = load i32, ptr @cost, align 4, !tbaa !8
  %335 = add nsw i32 %334, %333
  store i32 %335, ptr @cost, align 4, !tbaa !8
  br label %336

336:                                              ; preds = %326, %320
  br label %337

337:                                              ; preds = %336
  %338 = load i32, ptr %21, align 4, !tbaa !8
  %339 = add nsw i32 %338, 1
  store i32 %339, ptr %21, align 4, !tbaa !8
  br label %292, !llvm.loop !21

340:                                              ; preds = %295
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %341

341:                                              ; preds = %340, %232
  br label %342

342:                                              ; preds = %341, %231
  br label %343

343:                                              ; preds = %342, %122
  %344 = load i32, ptr @cost, align 4, !tbaa !8
  %345 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %344)
  %346 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %345, ptr noundef @.str)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %35, !llvm.loop !22

347:                                              ; preds = %35
  ret i32 0
}

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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; 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: 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)) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #6

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

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 #8 = { 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}
!22 = distinct !{!22, !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
@cnt = external dso_local global [26 x i32], align 16
@cost = external dso_local local_unnamed_addr global i32, align 4
@_Z1aB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_Z1bB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@x = external dso_local global i32, align 4
@y = external dso_local global i32, align 4
@z = external dso_local global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = 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 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %7 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %9
  %11 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  %12 = load ptr, ptr @_ZSt4cerr, align 8, !tbaa !5
  %13 = getelementptr i8, ptr %12, i64 -24
  %14 = load i64, ptr %13, align 8
  %15 = getelementptr inbounds i8, ptr @_ZSt4cerr, i64 %14
  %16 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %15, ptr noundef null)
  %17 = 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)
  %18 = load i32, ptr @t, align 4, !tbaa !8
  %19 = add nsw i32 %18, -1
  store i32 %19, ptr @t, align 4, !tbaa !8
  %.not97 = icmp eq i32 %18, 0
  br i1 %.not97, label %._crit_edge100, label %.lr.ph99

.lr.ph99:                                         ; preds = %0, %.loopexit
  %20 = 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) @_Z1bB5cxx11)
  %21 = 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) %20, ptr noundef nonnull align 8 dereferenceable(32) @_Z1aB5cxx11)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @x)
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(4) @y)
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 4 dereferenceable(4) @z)
  %25 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1aB5cxx11) #7
  %26 = trunc i64 %25 to i32
  %27 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1bB5cxx11) #7
  %28 = trunc i64 %27 to i32
  store i32 0, ptr @cost, align 4, !tbaa !8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(104) @cnt, i8 0, i64 104, i1 false)
  %29 = icmp eq i32 %26, %28
  br i1 %29, label %.preheader77, label %230

.preheader77:                                     ; preds = %.lr.ph99
  %30 = icmp sgt i32 %26, 0
  br i1 %30, label %.lr.ph92.preheader, label %._crit_edge95

.lr.ph92.preheader:                               ; preds = %.preheader77
  %wide.trip.count128 = and i64 %25, 2147483647
  br label %.lr.ph92

.preheader:                                       ; preds = %.lr.ph92
  br i1 %30, label %.lr.ph94.preheader, label %._crit_edge95

.lr.ph94.preheader:                               ; preds = %.preheader
  %wide.trip.count133 = and i64 %25, 2147483647
  br label %.lr.ph94

.lr.ph92:                                         ; preds = %.lr.ph92.preheader, %.lr.ph92
  %indvars.iv125 = phi i64 [ 0, %.lr.ph92.preheader ], [ %indvars.iv.next126, %.lr.ph92 ]
  %31 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1aB5cxx11, i64 noundef %indvars.iv125)
  %32 = load i8, ptr %31, align 1, !tbaa !11
  %33 = sext i8 %32 to i64
  %34 = add nsw i64 %33, -97
  %35 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !8
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %35, align 4, !tbaa !8
  %indvars.iv.next126 = add nuw nsw i64 %indvars.iv125, 1
  %exitcond129.not = icmp eq i64 %indvars.iv.next126, %wide.trip.count128
  br i1 %exitcond129.not, label %.preheader, label %.lr.ph92, !llvm.loop !12

._crit_edge95:                                    ; preds = %.lr.ph94, %.preheader77, %.preheader
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %38 = load i32, ptr @x, align 4, !tbaa !8
  %39 = load i32, ptr @y, align 4, !tbaa !8
  %40 = add nsw i32 %39, %38
  store i32 %40, ptr %1, align 4, !tbaa !8
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) @z)
  %42 = load i32, ptr %41, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %cost.promoted = load i32, ptr @cost, align 4, !tbaa !8
  %43 = load i32, ptr @cnt, align 16, !tbaa !8
  %44 = icmp sgt i32 %43, 0
  br i1 %44, label %52, label %55

.lr.ph94:                                         ; preds = %.lr.ph94.preheader, %.lr.ph94
  %indvars.iv130 = phi i64 [ 0, %.lr.ph94.preheader ], [ %indvars.iv.next131, %.lr.ph94 ]
  %45 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1bB5cxx11, i64 noundef %indvars.iv130)
  %46 = load i8, ptr %45, align 1, !tbaa !11
  %47 = sext i8 %46 to i64
  %48 = add nsw i64 %47, -97
  %49 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !8
  %51 = add nsw i32 %50, -1
  store i32 %51, ptr %49, align 4, !tbaa !8
  %indvars.iv.next131 = add nuw nsw i64 %indvars.iv130, 1
  %exitcond134.not = icmp eq i64 %indvars.iv.next131, %wide.trip.count133
  br i1 %exitcond134.not, label %._crit_edge95, label %.lr.ph94, !llvm.loop !14

52:                                               ; preds = %._crit_edge95
  %53 = mul nsw i32 %43, %42
  %54 = add nsw i32 %cost.promoted, %53
  store i32 %54, ptr @cost, align 4, !tbaa !8
  br label %55

55:                                               ; preds = %._crit_edge95, %52
  %56 = phi i32 [ %cost.promoted, %._crit_edge95 ], [ %54, %52 ]
  %57 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 4), align 4, !tbaa !8
  %58 = icmp sgt i32 %57, 0
  br i1 %58, label %59, label %62

59:                                               ; preds = %55
  %60 = mul nsw i32 %57, %42
  %61 = add nsw i32 %56, %60
  store i32 %61, ptr @cost, align 4, !tbaa !8
  br label %62

62:                                               ; preds = %59, %55
  %63 = phi i32 [ %56, %55 ], [ %61, %59 ]
  %64 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 8), align 8, !tbaa !8
  %65 = icmp sgt i32 %64, 0
  br i1 %65, label %66, label %69

66:                                               ; preds = %62
  %67 = mul nsw i32 %64, %42
  %68 = add nsw i32 %63, %67
  store i32 %68, ptr @cost, align 4, !tbaa !8
  br label %69

69:                                               ; preds = %66, %62
  %70 = phi i32 [ %63, %62 ], [ %68, %66 ]
  %71 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 12), align 4, !tbaa !8
  %72 = icmp sgt i32 %71, 0
  br i1 %72, label %73, label %76

73:                                               ; preds = %69
  %74 = mul nsw i32 %71, %42
  %75 = add nsw i32 %70, %74
  store i32 %75, ptr @cost, align 4, !tbaa !8
  br label %76

76:                                               ; preds = %73, %69
  %77 = phi i32 [ %70, %69 ], [ %75, %73 ]
  %78 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 16), align 16, !tbaa !8
  %79 = icmp sgt i32 %78, 0
  br i1 %79, label %80, label %83

80:                                               ; preds = %76
  %81 = mul nsw i32 %78, %42
  %82 = add nsw i32 %77, %81
  store i32 %82, ptr @cost, align 4, !tbaa !8
  br label %83

83:                                               ; preds = %80, %76
  %84 = phi i32 [ %77, %76 ], [ %82, %80 ]
  %85 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 20), align 4, !tbaa !8
  %86 = icmp sgt i32 %85, 0
  br i1 %86, label %87, label %90

87:                                               ; preds = %83
  %88 = mul nsw i32 %85, %42
  %89 = add nsw i32 %84, %88
  store i32 %89, ptr @cost, align 4, !tbaa !8
  br label %90

90:                                               ; preds = %87, %83
  %91 = phi i32 [ %84, %83 ], [ %89, %87 ]
  %92 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 24), align 8, !tbaa !8
  %93 = icmp sgt i32 %92, 0
  br i1 %93, label %94, label %97

94:                                               ; preds = %90
  %95 = mul nsw i32 %92, %42
  %96 = add nsw i32 %91, %95
  store i32 %96, ptr @cost, align 4, !tbaa !8
  br label %97

97:                                               ; preds = %94, %90
  %98 = phi i32 [ %91, %90 ], [ %96, %94 ]
  %99 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 28), align 4, !tbaa !8
  %100 = icmp sgt i32 %99, 0
  br i1 %100, label %101, label %104

101:                                              ; preds = %97
  %102 = mul nsw i32 %99, %42
  %103 = add nsw i32 %98, %102
  store i32 %103, ptr @cost, align 4, !tbaa !8
  br label %104

104:                                              ; preds = %101, %97
  %105 = phi i32 [ %98, %97 ], [ %103, %101 ]
  %106 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 32), align 16, !tbaa !8
  %107 = icmp sgt i32 %106, 0
  br i1 %107, label %108, label %111

108:                                              ; preds = %104
  %109 = mul nsw i32 %106, %42
  %110 = add nsw i32 %105, %109
  store i32 %110, ptr @cost, align 4, !tbaa !8
  br label %111

111:                                              ; preds = %108, %104
  %112 = phi i32 [ %105, %104 ], [ %110, %108 ]
  %113 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 36), align 4, !tbaa !8
  %114 = icmp sgt i32 %113, 0
  br i1 %114, label %115, label %118

115:                                              ; preds = %111
  %116 = mul nsw i32 %113, %42
  %117 = add nsw i32 %112, %116
  store i32 %117, ptr @cost, align 4, !tbaa !8
  br label %118

118:                                              ; preds = %115, %111
  %119 = phi i32 [ %112, %111 ], [ %117, %115 ]
  %120 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 40), align 8, !tbaa !8
  %121 = icmp sgt i32 %120, 0
  br i1 %121, label %122, label %125

122:                                              ; preds = %118
  %123 = mul nsw i32 %120, %42
  %124 = add nsw i32 %119, %123
  store i32 %124, ptr @cost, align 4, !tbaa !8
  br label %125

125:                                              ; preds = %122, %118
  %126 = phi i32 [ %119, %118 ], [ %124, %122 ]
  %127 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 44), align 4, !tbaa !8
  %128 = icmp sgt i32 %127, 0
  br i1 %128, label %129, label %132

129:                                              ; preds = %125
  %130 = mul nsw i32 %127, %42
  %131 = add nsw i32 %126, %130
  store i32 %131, ptr @cost, align 4, !tbaa !8
  br label %132

132:                                              ; preds = %129, %125
  %133 = phi i32 [ %126, %125 ], [ %131, %129 ]
  %134 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 48), align 16, !tbaa !8
  %135 = icmp sgt i32 %134, 0
  br i1 %135, label %136, label %139

136:                                              ; preds = %132
  %137 = mul nsw i32 %134, %42
  %138 = add nsw i32 %133, %137
  store i32 %138, ptr @cost, align 4, !tbaa !8
  br label %139

139:                                              ; preds = %136, %132
  %140 = phi i32 [ %133, %132 ], [ %138, %136 ]
  %141 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 52), align 4, !tbaa !8
  %142 = icmp sgt i32 %141, 0
  br i1 %142, label %143, label %146

143:                                              ; preds = %139
  %144 = mul nsw i32 %141, %42
  %145 = add nsw i32 %140, %144
  store i32 %145, ptr @cost, align 4, !tbaa !8
  br label %146

146:                                              ; preds = %143, %139
  %147 = phi i32 [ %140, %139 ], [ %145, %143 ]
  %148 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 56), align 8, !tbaa !8
  %149 = icmp sgt i32 %148, 0
  br i1 %149, label %150, label %153

150:                                              ; preds = %146
  %151 = mul nsw i32 %148, %42
  %152 = add nsw i32 %147, %151
  store i32 %152, ptr @cost, align 4, !tbaa !8
  br label %153

153:                                              ; preds = %150, %146
  %154 = phi i32 [ %147, %146 ], [ %152, %150 ]
  %155 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 60), align 4, !tbaa !8
  %156 = icmp sgt i32 %155, 0
  br i1 %156, label %157, label %160

157:                                              ; preds = %153
  %158 = mul nsw i32 %155, %42
  %159 = add nsw i32 %154, %158
  store i32 %159, ptr @cost, align 4, !tbaa !8
  br label %160

160:                                              ; preds = %157, %153
  %161 = phi i32 [ %154, %153 ], [ %159, %157 ]
  %162 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 64), align 16, !tbaa !8
  %163 = icmp sgt i32 %162, 0
  br i1 %163, label %164, label %167

164:                                              ; preds = %160
  %165 = mul nsw i32 %162, %42
  %166 = add nsw i32 %161, %165
  store i32 %166, ptr @cost, align 4, !tbaa !8
  br label %167

167:                                              ; preds = %164, %160
  %168 = phi i32 [ %161, %160 ], [ %166, %164 ]
  %169 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 68), align 4, !tbaa !8
  %170 = icmp sgt i32 %169, 0
  br i1 %170, label %171, label %174

171:                                              ; preds = %167
  %172 = mul nsw i32 %169, %42
  %173 = add nsw i32 %168, %172
  store i32 %173, ptr @cost, align 4, !tbaa !8
  br label %174

174:                                              ; preds = %171, %167
  %175 = phi i32 [ %168, %167 ], [ %173, %171 ]
  %176 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 72), align 8, !tbaa !8
  %177 = icmp sgt i32 %176, 0
  br i1 %177, label %178, label %181

178:                                              ; preds = %174
  %179 = mul nsw i32 %176, %42
  %180 = add nsw i32 %175, %179
  store i32 %180, ptr @cost, align 4, !tbaa !8
  br label %181

181:                                              ; preds = %178, %174
  %182 = phi i32 [ %175, %174 ], [ %180, %178 ]
  %183 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 76), align 4, !tbaa !8
  %184 = icmp sgt i32 %183, 0
  br i1 %184, label %185, label %188

185:                                              ; preds = %181
  %186 = mul nsw i32 %183, %42
  %187 = add nsw i32 %182, %186
  store i32 %187, ptr @cost, align 4, !tbaa !8
  br label %188

188:                                              ; preds = %185, %181
  %189 = phi i32 [ %182, %181 ], [ %187, %185 ]
  %190 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 80), align 16, !tbaa !8
  %191 = icmp sgt i32 %190, 0
  br i1 %191, label %192, label %195

192:                                              ; preds = %188
  %193 = mul nsw i32 %190, %42
  %194 = add nsw i32 %189, %193
  store i32 %194, ptr @cost, align 4, !tbaa !8
  br label %195

195:                                              ; preds = %192, %188
  %196 = phi i32 [ %189, %188 ], [ %194, %192 ]
  %197 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 84), align 4, !tbaa !8
  %198 = icmp sgt i32 %197, 0
  br i1 %198, label %199, label %202

199:                                              ; preds = %195
  %200 = mul nsw i32 %197, %42
  %201 = add nsw i32 %196, %200
  store i32 %201, ptr @cost, align 4, !tbaa !8
  br label %202

202:                                              ; preds = %199, %195
  %203 = phi i32 [ %196, %195 ], [ %201, %199 ]
  %204 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 88), align 8, !tbaa !8
  %205 = icmp sgt i32 %204, 0
  br i1 %205, label %206, label %209

206:                                              ; preds = %202
  %207 = mul nsw i32 %204, %42
  %208 = add nsw i32 %203, %207
  store i32 %208, ptr @cost, align 4, !tbaa !8
  br label %209

209:                                              ; preds = %206, %202
  %210 = phi i32 [ %203, %202 ], [ %208, %206 ]
  %211 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 92), align 4, !tbaa !8
  %212 = icmp sgt i32 %211, 0
  br i1 %212, label %213, label %216

213:                                              ; preds = %209
  %214 = mul nsw i32 %211, %42
  %215 = add nsw i32 %210, %214
  store i32 %215, ptr @cost, align 4, !tbaa !8
  br label %216

216:                                              ; preds = %213, %209
  %217 = phi i32 [ %210, %209 ], [ %215, %213 ]
  %218 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 96), align 16, !tbaa !8
  %219 = icmp sgt i32 %218, 0
  br i1 %219, label %220, label %223

220:                                              ; preds = %216
  %221 = mul nsw i32 %218, %42
  %222 = add nsw i32 %217, %221
  store i32 %222, ptr @cost, align 4, !tbaa !8
  br label %223

223:                                              ; preds = %220, %216
  %224 = phi i32 [ %217, %216 ], [ %222, %220 ]
  %225 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 100), align 4, !tbaa !8
  %226 = icmp sgt i32 %225, 0
  br i1 %226, label %227, label %.loopexit

227:                                              ; preds = %223
  %228 = mul nsw i32 %225, %42
  %229 = add nsw i32 %224, %228
  store i32 %229, ptr @cost, align 4, !tbaa !8
  br label %.loopexit

230:                                              ; preds = %.lr.ph99
  %231 = icmp slt i32 %28, %26
  br i1 %231, label %232, label %280

232:                                              ; preds = %230
  %233 = load i32, ptr @y, align 4, !tbaa !8
  %234 = sub nsw i32 %26, %28
  %235 = mul nsw i32 %233, %234
  store i32 %235, ptr @cost, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  store i32 %234, ptr %2, align 4, !tbaa !8
  %236 = icmp sgt i32 %26, 0
  br i1 %236, label %.lr.ph86.preheader, label %.preheader78

.lr.ph86.preheader:                               ; preds = %232
  %wide.trip.count114 = and i64 %25, 2147483647
  br label %.lr.ph86

.preheader78:                                     ; preds = %.lr.ph86, %232
  %237 = icmp sgt i32 %28, 0
  br i1 %237, label %.lr.ph88.preheader, label %._crit_edge89

.lr.ph88.preheader:                               ; preds = %.preheader78
  %wide.trip.count119 = and i64 %27, 2147483647
  br label %.lr.ph88

.lr.ph86:                                         ; preds = %.lr.ph86.preheader, %.lr.ph86
  %indvars.iv111 = phi i64 [ 0, %.lr.ph86.preheader ], [ %indvars.iv.next112, %.lr.ph86 ]
  %238 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1aB5cxx11, i64 noundef %indvars.iv111)
  %239 = load i8, ptr %238, align 1, !tbaa !11
  %240 = sext i8 %239 to i64
  %241 = add nsw i64 %240, -97
  %242 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %241
  %243 = load i32, ptr %242, align 4, !tbaa !8
  %244 = add nsw i32 %243, 1
  store i32 %244, ptr %242, align 4, !tbaa !8
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %exitcond115.not = icmp eq i64 %indvars.iv.next112, %wide.trip.count114
  br i1 %exitcond115.not, label %.preheader78, label %.lr.ph86, !llvm.loop !15

._crit_edge89:                                    ; preds = %.lr.ph88, %.preheader78
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %245 = load i32, ptr @x, align 4, !tbaa !8
  %246 = load i32, ptr @y, align 4, !tbaa !8
  %247 = add nsw i32 %246, %245
  store i32 %247, ptr %3, align 4, !tbaa !8
  %248 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) @z)
  %249 = load i32, ptr %248, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  %.pre141 = load i32, ptr %2, align 4, !tbaa !8
  br label %258

.lr.ph88:                                         ; preds = %.lr.ph88.preheader, %.lr.ph88
  %indvars.iv116 = phi i64 [ 0, %.lr.ph88.preheader ], [ %indvars.iv.next117, %.lr.ph88 ]
  %250 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1bB5cxx11, i64 noundef %indvars.iv116)
  %251 = load i8, ptr %250, align 1, !tbaa !11
  %252 = sext i8 %251 to i64
  %253 = add nsw i64 %252, -97
  %254 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %253
  %255 = load i32, ptr %254, align 4, !tbaa !8
  %256 = add nsw i32 %255, -1
  store i32 %256, ptr %254, align 4, !tbaa !8
  %indvars.iv.next117 = add nuw nsw i64 %indvars.iv116, 1
  %exitcond120.not = icmp eq i64 %indvars.iv.next117, %wide.trip.count119
  br i1 %exitcond120.not, label %._crit_edge89, label %.lr.ph88, !llvm.loop !16

257:                                              ; preds = %.thread
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  br label %.loopexit

258:                                              ; preds = %._crit_edge89, %.thread
  %259 = phi i32 [ %.pre141, %._crit_edge89 ], [ %279, %.thread ]
  %indvars.iv121 = phi i64 [ 0, %._crit_edge89 ], [ %indvars.iv.next122, %.thread ]
  %260 = icmp sgt i32 %259, 0
  %261 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %indvars.iv121
  %262 = load i32, ptr %261, align 4, !tbaa !8
  br i1 %260, label %263, label %._crit_edge142

263:                                              ; preds = %258
  %264 = icmp sgt i32 %262, 0
  br i1 %264, label %265, label %.thread

265:                                              ; preds = %263
  %266 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %261, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %267 = load i32, ptr %266, align 4, !tbaa !8
  %268 = load i32, ptr %261, align 4, !tbaa !8
  %269 = sub nsw i32 %268, %267
  store i32 %269, ptr %261, align 4, !tbaa !8
  %270 = load i32, ptr %2, align 4, !tbaa !8
  %271 = sub nsw i32 %270, %267
  store i32 %271, ptr %2, align 4, !tbaa !8
  br label %._crit_edge142

._crit_edge142:                                   ; preds = %258, %265
  %272 = phi i32 [ %269, %265 ], [ %262, %258 ]
  %273 = phi i32 [ %271, %265 ], [ %259, %258 ]
  %274 = icmp sgt i32 %272, 0
  br i1 %274, label %275, label %.thread

275:                                              ; preds = %._crit_edge142
  %276 = mul nsw i32 %272, %249
  %277 = load i32, ptr @cost, align 4, !tbaa !8
  %278 = add nsw i32 %277, %276
  store i32 %278, ptr @cost, align 4, !tbaa !8
  br label %.thread

.thread:                                          ; preds = %263, %._crit_edge142, %275
  %279 = phi i32 [ %273, %._crit_edge142 ], [ %273, %275 ], [ %259, %263 ]
  %indvars.iv.next122 = add nuw nsw i64 %indvars.iv121, 1
  %exitcond124.not = icmp eq i64 %indvars.iv.next122, 26
  br i1 %exitcond124.not, label %257, label %258, !llvm.loop !17

280:                                              ; preds = %230
  %281 = icmp sgt i32 %28, %26
  br i1 %281, label %282, label %.loopexit

282:                                              ; preds = %280
  %283 = load i32, ptr @x, align 4, !tbaa !8
  %284 = sub nsw i32 %28, %26
  %285 = mul nsw i32 %283, %284
  store i32 %285, ptr @cost, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 %284, ptr %4, align 4, !tbaa !8
  %286 = icmp sgt i32 %26, 0
  br i1 %286, label %.lr.ph.preheader, label %.preheader79

.lr.ph.preheader:                                 ; preds = %282
  %wide.trip.count = and i64 %25, 2147483647
  br label %.lr.ph

.preheader79:                                     ; preds = %.lr.ph, %282
  %287 = icmp sgt i32 %28, 0
  br i1 %287, label %.lr.ph82.preheader, label %._crit_edge

.lr.ph82.preheader:                               ; preds = %.preheader79
  %wide.trip.count105 = and i64 %27, 2147483647
  br label %.lr.ph82

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %288 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1aB5cxx11, i64 noundef %indvars.iv)
  %289 = load i8, ptr %288, align 1, !tbaa !11
  %290 = sext i8 %289 to i64
  %291 = add nsw i64 %290, -97
  %292 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %291
  %293 = load i32, ptr %292, align 4, !tbaa !8
  %294 = add nsw i32 %293, 1
  store i32 %294, ptr %292, align 4, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader79, label %.lr.ph, !llvm.loop !18

._crit_edge:                                      ; preds = %.lr.ph82, %.preheader79
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  %295 = load i32, ptr @x, align 4, !tbaa !8
  %296 = load i32, ptr @y, align 4, !tbaa !8
  %297 = add nsw i32 %296, %295
  store i32 %297, ptr %5, align 4, !tbaa !8
  %298 = 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) @z)
  %299 = load i32, ptr %298, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  %.pre = load i32, ptr %4, align 4, !tbaa !8
  br label %308

.lr.ph82:                                         ; preds = %.lr.ph82.preheader, %.lr.ph82
  %indvars.iv102 = phi i64 [ 0, %.lr.ph82.preheader ], [ %indvars.iv.next103, %.lr.ph82 ]
  %300 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1bB5cxx11, i64 noundef %indvars.iv102)
  %301 = load i8, ptr %300, align 1, !tbaa !11
  %302 = sext i8 %301 to i64
  %303 = add nsw i64 %302, -97
  %304 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %303
  %305 = load i32, ptr %304, align 4, !tbaa !8
  %306 = add nsw i32 %305, -1
  store i32 %306, ptr %304, align 4, !tbaa !8
  %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
  %exitcond106.not = icmp eq i64 %indvars.iv.next103, %wide.trip.count105
  br i1 %exitcond106.not, label %._crit_edge, label %.lr.ph82, !llvm.loop !19

307:                                              ; preds = %328
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  br label %.loopexit

308:                                              ; preds = %._crit_edge, %328
  %309 = phi i32 [ %.pre, %._crit_edge ], [ %322, %328 ]
  %indvars.iv107 = phi i64 [ 0, %._crit_edge ], [ %indvars.iv.next108, %328 ]
  %310 = icmp sgt i32 %309, 0
  %311 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %indvars.iv107
  %312 = load i32, ptr %311, align 4, !tbaa !8
  %313 = icmp slt i32 %312, 0
  %or.cond = select i1 %310, i1 %313, i1 false
  br i1 %or.cond, label %314, label %._crit_edge139

314:                                              ; preds = %308
  %315 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %311, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %316 = load i32, ptr %315, align 4, !tbaa !8
  %317 = load i32, ptr %311, align 4, !tbaa !8
  %318 = add nsw i32 %317, %316
  store i32 %318, ptr %311, align 4, !tbaa !8
  %319 = load i32, ptr %4, align 4, !tbaa !8
  %320 = sub nsw i32 %319, %316
  store i32 %320, ptr %4, align 4, !tbaa !8
  br label %._crit_edge139

._crit_edge139:                                   ; preds = %308, %314
  %321 = phi i32 [ %318, %314 ], [ %312, %308 ]
  %322 = phi i32 [ %320, %314 ], [ %309, %308 ]
  %323 = icmp sgt i32 %321, 0
  br i1 %323, label %324, label %328

324:                                              ; preds = %._crit_edge139
  %325 = mul nsw i32 %321, %299
  %326 = load i32, ptr @cost, align 4, !tbaa !8
  %327 = add nsw i32 %326, %325
  store i32 %327, ptr @cost, align 4, !tbaa !8
  br label %328

328:                                              ; preds = %._crit_edge139, %324
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %exitcond110.not = icmp eq i64 %indvars.iv.next108, 26
  br i1 %exitcond110.not, label %307, label %308, !llvm.loop !20

.loopexit:                                        ; preds = %223, %227, %257, %307, %280
  %329 = load i32, ptr @cost, align 4, !tbaa !8
  %330 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %329)
  %331 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %330, ptr noundef nonnull @.str)
  %332 = load i32, ptr @t, align 4, !tbaa !8
  %333 = add nsw i32 %332, -1
  store i32 %333, ptr @t, align 4, !tbaa !8
  %.not = icmp eq i32 %332, 0
  br i1 %.not, label %._crit_edge100, label %.lr.ph99, !llvm.loop !21

._crit_edge100:                                   ; preds = %.loopexit, %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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; 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: 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 #5

; 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 #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 nocallback nofree nounwind willreturn memory(argmem: write) }
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}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass