; LLVM IR from kazunetakahashi/atcoder :: 2019/0218_nikkei2019-ex (G)

; 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" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_Z1SB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@X = external dso_local global [26 x i64], align 16
@_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 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca i8, align 1
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %13 = 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) @_Z1SB5cxx11)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @X, ptr noundef getelementptr inbounds (i64, ptr @X, i64 26), ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  store ptr @_Z1SB5cxx11, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %14 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11) #7
  %15 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %4, i32 0, i32 0
  store ptr %14, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %16 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11) #7
  %17 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  store ptr %16, ptr %17, align 8
  br label %18

18:                                               ; preds = %31, %0
  %19 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  br i1 %19, label %21, label %20

20:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  br label %33

21:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #7
  %22 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  %23 = load i8, ptr %22, align 1, !tbaa !11
  store i8 %23, ptr %6, align 1, !tbaa !11
  %24 = load i8, ptr %6, align 1, !tbaa !11
  %25 = sext i8 %24 to i32
  %26 = sub nsw i32 %25, 97
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [26 x i64], ptr @X, i64 0, i64 %27
  %29 = load i64, ptr %28, align 8, !tbaa !12
  %30 = add nsw i64 %29, 1
  store i64 %30, ptr %28, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  br label %31

31:                                               ; preds = %21
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  br label %18

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

34:                                               ; preds = %56, %33
  %35 = load i32, ptr %8, align 4, !tbaa !5
  %36 = icmp slt i32 %35, 26
  br i1 %36, label %38, label %37

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

38:                                               ; preds = %34
  %39 = load i32, ptr %8, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [26 x i64], ptr @X, i64 0, i64 %40
  %42 = load i64, ptr %41, align 8, !tbaa !12
  %43 = load i32, ptr %8, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [26 x i64], ptr @X, i64 0, i64 %44
  %46 = load i64, ptr %45, align 8, !tbaa !12
  %47 = srem i64 %46, 2
  %48 = sub nsw i64 %42, %47
  %49 = load i64, ptr %7, align 8, !tbaa !12
  %50 = add nsw i64 %49, %48
  store i64 %50, ptr %7, align 8, !tbaa !12
  %51 = load i32, ptr %8, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [26 x i64], ptr @X, i64 0, i64 %52
  %54 = load i64, ptr %53, align 8, !tbaa !12
  %55 = srem i64 %54, 2
  store i64 %55, ptr %53, align 8, !tbaa !12
  br label %56

56:                                               ; preds = %38
  %57 = load i32, ptr %8, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %8, align 4, !tbaa !5
  br label %34, !llvm.loop !14

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

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

63:                                               ; preds = %60
  store i32 7, ptr %10, align 4
  br label %82

64:                                               ; preds = %60
  %65 = load i32, ptr %9, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [26 x i64], ptr @X, i64 0, i64 %66
  %68 = load i64, ptr %67, align 8, !tbaa !12
  %69 = icmp eq i64 %68, 1
  br i1 %69, label %70, label %78

70:                                               ; preds = %64
  %71 = load i32, ptr %9, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [26 x i64], ptr @X, i64 0, i64 %72
  %74 = load i64, ptr %73, align 8, !tbaa !12
  %75 = add nsw i64 %74, -1
  store i64 %75, ptr %73, align 8, !tbaa !12
  %76 = load i64, ptr %7, align 8, !tbaa !12
  %77 = add nsw i64 %76, 1
  store i64 %77, ptr %7, align 8, !tbaa !12
  store i32 7, ptr %10, align 4
  br label %82

78:                                               ; preds = %64
  br label %79

79:                                               ; preds = %78
  %80 = load i32, ptr %9, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %9, align 4, !tbaa !5
  br label %60, !llvm.loop !16

82:                                               ; preds = %70, %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %83

83:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %84 = load i64, ptr %7, align 8, !tbaa !12
  %85 = load i64, ptr %7, align 8, !tbaa !12
  %86 = mul nsw i64 %84, %85
  store i64 %86, ptr %11, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %87

87:                                               ; preds = %98, %83
  %88 = load i32, ptr %12, align 4, !tbaa !5
  %89 = icmp slt i32 %88, 26
  br i1 %89, label %91, label %90

90:                                               ; preds = %87
  store i32 10, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %101

91:                                               ; preds = %87
  %92 = load i32, ptr %12, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [26 x i64], ptr @X, i64 0, i64 %93
  %95 = load i64, ptr %94, align 8, !tbaa !12
  %96 = load i64, ptr %11, align 8, !tbaa !12
  %97 = add nsw i64 %96, %95
  store i64 %97, ptr %11, align 8, !tbaa !12
  br label %98

98:                                               ; preds = %91
  %99 = load i32, ptr %12, align 4, !tbaa !5
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %12, align 4, !tbaa !5
  br label %87, !llvm.loop !17

101:                                              ; preds = %90
  %102 = load i64, ptr %11, align 8, !tbaa !12
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %102)
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %103, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  %105 = load i32, ptr %1, align 4
  ret i32 %105
}

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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #6 align 2

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


; 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" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_Z1SB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@X = external dso_local global [26 x i64], align 16
@_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 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = 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) @_Z1SB5cxx11)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @X, ptr noundef nonnull getelementptr inbounds (i8, ptr @X, i64 208), ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  %5 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11) #8
  store ptr %5, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %6 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11) #8
  store ptr %6, ptr %3, align 8
  %7 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  br i1 %7, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %._crit_edge
  %index = phi i64 [ 0, %._crit_edge ], [ %index.next, %vector.body ]
  %vec.phi = phi <2 x i64> [ zeroinitializer, %._crit_edge ], [ %14, %vector.body ]
  %vec.phi68 = phi <2 x i64> [ zeroinitializer, %._crit_edge ], [ %15, %vector.body ]
  %8 = getelementptr inbounds [26 x i64], ptr @X, i64 0, i64 %index
  %9 = getelementptr inbounds i8, ptr %8, i64 16
  %wide.load = load <2 x i64>, ptr %8, align 16, !tbaa !9
  %wide.load69 = load <2 x i64>, ptr %9, align 16, !tbaa !9
  %10 = srem <2 x i64> %wide.load, <i64 2, i64 2>
  %11 = srem <2 x i64> %wide.load69, <i64 2, i64 2>
  %12 = add <2 x i64> %wide.load, %vec.phi
  %13 = add <2 x i64> %wide.load69, %vec.phi68
  %14 = sub <2 x i64> %12, %10
  %15 = sub <2 x i64> %13, %11
  store <2 x i64> %10, ptr %8, align 16, !tbaa !9
  store <2 x i64> %11, ptr %9, align 16, !tbaa !9
  %index.next = add nuw i64 %index, 4
  %16 = icmp eq i64 %index.next, 24
  br i1 %16, label %.preheader, label %vector.body, !llvm.loop !11

.lr.ph:                                           ; preds = %0, %.lr.ph
  %17 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #8
  %18 = load i8, ptr %17, align 1, !tbaa !15
  %19 = sext i8 %18 to i64
  %20 = add nsw i64 %19, -97
  %21 = getelementptr inbounds [26 x i64], ptr @X, i64 0, i64 %20
  %22 = load i64, ptr %21, align 8, !tbaa !9
  %23 = add nsw i64 %22, 1
  store i64 %23, ptr %21, align 8, !tbaa !9
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #8
  %25 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  br i1 %25, label %.lr.ph, label %._crit_edge

.preheader:                                       ; preds = %vector.body
  %bin.rdx = add <2 x i64> %15, %14
  %26 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %27 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 192), align 16, !tbaa !9
  %28 = srem i64 %27, 2
  %29 = add i64 %27, %26
  store i64 %28, ptr getelementptr inbounds (i8, ptr @X, i64 192), align 16, !tbaa !9
  %30 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 200), align 8, !tbaa !9
  %31 = srem i64 %30, 2
  %32 = add i64 %29, %30
  %33 = add nsw i64 %28, %31
  %34 = sub i64 %32, %33
  store i64 %31, ptr getelementptr inbounds (i8, ptr @X, i64 200), align 8, !tbaa !9
  %35 = load i64, ptr @X, align 16, !tbaa !9
  %36 = icmp eq i64 %35, 1
  br i1 %36, label %112, label %37

37:                                               ; preds = %.preheader
  %38 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 8), align 8, !tbaa !9
  %39 = icmp eq i64 %38, 1
  br i1 %39, label %112, label %40

40:                                               ; preds = %37
  %41 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 16), align 16, !tbaa !9
  %42 = icmp eq i64 %41, 1
  br i1 %42, label %112, label %43

43:                                               ; preds = %40
  %44 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 24), align 8, !tbaa !9
  %45 = icmp eq i64 %44, 1
  br i1 %45, label %112, label %46

46:                                               ; preds = %43
  %47 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 32), align 16, !tbaa !9
  %48 = icmp eq i64 %47, 1
  br i1 %48, label %112, label %49

49:                                               ; preds = %46
  %50 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 40), align 8, !tbaa !9
  %51 = icmp eq i64 %50, 1
  br i1 %51, label %112, label %52

52:                                               ; preds = %49
  %53 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 48), align 16, !tbaa !9
  %54 = icmp eq i64 %53, 1
  br i1 %54, label %112, label %55

55:                                               ; preds = %52
  %56 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 56), align 8, !tbaa !9
  %57 = icmp eq i64 %56, 1
  br i1 %57, label %112, label %58

58:                                               ; preds = %55
  %59 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 64), align 16, !tbaa !9
  %60 = icmp eq i64 %59, 1
  br i1 %60, label %112, label %61

61:                                               ; preds = %58
  %62 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 72), align 8, !tbaa !9
  %63 = icmp eq i64 %62, 1
  br i1 %63, label %112, label %64

64:                                               ; preds = %61
  %65 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 80), align 16, !tbaa !9
  %66 = icmp eq i64 %65, 1
  br i1 %66, label %112, label %67

67:                                               ; preds = %64
  %68 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 88), align 8, !tbaa !9
  %69 = icmp eq i64 %68, 1
  br i1 %69, label %112, label %70

70:                                               ; preds = %67
  %71 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 96), align 16, !tbaa !9
  %72 = icmp eq i64 %71, 1
  br i1 %72, label %112, label %73

73:                                               ; preds = %70
  %74 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 104), align 8, !tbaa !9
  %75 = icmp eq i64 %74, 1
  br i1 %75, label %112, label %76

76:                                               ; preds = %73
  %77 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 112), align 16, !tbaa !9
  %78 = icmp eq i64 %77, 1
  br i1 %78, label %112, label %79

79:                                               ; preds = %76
  %80 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 120), align 8, !tbaa !9
  %81 = icmp eq i64 %80, 1
  br i1 %81, label %112, label %82

82:                                               ; preds = %79
  %83 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 128), align 16, !tbaa !9
  %84 = icmp eq i64 %83, 1
  br i1 %84, label %112, label %85

85:                                               ; preds = %82
  %86 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 136), align 8, !tbaa !9
  %87 = icmp eq i64 %86, 1
  br i1 %87, label %112, label %88

88:                                               ; preds = %85
  %89 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 144), align 16, !tbaa !9
  %90 = icmp eq i64 %89, 1
  br i1 %90, label %112, label %91

91:                                               ; preds = %88
  %92 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 152), align 8, !tbaa !9
  %93 = icmp eq i64 %92, 1
  br i1 %93, label %112, label %94

94:                                               ; preds = %91
  %95 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 160), align 16, !tbaa !9
  %96 = icmp eq i64 %95, 1
  br i1 %96, label %112, label %97

97:                                               ; preds = %94
  %98 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 168), align 8, !tbaa !9
  %99 = icmp eq i64 %98, 1
  br i1 %99, label %112, label %100

100:                                              ; preds = %97
  %101 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 176), align 16, !tbaa !9
  %102 = icmp eq i64 %101, 1
  br i1 %102, label %112, label %103

103:                                              ; preds = %100
  %104 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 184), align 8, !tbaa !9
  %105 = icmp eq i64 %104, 1
  br i1 %105, label %112, label %106

106:                                              ; preds = %103
  %107 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 192), align 16, !tbaa !9
  %108 = icmp eq i64 %107, 1
  br i1 %108, label %112, label %109

109:                                              ; preds = %106
  %110 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 200), align 8, !tbaa !9
  %111 = icmp eq i64 %110, 1
  br i1 %111, label %112, label %.loopexit

112:                                              ; preds = %109, %106, %103, %100, %97, %94, %91, %88, %85, %82, %79, %76, %73, %70, %67, %64, %61, %58, %55, %52, %49, %46, %43, %40, %37, %.preheader
  %.lcssa31 = phi i64 [ 0, %.preheader ], [ 1, %37 ], [ 2, %40 ], [ 3, %43 ], [ 4, %46 ], [ 5, %49 ], [ 6, %52 ], [ 7, %55 ], [ 8, %58 ], [ 9, %61 ], [ 10, %64 ], [ 11, %67 ], [ 12, %70 ], [ 13, %73 ], [ 14, %76 ], [ 15, %79 ], [ 16, %82 ], [ 17, %85 ], [ 18, %88 ], [ 19, %91 ], [ 20, %94 ], [ 21, %97 ], [ 22, %100 ], [ 23, %103 ], [ 24, %106 ], [ 25, %109 ]
  %113 = getelementptr inbounds [26 x i64], ptr @X, i64 0, i64 %.lcssa31
  store i64 0, ptr %113, align 8, !tbaa !9
  %114 = add nsw i64 %34, 1
  %.pre = load i64, ptr @X, align 16, !tbaa !9
  %.pre43 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 8), align 8, !tbaa !9
  %.pre44 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 16), align 16, !tbaa !9
  %.pre45 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 24), align 8, !tbaa !9
  %.pre46 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 32), align 16, !tbaa !9
  %.pre47 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 40), align 8, !tbaa !9
  %.pre48 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 48), align 16, !tbaa !9
  %.pre49 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 56), align 8, !tbaa !9
  %.pre50 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 64), align 16, !tbaa !9
  %.pre51 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 72), align 8, !tbaa !9
  %.pre52 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 80), align 16, !tbaa !9
  %.pre53 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 88), align 8, !tbaa !9
  %.pre54 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 96), align 16, !tbaa !9
  %.pre55 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 104), align 8, !tbaa !9
  %.pre56 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 112), align 16, !tbaa !9
  %.pre57 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 120), align 8, !tbaa !9
  %.pre58 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 128), align 16, !tbaa !9
  %.pre59 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 136), align 8, !tbaa !9
  %.pre60 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 144), align 16, !tbaa !9
  %.pre61 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 152), align 8, !tbaa !9
  %.pre62 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 160), align 16, !tbaa !9
  %.pre63 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 168), align 8, !tbaa !9
  %.pre64 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 176), align 16, !tbaa !9
  %.pre65 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 184), align 8, !tbaa !9
  %.pre66 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 192), align 16, !tbaa !9
  %.pre67 = load i64, ptr getelementptr inbounds (i8, ptr @X, i64 200), align 8, !tbaa !9
  br label %.loopexit

.loopexit:                                        ; preds = %109, %112
  %115 = phi i64 [ %.pre67, %112 ], [ %110, %109 ]
  %116 = phi i64 [ %.pre66, %112 ], [ %107, %109 ]
  %117 = phi i64 [ %.pre65, %112 ], [ %104, %109 ]
  %118 = phi i64 [ %.pre64, %112 ], [ %101, %109 ]
  %119 = phi i64 [ %.pre63, %112 ], [ %98, %109 ]
  %120 = phi i64 [ %.pre62, %112 ], [ %95, %109 ]
  %121 = phi i64 [ %.pre61, %112 ], [ %92, %109 ]
  %122 = phi i64 [ %.pre60, %112 ], [ %89, %109 ]
  %123 = phi i64 [ %.pre59, %112 ], [ %86, %109 ]
  %124 = phi i64 [ %.pre58, %112 ], [ %83, %109 ]
  %125 = phi i64 [ %.pre57, %112 ], [ %80, %109 ]
  %126 = phi i64 [ %.pre56, %112 ], [ %77, %109 ]
  %127 = phi i64 [ %.pre55, %112 ], [ %74, %109 ]
  %128 = phi i64 [ %.pre54, %112 ], [ %71, %109 ]
  %129 = phi i64 [ %.pre53, %112 ], [ %68, %109 ]
  %130 = phi i64 [ %.pre52, %112 ], [ %65, %109 ]
  %131 = phi i64 [ %.pre51, %112 ], [ %62, %109 ]
  %132 = phi i64 [ %.pre50, %112 ], [ %59, %109 ]
  %133 = phi i64 [ %.pre49, %112 ], [ %56, %109 ]
  %134 = phi i64 [ %.pre48, %112 ], [ %53, %109 ]
  %135 = phi i64 [ %.pre47, %112 ], [ %50, %109 ]
  %136 = phi i64 [ %.pre46, %112 ], [ %47, %109 ]
  %137 = phi i64 [ %.pre45, %112 ], [ %44, %109 ]
  %138 = phi i64 [ %.pre44, %112 ], [ %41, %109 ]
  %139 = phi i64 [ %.pre43, %112 ], [ %38, %109 ]
  %140 = phi i64 [ %.pre, %112 ], [ %35, %109 ]
  %.1 = phi i64 [ %114, %112 ], [ %34, %109 ]
  %141 = mul nsw i64 %.1, %.1
  %142 = add nsw i64 %140, %141
  %143 = add nsw i64 %139, %142
  %144 = add nsw i64 %138, %143
  %145 = add nsw i64 %137, %144
  %146 = add nsw i64 %136, %145
  %147 = add nsw i64 %135, %146
  %148 = add nsw i64 %134, %147
  %149 = add nsw i64 %133, %148
  %150 = add nsw i64 %132, %149
  %151 = add nsw i64 %131, %150
  %152 = add nsw i64 %130, %151
  %153 = add nsw i64 %129, %152
  %154 = add nsw i64 %128, %153
  %155 = add nsw i64 %127, %154
  %156 = add nsw i64 %126, %155
  %157 = add nsw i64 %125, %156
  %158 = add nsw i64 %124, %157
  %159 = add nsw i64 %123, %158
  %160 = add nsw i64 %122, %159
  %161 = add nsw i64 %121, %160
  %162 = add nsw i64 %120, %161
  %163 = add nsw i64 %119, %162
  %164 = add nsw i64 %118, %163
  %165 = add nsw i64 %117, %164
  %166 = add nsw i64 %116, %165
  %167 = add nsw i64 %115, %166
  %168 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %167)
  %169 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %168, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #7

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


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