; LLVM IR from eyangch/competitive-programming :: Codeforces/1144 (e)

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

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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

28:                                               ; preds = %0
  %29 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %30 unwind label %50

30:                                               ; preds = %28
  %31 = load i32, ptr %2, align 4, !tbaa !8
  %32 = zext i32 %31 to i64
  %33 = call ptr @llvm.stacksave.p0()
  store ptr %33, ptr %7, align 8
  %34 = alloca i32, i64 %32, align 16
  store i64 %32, ptr %8, align 8
  %35 = load i32, ptr %2, align 4, !tbaa !8
  %36 = zext i32 %35 to i64
  %37 = alloca i32, i64 %36, align 16
  store i64 %36, ptr %9, align 8
  %38 = load i32, ptr %2, align 4, !tbaa !8
  %39 = add nsw i32 %38, 1
  %40 = zext i32 %39 to i64
  %41 = alloca i32, i64 %40, align 16
  store i64 %40, ptr %10, align 8
  %42 = load i32, ptr %2, align 4, !tbaa !8
  %43 = zext i32 %42 to i64
  %44 = alloca i32, i64 %43, align 16
  store i64 %43, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !8
  br label %45

45:                                               ; preds = %81, %30
  %46 = load i32, ptr %12, align 4, !tbaa !8
  %47 = load i32, ptr %2, align 4, !tbaa !8
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %54, label %49

49:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %88

50:                                               ; preds = %28, %0
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %5, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %6, align 4
  br label %186

54:                                               ; preds = %45
  %55 = load i32, ptr %2, align 4, !tbaa !8
  %56 = load i32, ptr %12, align 4, !tbaa !8
  %57 = sub nsw i32 %55, %56
  %58 = sub nsw i32 %57, 1
  %59 = sext i32 %58 to i64
  %60 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %59)
          to label %61 unwind label %84

61:                                               ; preds = %54
  %62 = load i8, ptr %60, align 1, !tbaa !11
  %63 = sext i8 %62 to i32
  %64 = sub nsw i32 %63, 97
  %65 = load i32, ptr %12, align 4, !tbaa !8
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds i32, ptr %34, i64 %66
  store i32 %64, ptr %67, align 4, !tbaa !8
  %68 = load i32, ptr %2, align 4, !tbaa !8
  %69 = load i32, ptr %12, align 4, !tbaa !8
  %70 = sub nsw i32 %68, %69
  %71 = sub nsw i32 %70, 1
  %72 = sext i32 %71 to i64
  %73 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %72)
          to label %74 unwind label %84

74:                                               ; preds = %61
  %75 = load i8, ptr %73, align 1, !tbaa !11
  %76 = sext i8 %75 to i32
  %77 = sub nsw i32 %76, 97
  %78 = load i32, ptr %12, align 4, !tbaa !8
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds i32, ptr %37, i64 %79
  store i32 %77, ptr %80, align 4, !tbaa !8
  br label %81

81:                                               ; preds = %74
  %82 = load i32, ptr %12, align 4, !tbaa !8
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %12, align 4, !tbaa !8
  br label %45, !llvm.loop !12

84:                                               ; preds = %61, %54
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %5, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %186

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

89:                                               ; preds = %117, %88
  %90 = load i32, ptr %14, align 4, !tbaa !8
  %91 = load i32, ptr %2, align 4, !tbaa !8
  %92 = icmp slt i32 %90, %91
  br i1 %92, label %94, label %93

93:                                               ; preds = %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %120

94:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %95 = load i32, ptr %14, align 4, !tbaa !8
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds i32, ptr %34, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !8
  %99 = load i32, ptr %14, align 4, !tbaa !8
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds i32, ptr %37, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !8
  %103 = add nsw i32 %98, %102
  %104 = load i32, ptr %13, align 4, !tbaa !8
  %105 = add nsw i32 %103, %104
  store i32 %105, ptr %15, align 4, !tbaa !8
  %106 = load i32, ptr %15, align 4, !tbaa !8
  %107 = icmp sgt i32 %106, 25
  br i1 %107, label %108, label %111

108:                                              ; preds = %94
  %109 = load i32, ptr %15, align 4, !tbaa !8
  %110 = sub nsw i32 %109, 26
  store i32 %110, ptr %15, align 4, !tbaa !8
  store i32 1, ptr %13, align 4, !tbaa !8
  br label %112

111:                                              ; preds = %94
  store i32 0, ptr %13, align 4, !tbaa !8
  br label %112

112:                                              ; preds = %111, %108
  %113 = load i32, ptr %15, align 4, !tbaa !8
  %114 = load i32, ptr %14, align 4, !tbaa !8
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds i32, ptr %41, i64 %115
  store i32 %113, ptr %116, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %117

117:                                              ; preds = %112
  %118 = load i32, ptr %14, align 4, !tbaa !8
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %14, align 4, !tbaa !8
  br label %89, !llvm.loop !14

120:                                              ; preds = %93
  %121 = load i32, ptr %13, align 4, !tbaa !8
  %122 = load i32, ptr %2, align 4, !tbaa !8
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds i32, ptr %41, i64 %123
  store i32 %121, ptr %124, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %125 = load i32, ptr %2, align 4, !tbaa !8
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds i32, ptr %41, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !8
  store i32 %128, ptr %16, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %129 = load i32, ptr %2, align 4, !tbaa !8
  %130 = sub nsw i32 %129, 1
  store i32 %130, ptr %17, align 4, !tbaa !8
  br label %131

131:                                              ; preds = %150, %120
  %132 = load i32, ptr %17, align 4, !tbaa !8
  %133 = icmp sge i32 %132, 0
  br i1 %133, label %135, label %134

134:                                              ; preds = %131
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %153

135:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %136 = load i32, ptr %17, align 4, !tbaa !8
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds i32, ptr %41, i64 %137
  %139 = load i32, ptr %138, align 4, !tbaa !8
  %140 = load i32, ptr %16, align 4, !tbaa !8
  %141 = mul nsw i32 26, %140
  %142 = add nsw i32 %139, %141
  store i32 %142, ptr %18, align 4, !tbaa !8
  %143 = load i32, ptr %18, align 4, !tbaa !8
  %144 = sdiv i32 %143, 2
  %145 = load i32, ptr %17, align 4, !tbaa !8
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds i32, ptr %44, i64 %146
  store i32 %144, ptr %147, align 4, !tbaa !8
  %148 = load i32, ptr %18, align 4, !tbaa !8
  %149 = srem i32 %148, 2
  store i32 %149, ptr %16, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %150

150:                                              ; preds = %135
  %151 = load i32, ptr %17, align 4, !tbaa !8
  %152 = add nsw i32 %151, -1
  store i32 %152, ptr %17, align 4, !tbaa !8
  br label %131, !llvm.loop !15

153:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %154 = load i32, ptr %2, align 4, !tbaa !8
  %155 = sub nsw i32 %154, 1
  store i32 %155, ptr %19, align 4, !tbaa !8
  br label %156

156:                                              ; preds = %169, %153
  %157 = load i32, ptr %19, align 4, !tbaa !8
  %158 = icmp sge i32 %157, 0
  br i1 %158, label %160, label %159

159:                                              ; preds = %156
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %176

160:                                              ; preds = %156
  %161 = load i32, ptr %19, align 4, !tbaa !8
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds i32, ptr %44, i64 %162
  %164 = load i32, ptr %163, align 4, !tbaa !8
  %165 = add nsw i32 %164, 97
  %166 = trunc i32 %165 to i8
  %167 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %166)
          to label %168 unwind label %172

168:                                              ; preds = %160
  br label %169

169:                                              ; preds = %168
  %170 = load i32, ptr %19, align 4, !tbaa !8
  %171 = add nsw i32 %170, -1
  store i32 %171, ptr %19, align 4, !tbaa !8
  br label %156, !llvm.loop !16

172:                                              ; preds = %160
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %5, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %185

176:                                              ; preds = %159
  %177 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %178 unwind label %181

178:                                              ; preds = %176
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  %179 = load ptr, ptr %7, align 8
  call void @llvm.stackrestore.p0(ptr %179)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %180 = load i32, ptr %1, align 4
  ret i32 %180

181:                                              ; preds = %176
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %5, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %6, align 4
  br label %185

185:                                              ; preds = %181, %172
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %186

186:                                              ; preds = %185, %84, %50
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %187

187:                                              ; preds = %186
  %188 = load ptr, ptr %5, align 8
  %189 = load i32, ptr %6, align 4
  %190 = insertvalue { ptr, i32 } poison, ptr %188, 0
  %191 = insertvalue { ptr, i32 } %190, i32 %189, 1
  resume { ptr, i32 } %191
}

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

; 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 @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #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 uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6 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)) #5

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

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

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 nosync nounwind willreturn }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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}


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

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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %5 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %6 = getelementptr i8, ptr %5, i64 -24
  %7 = load i64, ptr %6, align 8
  %8 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %7
  %9 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %8, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  %11 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %12 unwind label %29

12:                                               ; preds = %0
  %13 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %14 unwind label %29

14:                                               ; preds = %12
  %15 = load i32, ptr %1, align 4, !tbaa !8
  %16 = zext i32 %15 to i64
  %17 = call ptr @llvm.stacksave.p0()
  %18 = alloca i32, i64 %16, align 16
  %19 = load i32, ptr %1, align 4, !tbaa !8
  %20 = zext i32 %19 to i64
  %21 = alloca i32, i64 %20, align 16
  %22 = add nsw i32 %19, 1
  %23 = zext i32 %22 to i64
  %24 = alloca i32, i64 %23, align 16
  %25 = alloca i32, i64 %20, align 16
  %26 = icmp sgt i32 %19, 0
  br i1 %26, label %.lr.ph, label %._crit_edge..preheader_crit_edge

.preheader45:                                     ; preds = %.lr.ph
  %27 = icmp sgt i32 %49, 0
  br i1 %27, label %.lr.ph49.preheader, label %._crit_edge..preheader_crit_edge

.lr.ph49.preheader:                               ; preds = %.preheader45
  %wide.trip.count = zext nneg i32 %49 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %28 = icmp eq i32 %49, 1
  br i1 %28, label %._crit_edge.unr-lcssa, label %.lr.ph49.preheader.new

.lr.ph49.preheader.new:                           ; preds = %.lr.ph49.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %.lr.ph49

29:                                               ; preds = %12, %0
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %106

.lr.ph:                                           ; preds = %14, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %14 ]
  %31 = phi i32 [ %49, %.lr.ph ], [ %19, %14 ]
  %32 = trunc nuw nsw i64 %indvars.iv to i32
  %33 = xor i32 %32, -1
  %34 = add i32 %31, %33
  %35 = sext i32 %34 to i64
  %36 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %35)
  %37 = load i8, ptr %36, align 1, !tbaa !11
  %38 = sext i8 %37 to i32
  %39 = add nsw i32 %38, -97
  %40 = getelementptr inbounds i32, ptr %18, i64 %indvars.iv
  store i32 %39, ptr %40, align 4, !tbaa !8
  %41 = load i32, ptr %1, align 4, !tbaa !8
  %42 = add i32 %41, %33
  %43 = sext i32 %42 to i64
  %44 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %43)
  %45 = load i8, ptr %44, align 1, !tbaa !11
  %46 = sext i8 %45 to i32
  %47 = add nsw i32 %46, -97
  %48 = getelementptr inbounds i32, ptr %21, i64 %indvars.iv
  store i32 %47, ptr %48, align 4, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %49 = load i32, ptr %1, align 4, !tbaa !8
  %50 = sext i32 %49 to i64
  %51 = icmp slt i64 %indvars.iv.next, %50
  br i1 %51, label %.lr.ph, label %.preheader45, !llvm.loop !12

._crit_edge.unr-lcssa:                            ; preds = %.lr.ph49, %.lr.ph49.preheader
  %.1.lcssa.ph = phi i32 [ poison, %.lr.ph49.preheader ], [ %.1.1, %.lr.ph49 ]
  %indvars.iv57.unr = phi i64 [ 0, %.lr.ph49.preheader ], [ %indvars.iv.next58.1, %.lr.ph49 ]
  %.03347.unr = phi i32 [ 0, %.lr.ph49.preheader ], [ %.1.1, %.lr.ph49 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph49.epil

.lr.ph49.epil:                                    ; preds = %._crit_edge.unr-lcssa
  %52 = getelementptr inbounds i32, ptr %18, i64 %indvars.iv57.unr
  %53 = load i32, ptr %52, align 4, !tbaa !8
  %54 = getelementptr inbounds i32, ptr %21, i64 %indvars.iv57.unr
  %55 = load i32, ptr %54, align 4, !tbaa !8
  %56 = add i32 %53, %.03347.unr
  %57 = add i32 %56, %55
  %58 = icmp sgt i32 %57, 25
  %59 = add nsw i32 %57, -26
  %.1.epil = zext i1 %58 to i32
  %.031.epil = select i1 %58, i32 %59, i32 %57
  %60 = getelementptr inbounds i32, ptr %24, i64 %indvars.iv57.unr
  store i32 %.031.epil, ptr %60, align 4, !tbaa !8
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.unr-lcssa, %.lr.ph49.epil
  %.1.lcssa = phi i32 [ %.1.lcssa.ph, %._crit_edge.unr-lcssa ], [ %.1.epil, %.lr.ph49.epil ]
  %61 = zext nneg i32 %49 to i64
  %62 = getelementptr inbounds i32, ptr %24, i64 %61
  store i32 %.1.lcssa, ptr %62, align 4, !tbaa !8
  br i1 %27, label %.lr.ph54.preheader, label %._crit_edge..preheader_crit_edge

._crit_edge..preheader_crit_edge:                 ; preds = %14, %.preheader45, %._crit_edge
  %.lcssa6871 = phi i32 [ %49, %._crit_edge ], [ %49, %.preheader45 ], [ %19, %14 ]
  %.pre = zext i32 %.lcssa6871 to i64
  br label %.preheader.preheader

.lr.ph54.preheader:                               ; preds = %._crit_edge
  %63 = zext nneg i32 %49 to i64
  br label %.lr.ph54

.lr.ph49:                                         ; preds = %.lr.ph49, %.lr.ph49.preheader.new
  %indvars.iv57 = phi i64 [ 0, %.lr.ph49.preheader.new ], [ %indvars.iv.next58.1, %.lr.ph49 ]
  %.03347 = phi i32 [ 0, %.lr.ph49.preheader.new ], [ %.1.1, %.lr.ph49 ]
  %niter = phi i64 [ 0, %.lr.ph49.preheader.new ], [ %niter.next.1, %.lr.ph49 ]
  %64 = getelementptr inbounds i32, ptr %18, i64 %indvars.iv57
  %65 = load i32, ptr %64, align 8, !tbaa !8
  %66 = getelementptr inbounds i32, ptr %21, i64 %indvars.iv57
  %67 = load i32, ptr %66, align 8, !tbaa !8
  %68 = add i32 %65, %.03347
  %69 = add i32 %68, %67
  %70 = icmp sgt i32 %69, 25
  %71 = add nsw i32 %69, -26
  %.1 = zext i1 %70 to i32
  %.031 = select i1 %70, i32 %71, i32 %69
  %72 = getelementptr inbounds i32, ptr %24, i64 %indvars.iv57
  store i32 %.031, ptr %72, align 8, !tbaa !8
  %indvars.iv.next58 = or disjoint i64 %indvars.iv57, 1
  %73 = getelementptr inbounds i32, ptr %18, i64 %indvars.iv.next58
  %74 = load i32, ptr %73, align 4, !tbaa !8
  %75 = getelementptr inbounds i32, ptr %21, i64 %indvars.iv.next58
  %76 = load i32, ptr %75, align 4, !tbaa !8
  %77 = add i32 %74, %.1
  %78 = add i32 %77, %76
  %79 = icmp sgt i32 %78, 25
  %80 = add nsw i32 %78, -26
  %.1.1 = zext i1 %79 to i32
  %.031.1 = select i1 %79, i32 %80, i32 %78
  %81 = getelementptr inbounds i32, ptr %24, i64 %indvars.iv.next58
  store i32 %.031.1, ptr %81, align 4, !tbaa !8
  %indvars.iv.next58.1 = add nuw nsw i64 %indvars.iv57, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.unr-lcssa, label %.lr.ph49, !llvm.loop !14

.lr.ph54:                                         ; preds = %.lr.ph54.preheader, %.lr.ph54
  %indvars.iv60 = phi i64 [ %63, %.lr.ph54.preheader ], [ %indvars.iv.next61, %.lr.ph54 ]
  %.03051 = phi i32 [ %.1.lcssa, %.lr.ph54.preheader ], [ %88, %.lr.ph54 ]
  %indvars.iv.next61 = add nsw i64 %indvars.iv60, -1
  %82 = getelementptr inbounds i32, ptr %24, i64 %indvars.iv.next61
  %83 = load i32, ptr %82, align 4, !tbaa !8
  %84 = mul nsw i32 %.03051, 26
  %85 = add nsw i32 %83, %84
  %86 = sdiv i32 %85, 2
  %87 = getelementptr inbounds i32, ptr %25, i64 %indvars.iv.next61
  store i32 %86, ptr %87, align 4, !tbaa !8
  %88 = srem i32 %85, 2
  %89 = icmp ugt i64 %indvars.iv60, 1
  br i1 %89, label %.lr.ph54, label %.preheader.preheader, !llvm.loop !15

.preheader.preheader:                             ; preds = %.lr.ph54, %._crit_edge..preheader_crit_edge
  %indvars.iv63.ph = phi i64 [ %.pre, %._crit_edge..preheader_crit_edge ], [ %63, %.lr.ph54 ]
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %94
  %indvars.iv63 = phi i64 [ %95, %94 ], [ %indvars.iv63.ph, %.preheader.preheader ]
  %90 = trunc nuw i64 %indvars.iv63 to i32
  %91 = icmp sgt i32 %90, 0
  br i1 %91, label %94, label %92

92:                                               ; preds = %.preheader
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %103 unwind label %104

94:                                               ; preds = %.preheader
  %95 = add nsw i64 %indvars.iv63, -1
  %96 = getelementptr inbounds i32, ptr %25, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !8
  %98 = trunc i32 %97 to i8
  %99 = add i8 %98, 97
  %100 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %99)
          to label %.preheader unwind label %101, !llvm.loop !16

101:                                              ; preds = %94
  %102 = landingpad { ptr, i32 }
          cleanup
  br label %106

103:                                              ; preds = %92
  call void @llvm.stackrestore.p0(ptr %17)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

104:                                              ; preds = %92
  %105 = landingpad { ptr, i32 }
          cleanup
  br label %106

106:                                              ; preds = %101, %104, %29
  %.pn.pn = phi { ptr, i32 } [ %30, %29 ], [ %102, %101 ], [ %105, %104 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn.pn
}

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

; 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 @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #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 uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #5

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

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

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

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 nosync nounwind willreturn }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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}


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