; LLVM IR from kazunetakahashi/atcoder :: 2017/0923_cf-2017-quala (C)

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

@H = external dso_local global i32, align 4
@W = external dso_local global i32, align 4
@_Z1aB5cxx11 = external dso_local global [110 x %"class.std::__cxx11::basic_string"], align 16
@cnt = external dso_local global [26 x i32], align 16
@amari = external dso_local global i32, align 4
@yoyu = external dso_local global i32, align 4
@one = external dso_local global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 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
  store i32 0, ptr %1, align 4
  %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) @H)
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(4) @W)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %22, %0
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = load i32, ptr @H, align 4, !tbaa !5
  %15 = icmp slt i32 %13, %14
  br i1 %15, label %17, label %16

16:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %25

17:                                               ; preds = %12
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [110 x %"class.std::__cxx11::basic_string"], ptr @_Z1aB5cxx11, i64 0, i64 %19
  %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) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %20)
  br label %22

22:                                               ; preds = %17
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %2, align 4, !tbaa !5
  br label %12, !llvm.loop !9

25:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @cnt, ptr noundef getelementptr inbounds (i32, ptr @cnt, i64 26), ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %55, %25
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = load i32, ptr @H, align 4, !tbaa !5
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %58

31:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %51, %31
  %33 = load i32, ptr %6, align 4, !tbaa !5
  %34 = load i32, ptr @W, align 4, !tbaa !5
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %54

37:                                               ; preds = %32
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [110 x %"class.std::__cxx11::basic_string"], ptr @_Z1aB5cxx11, i64 0, i64 %39
  %41 = load i32, ptr %6, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %40, i64 noundef %42)
  %44 = load i8, ptr %43, align 1, !tbaa !11
  %45 = sext i8 %44 to i32
  %46 = sub nsw i32 %45, 97
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %48, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %37
  %52 = load i32, ptr %6, align 4, !tbaa !5
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %6, align 4, !tbaa !5
  br label %32, !llvm.loop !12

54:                                               ; preds = %36
  br label %55

55:                                               ; preds = %54
  %56 = load i32, ptr %4, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %4, align 4, !tbaa !5
  br label %26, !llvm.loop !13

58:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %71, %58
  %60 = load i32, ptr %7, align 4, !tbaa !5
  %61 = icmp slt i32 %60, 26
  br i1 %61, label %63, label %62

62:                                               ; preds = %59
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %74

63:                                               ; preds = %59
  %64 = load i32, ptr %7, align 4, !tbaa !5
  %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 !5
  %68 = srem i32 %67, 4
  %69 = load i32, ptr @amari, align 4, !tbaa !5
  %70 = add nsw i32 %69, %68
  store i32 %70, ptr @amari, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %63
  %72 = load i32, ptr %7, align 4, !tbaa !5
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %7, align 4, !tbaa !5
  br label %59, !llvm.loop !14

74:                                               ; preds = %62
  %75 = load i32, ptr @H, align 4, !tbaa !5
  %76 = srem i32 %75, 2
  %77 = icmp ne i32 %76, 0
  br i1 %77, label %78, label %87

78:                                               ; preds = %74
  %79 = load i32, ptr @W, align 4, !tbaa !5
  %80 = srem i32 %79, 2
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %87

82:                                               ; preds = %78
  %83 = load i32, ptr @H, align 4, !tbaa !5
  %84 = load i32, ptr @W, align 4, !tbaa !5
  %85 = add nsw i32 %83, %84
  %86 = sub nsw i32 %85, 1
  store i32 %86, ptr @yoyu, align 4, !tbaa !5
  store i32 1, ptr @one, align 4, !tbaa !5
  br label %110

87:                                               ; preds = %78, %74
  %88 = load i32, ptr @H, align 4, !tbaa !5
  %89 = srem i32 %88, 2
  %90 = icmp eq i32 %89, 0
  br i1 %90, label %91, label %97

91:                                               ; preds = %87
  %92 = load i32, ptr @W, align 4, !tbaa !5
  %93 = srem i32 %92, 2
  %94 = icmp ne i32 %93, 0
  br i1 %94, label %95, label %97

95:                                               ; preds = %91
  %96 = load i32, ptr @H, align 4, !tbaa !5
  store i32 %96, ptr @yoyu, align 4, !tbaa !5
  br label %109

97:                                               ; preds = %91, %87
  %98 = load i32, ptr @H, align 4, !tbaa !5
  %99 = srem i32 %98, 2
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %101, label %107

101:                                              ; preds = %97
  %102 = load i32, ptr @W, align 4, !tbaa !5
  %103 = srem i32 %102, 2
  %104 = icmp eq i32 %103, 0
  br i1 %104, label %105, label %107

105:                                              ; preds = %101
  %106 = load i32, ptr @W, align 4, !tbaa !5
  store i32 %106, ptr @yoyu, align 4, !tbaa !5
  br label %108

107:                                              ; preds = %101, %97
  store i32 0, ptr @yoyu, align 4, !tbaa !5
  br label %108

108:                                              ; preds = %107, %105
  br label %109

109:                                              ; preds = %108, %95
  br label %110

110:                                              ; preds = %109, %82
  %111 = load i32, ptr @amari, align 4, !tbaa !5
  %112 = load i32, ptr @yoyu, align 4, !tbaa !5
  %113 = icmp sgt i32 %111, %112
  br i1 %113, label %114, label %117

114:                                              ; preds = %110
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %115, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  br label %150

117:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %133, %117
  %119 = load i32, ptr %9, align 4, !tbaa !5
  %120 = icmp slt i32 %119, 26
  br i1 %120, label %122, label %121

121:                                              ; preds = %118
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %136

122:                                              ; preds = %118
  %123 = load i32, ptr %9, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %124
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = srem i32 %126, 2
  %128 = icmp eq i32 %127, 1
  br i1 %128, label %129, label %132

129:                                              ; preds = %122
  %130 = load i32, ptr %8, align 4, !tbaa !5
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %8, align 4, !tbaa !5
  br label %132

132:                                              ; preds = %129, %122
  br label %133

133:                                              ; preds = %132
  %134 = load i32, ptr %9, align 4, !tbaa !5
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %9, align 4, !tbaa !5
  br label %118, !llvm.loop !15

136:                                              ; preds = %121
  %137 = load i32, ptr %8, align 4, !tbaa !5
  %138 = load i32, ptr @one, align 4, !tbaa !5
  %139 = icmp sgt i32 %137, %138
  br i1 %139, label %140, label %143

140:                                              ; preds = %136
  %141 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %141, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  br label %144

143:                                              ; preds = %136
  store i32 0, ptr %5, align 4
  br label %144

144:                                              ; preds = %143, %140
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  %145 = load i32, ptr %5, align 4
  switch i32 %145, label %152 [
    i32 0, label %146
    i32 1, label %150
  ]

146:                                              ; preds = %144
  br label %147

147:                                              ; preds = %146
  %148 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %148, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %150

150:                                              ; preds = %147, %144, %114
  %151 = load i32, ptr %1, align 4
  ret i32 %151

152:                                              ; preds = %144
  unreachable
}

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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #3

; 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) #4 align 2

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

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}


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

@H = external dso_local global i32, align 4
@W = external dso_local global i32, align 4
@_Z1aB5cxx11 = external dso_local global [110 x %"class.std::__cxx11::basic_string"], align 16
@cnt = external dso_local global [26 x i32], align 16
@amari = external dso_local local_unnamed_addr global i32, align 4
@yoyu = external dso_local local_unnamed_addr global i32, align 4
@one = external dso_local local_unnamed_addr global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 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 = 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) @H)
  %3 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) @W)
  %4 = load i32, ptr @H, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @cnt, ptr noundef nonnull getelementptr inbounds (i8, ptr @cnt, i64 104), ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %6 = load i32, ptr @H, align 4, !tbaa !5
  %7 = icmp sgt i32 %6, 0
  %8 = load i32, ptr @W, align 4
  %9 = icmp sgt i32 %8, 0
  %or.cond = select i1 %7, i1 %9, i1 false
  br i1 %or.cond, label %.preheader34, label %.preheader33

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %10 = getelementptr inbounds [110 x %"class.std::__cxx11::basic_string"], ptr @_Z1aB5cxx11, i64 0, i64 %indvars.iv
  %11 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %10)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %12 = load i32, ptr @H, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = icmp slt i64 %indvars.iv.next, %13
  br i1 %14, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.preheader34:                                     ; preds = %._crit_edge, %._crit_edge38
  %15 = phi i32 [ %102, %._crit_edge38 ], [ %6, %._crit_edge ]
  %16 = phi i32 [ %103, %._crit_edge38 ], [ %8, %._crit_edge ]
  %indvars.iv51 = phi i64 [ %indvars.iv.next52, %._crit_edge38 ], [ 0, %._crit_edge ]
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph37, label %._crit_edge38

.lr.ph37:                                         ; preds = %.preheader34
  %18 = getelementptr inbounds [110 x %"class.std::__cxx11::basic_string"], ptr @_Z1aB5cxx11, i64 0, i64 %indvars.iv51
  br label %106

.preheader33:                                     ; preds = %._crit_edge38, %._crit_edge
  %.lcssa = phi i32 [ %6, %._crit_edge ], [ %102, %._crit_edge38 ]
  %amari.promoted = load i32, ptr @amari, align 4, !tbaa !5
  %19 = load <16 x i32>, ptr @cnt, align 16, !tbaa !5
  %20 = extractelement <16 x i32> %19, i64 0
  %21 = srem i32 %20, 4
  %22 = add nsw i32 %amari.promoted, %21
  %23 = extractelement <16 x i32> %19, i64 1
  %24 = srem i32 %23, 4
  %25 = add nsw i32 %22, %24
  %26 = extractelement <16 x i32> %19, i64 2
  %27 = srem i32 %26, 4
  %28 = add nsw i32 %25, %27
  %29 = extractelement <16 x i32> %19, i64 3
  %30 = srem i32 %29, 4
  %31 = add nsw i32 %28, %30
  %32 = extractelement <16 x i32> %19, i64 4
  %33 = srem i32 %32, 4
  %34 = add nsw i32 %31, %33
  %35 = extractelement <16 x i32> %19, i64 5
  %36 = srem i32 %35, 4
  %37 = add nsw i32 %34, %36
  %38 = extractelement <16 x i32> %19, i64 6
  %39 = srem i32 %38, 4
  %40 = add nsw i32 %37, %39
  %41 = extractelement <16 x i32> %19, i64 7
  %42 = srem i32 %41, 4
  %43 = add nsw i32 %40, %42
  %44 = extractelement <16 x i32> %19, i64 8
  %45 = srem i32 %44, 4
  %46 = add nsw i32 %43, %45
  %47 = extractelement <16 x i32> %19, i64 9
  %48 = srem i32 %47, 4
  %49 = add nsw i32 %46, %48
  %50 = extractelement <16 x i32> %19, i64 10
  %51 = srem i32 %50, 4
  %52 = add nsw i32 %49, %51
  %53 = extractelement <16 x i32> %19, i64 11
  %54 = srem i32 %53, 4
  %55 = add nsw i32 %52, %54
  %56 = extractelement <16 x i32> %19, i64 12
  %57 = srem i32 %56, 4
  %58 = add nsw i32 %55, %57
  %59 = extractelement <16 x i32> %19, i64 13
  %60 = srem i32 %59, 4
  %61 = add nsw i32 %58, %60
  %62 = extractelement <16 x i32> %19, i64 14
  %63 = srem i32 %62, 4
  %64 = add nsw i32 %61, %63
  %65 = extractelement <16 x i32> %19, i64 15
  %66 = srem i32 %65, 4
  %67 = add nsw i32 %64, %66
  %68 = load <8 x i32>, ptr getelementptr inbounds (i8, ptr @cnt, i64 64), align 16, !tbaa !5
  %69 = extractelement <8 x i32> %68, i64 0
  %70 = srem i32 %69, 4
  %71 = add nsw i32 %67, %70
  %72 = extractelement <8 x i32> %68, i64 1
  %73 = srem i32 %72, 4
  %74 = add nsw i32 %71, %73
  %75 = extractelement <8 x i32> %68, i64 2
  %76 = srem i32 %75, 4
  %77 = add nsw i32 %74, %76
  %78 = extractelement <8 x i32> %68, i64 3
  %79 = srem i32 %78, 4
  %80 = add nsw i32 %77, %79
  %81 = extractelement <8 x i32> %68, i64 4
  %82 = srem i32 %81, 4
  %83 = add nsw i32 %80, %82
  %84 = extractelement <8 x i32> %68, i64 5
  %85 = srem i32 %84, 4
  %86 = add nsw i32 %83, %85
  %87 = extractelement <8 x i32> %68, i64 6
  %88 = srem i32 %87, 4
  %89 = add nsw i32 %86, %88
  %90 = extractelement <8 x i32> %68, i64 7
  %91 = srem i32 %90, 4
  %92 = add nsw i32 %89, %91
  %93 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 96), align 16, !tbaa !5
  %94 = srem i32 %93, 4
  %95 = add nsw i32 %92, %94
  %96 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 100), align 4, !tbaa !5
  %97 = srem i32 %96, 4
  %98 = add nsw i32 %95, %97
  store i32 %98, ptr @amari, align 4, !tbaa !5
  %99 = and i32 %.lcssa, 1
  %.not = icmp eq i32 %99, 0
  %100 = load i32, ptr @W, align 4, !tbaa !5
  %101 = and i32 %100, 1
  %.not28 = icmp eq i32 %101, 0
  br i1 %.not, label %121, label %117

._crit_edge38.loopexit:                           ; preds = %106
  %.pre = load i32, ptr @H, align 4, !tbaa !5
  br label %._crit_edge38

._crit_edge38:                                    ; preds = %._crit_edge38.loopexit, %.preheader34
  %102 = phi i32 [ %.pre, %._crit_edge38.loopexit ], [ %15, %.preheader34 ]
  %103 = phi i32 [ %114, %._crit_edge38.loopexit ], [ %16, %.preheader34 ]
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %104 = sext i32 %102 to i64
  %105 = icmp slt i64 %indvars.iv.next52, %104
  br i1 %105, label %.preheader34, label %.preheader33, !llvm.loop !11

106:                                              ; preds = %.lr.ph37, %106
  %indvars.iv48 = phi i64 [ 0, %.lr.ph37 ], [ %indvars.iv.next49, %106 ]
  %107 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %18, i64 noundef %indvars.iv48)
  %108 = load i8, ptr %107, align 1, !tbaa !13
  %109 = sext i8 %108 to i64
  %110 = add nsw i64 %109, -97
  %111 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %111, align 4, !tbaa !5
  %indvars.iv.next49 = add nuw nsw i64 %indvars.iv48, 1
  %114 = load i32, ptr @W, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = icmp slt i64 %indvars.iv.next49, %115
  br i1 %116, label %106, label %._crit_edge38.loopexit, !llvm.loop !14

117:                                              ; preds = %.preheader33
  br i1 %.not28, label %123, label %118

118:                                              ; preds = %117
  %119 = add nsw i32 %.lcssa, -1
  %120 = add i32 %119, %100
  store i32 %120, ptr @yoyu, align 4, !tbaa !5
  store i32 1, ptr @one, align 4, !tbaa !5
  br label %124

121:                                              ; preds = %.preheader33
  br i1 %.not28, label %.thread30, label %122

122:                                              ; preds = %121
  store i32 %.lcssa, ptr @yoyu, align 4, !tbaa !5
  br label %124

123:                                              ; preds = %117
  store i32 %100, ptr @yoyu, align 4, !tbaa !5
  br label %124

.thread30:                                        ; preds = %121
  store i32 0, ptr @yoyu, align 4, !tbaa !5
  br label %124

124:                                              ; preds = %122, %.thread30, %123, %118
  %125 = phi i32 [ %.lcssa, %122 ], [ 0, %.thread30 ], [ %100, %123 ], [ %120, %118 ]
  %126 = icmp sgt i32 %98, %125
  br i1 %126, label %145, label %.preheader.preheader

.preheader.preheader:                             ; preds = %124
  %127 = and <16 x i32> %19, <i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647>
  %128 = icmp eq <16 x i32> %127, <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>
  %129 = and <8 x i32> %68, <i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647>
  %130 = icmp eq <8 x i32> %129, <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>
  %131 = and i32 %93, -2147483647
  %132 = icmp eq i32 %131, 1
  %133 = zext i1 %132 to i32
  %134 = and i32 %96, -2147483647
  %135 = icmp eq i32 %134, 1
  %136 = zext i1 %135 to i32
  %137 = bitcast <16 x i1> %128 to i16
  %138 = call range(i16 0, 17) i16 @llvm.ctpop.i16(i16 %137)
  %139 = zext nneg i16 %138 to i32
  %140 = bitcast <8 x i1> %130 to i8
  %141 = call range(i8 0, 9) i8 @llvm.ctpop.i8(i8 %140)
  %142 = zext nneg i8 %141 to i32
  %op.rdx = add nuw nsw i32 %139, %142
  %op.rdx65 = add nuw nsw i32 %op.rdx, %133
  %op.rdx66 = add nuw nsw i32 %op.rdx65, %136
  %143 = load i32, ptr @one, align 4, !tbaa !5
  %144 = icmp sgt i32 %op.rdx66, %143
  %.str..str.2 = select i1 %144, ptr @.str, ptr @.str.2
  br label %145

145:                                              ; preds = %124, %.preheader.preheader
  %.str.sink = phi ptr [ %.str..str.2, %.preheader.preheader ], [ @.str, %124 ]
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull %.str.sink)
  %147 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %146, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; 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 #4 align 2

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i16 @llvm.ctpop.i16(i16) #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i8 @llvm.ctpop.i8(i8) #6

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10, !12}
!12 = !{!"llvm.loop.unswitch.partial.disable"}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !10}


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