; LLVM IR from kazunetakahashi/atcoder :: 2017/0128_ARC068 (D)

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

@N = external dso_local global i32, align 4
@A = external dso_local global [100010 x i32], align 16
@X = external dso_local global [100010 x i32], align 16
@Y = external dso_local global [3 x i32], align 4
@_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 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
  store i32 0, ptr %1, align 4
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %10

10:                                               ; preds = %20, %0
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = load i32, ptr @N, align 4, !tbaa !5
  %13 = icmp slt i32 %11, %12
  br i1 %13, label %15, label %14

14:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %23

15:                                               ; preds = %10
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [100010 x i32], ptr @A, i64 0, i64 %17
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %18)
  br label %20

20:                                               ; preds = %15
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %2, align 4, !tbaa !5
  br label %10, !llvm.loop !9

23:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @X, ptr noundef getelementptr inbounds (i32, ptr @X, i64 100010), ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %38, %23
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = load i32, ptr @N, align 4, !tbaa !5
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %41

29:                                               ; preds = %24
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [100010 x i32], ptr @A, i64 0, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [100010 x i32], ptr @X, i64 0, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %35, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %29
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %4, align 4, !tbaa !5
  br label %24, !llvm.loop !11

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

42:                                               ; preds = %69, %41
  %43 = load i32, ptr %5, align 4, !tbaa !5
  %44 = icmp slt i32 %43, 100010
  br i1 %44, label %46, label %45

45:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %72

46:                                               ; preds = %42
  %47 = load i32, ptr %5, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [100010 x i32], ptr @X, i64 0, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = icmp sge i32 %50, 3
  br i1 %51, label %52, label %68

52:                                               ; preds = %46
  %53 = load i32, ptr %5, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [100010 x i32], ptr @X, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = srem i32 %56, 2
  %58 = icmp eq i32 %57, 0
  br i1 %58, label %59, label %63

59:                                               ; preds = %52
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [100010 x i32], ptr @X, i64 0, i64 %61
  store i32 2, ptr %62, align 4, !tbaa !5
  br label %67

63:                                               ; preds = %52
  %64 = load i32, ptr %5, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [100010 x i32], ptr @X, i64 0, i64 %65
  store i32 1, ptr %66, align 4, !tbaa !5
  br label %67

67:                                               ; preds = %63, %59
  br label %68

68:                                               ; preds = %67, %46
  br label %69

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

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

73:                                               ; preds = %86, %72
  %74 = load i32, ptr %7, align 4, !tbaa !5
  %75 = icmp slt i32 %74, 100010
  br i1 %75, label %77, label %76

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

77:                                               ; preds = %73
  %78 = load i32, ptr %7, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [100010 x i32], ptr @X, i64 0, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [3 x i32], ptr @Y, i64 0, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %83, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %77
  %87 = load i32, ptr %7, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %7, align 4, !tbaa !5
  br label %73, !llvm.loop !13

89:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !5
  %90 = load i32, ptr getelementptr inbounds ([3 x i32], ptr @Y, i64 0, i64 2), align 4, !tbaa !5
  %91 = srem i32 %90, 2
  %92 = icmp eq i32 %91, 0
  br i1 %92, label %93, label %97

93:                                               ; preds = %89
  %94 = load i32, ptr getelementptr inbounds ([3 x i32], ptr @Y, i64 0, i64 1), align 4, !tbaa !5
  %95 = load i32, ptr getelementptr inbounds ([3 x i32], ptr @Y, i64 0, i64 2), align 4, !tbaa !5
  %96 = add nsw i32 %94, %95
  store i32 %96, ptr %8, align 4, !tbaa !5
  br label %102

97:                                               ; preds = %89
  %98 = load i32, ptr getelementptr inbounds ([3 x i32], ptr @Y, i64 0, i64 1), align 4, !tbaa !5
  %99 = load i32, ptr getelementptr inbounds ([3 x i32], ptr @Y, i64 0, i64 2), align 4, !tbaa !5
  %100 = add nsw i32 %98, %99
  %101 = sub nsw i32 %100, 1
  store i32 %101, ptr %8, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %97, %93
  %103 = load i32, ptr %8, align 4, !tbaa !5
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %103)
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %104, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  %106 = load i32, ptr %1, align 4
  ret i32 %106
}

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

; 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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #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 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 = { 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 = distinct !{!12, !10}
!13 = distinct !{!13, !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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@N = external dso_local global i32, align 4
@A = external dso_local global [100010 x i32], align 16
@X = external dso_local global [100010 x i32], align 16
@Y = external dso_local global [3 x i32], align 4
@_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 i32, align 4
  %3 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %4 = load i32, ptr @N, 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) #5
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @X, ptr noundef nonnull getelementptr inbounds (i8, ptr @X, i64 400040), ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  %6 = load i32, ptr @N, align 4, !tbaa !5
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.lr.ph25.preheader, label %vector.body.preheader

.lr.ph25.preheader:                               ; preds = %._crit_edge
  %wide.trip.count = zext nneg i32 %6 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %8 = icmp ult i32 %6, 4
  br i1 %8, label %vector.body.preheader.loopexit.unr-lcssa, label %.lr.ph25.preheader.new

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

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %9 = getelementptr inbounds [100010 x i32], ptr @A, i64 0, i64 %indvars.iv
  %10 = 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) %9)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %11 = load i32, ptr @N, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = icmp slt i64 %indvars.iv.next, %12
  br i1 %13, label %.lr.ph, label %._crit_edge, !llvm.loop !9

vector.body:                                      ; preds = %vector.body.preheader, %pred.store.continue54
  %index = phi i64 [ %index.next, %pred.store.continue54 ], [ 0, %vector.body.preheader ]
  %14 = or disjoint i64 %index, 4
  %15 = getelementptr inbounds [100010 x i32], ptr @X, i64 0, i64 %index
  %16 = getelementptr inbounds i8, ptr %15, i64 16
  %wide.load = load <4 x i32>, ptr %15, align 16, !tbaa !5
  %wide.load40 = load <4 x i32>, ptr %16, align 16, !tbaa !5
  %17 = icmp sgt <4 x i32> %wide.load, <i32 2, i32 2, i32 2, i32 2>
  %18 = icmp sgt <4 x i32> %wide.load40, <i32 2, i32 2, i32 2, i32 2>
  %19 = extractelement <4 x i1> %17, i64 0
  br i1 %19, label %pred.store.if, label %pred.store.continue

pred.store.if:                                    ; preds = %vector.body
  %20 = extractelement <4 x i32> %wide.load, i64 0
  %21 = and i32 %20, 1
  %22 = icmp eq i32 %21, 0
  %23 = getelementptr inbounds [100010 x i32], ptr @X, i64 0, i64 %index
  %24 = select i1 %22, i32 2, i32 1
  store i32 %24, ptr %23, align 16, !tbaa !5
  br label %pred.store.continue

pred.store.continue:                              ; preds = %pred.store.if, %vector.body
  %25 = extractelement <4 x i1> %17, i64 1
  br i1 %25, label %pred.store.if41, label %pred.store.continue42

pred.store.if41:                                  ; preds = %pred.store.continue
  %26 = or disjoint i64 %index, 1
  %27 = extractelement <4 x i32> %wide.load, i64 1
  %28 = and i32 %27, 1
  %29 = icmp eq i32 %28, 0
  %30 = getelementptr inbounds [100010 x i32], ptr @X, i64 0, i64 %26
  %31 = select i1 %29, i32 2, i32 1
  store i32 %31, ptr %30, align 4, !tbaa !5
  br label %pred.store.continue42

pred.store.continue42:                            ; preds = %pred.store.if41, %pred.store.continue
  %32 = extractelement <4 x i1> %17, i64 2
  br i1 %32, label %pred.store.if43, label %pred.store.continue44

pred.store.if43:                                  ; preds = %pred.store.continue42
  %33 = or disjoint i64 %index, 2
  %34 = extractelement <4 x i32> %wide.load, i64 2
  %35 = and i32 %34, 1
  %36 = icmp eq i32 %35, 0
  %37 = getelementptr inbounds [100010 x i32], ptr @X, i64 0, i64 %33
  %38 = select i1 %36, i32 2, i32 1
  store i32 %38, ptr %37, align 8, !tbaa !5
  br label %pred.store.continue44

pred.store.continue44:                            ; preds = %pred.store.if43, %pred.store.continue42
  %39 = extractelement <4 x i1> %17, i64 3
  br i1 %39, label %pred.store.if45, label %pred.store.continue46

pred.store.if45:                                  ; preds = %pred.store.continue44
  %40 = or disjoint i64 %index, 3
  %41 = extractelement <4 x i32> %wide.load, i64 3
  %42 = and i32 %41, 1
  %43 = icmp eq i32 %42, 0
  %44 = getelementptr inbounds [100010 x i32], ptr @X, i64 0, i64 %40
  %45 = select i1 %43, i32 2, i32 1
  store i32 %45, ptr %44, align 4, !tbaa !5
  br label %pred.store.continue46

pred.store.continue46:                            ; preds = %pred.store.if45, %pred.store.continue44
  %46 = extractelement <4 x i1> %18, i64 0
  br i1 %46, label %pred.store.if47, label %pred.store.continue48

pred.store.if47:                                  ; preds = %pred.store.continue46
  %47 = extractelement <4 x i32> %wide.load40, i64 0
  %48 = and i32 %47, 1
  %49 = icmp eq i32 %48, 0
  %50 = getelementptr inbounds [100010 x i32], ptr @X, i64 0, i64 %14
  %51 = select i1 %49, i32 2, i32 1
  store i32 %51, ptr %50, align 16, !tbaa !5
  br label %pred.store.continue48

pred.store.continue48:                            ; preds = %pred.store.if47, %pred.store.continue46
  %52 = extractelement <4 x i1> %18, i64 1
  br i1 %52, label %pred.store.if49, label %pred.store.continue50

pred.store.if49:                                  ; preds = %pred.store.continue48
  %53 = or disjoint i64 %index, 5
  %54 = extractelement <4 x i32> %wide.load40, i64 1
  %55 = and i32 %54, 1
  %56 = icmp eq i32 %55, 0
  %57 = getelementptr inbounds [100010 x i32], ptr @X, i64 0, i64 %53
  %58 = select i1 %56, i32 2, i32 1
  store i32 %58, ptr %57, align 4, !tbaa !5
  br label %pred.store.continue50

pred.store.continue50:                            ; preds = %pred.store.if49, %pred.store.continue48
  %59 = extractelement <4 x i1> %18, i64 2
  br i1 %59, label %pred.store.if51, label %pred.store.continue52

pred.store.if51:                                  ; preds = %pred.store.continue50
  %60 = or disjoint i64 %index, 6
  %61 = extractelement <4 x i32> %wide.load40, i64 2
  %62 = and i32 %61, 1
  %63 = icmp eq i32 %62, 0
  %64 = getelementptr inbounds [100010 x i32], ptr @X, i64 0, i64 %60
  %65 = select i1 %63, i32 2, i32 1
  store i32 %65, ptr %64, align 8, !tbaa !5
  br label %pred.store.continue52

pred.store.continue52:                            ; preds = %pred.store.if51, %pred.store.continue50
  %66 = extractelement <4 x i1> %18, i64 3
  br i1 %66, label %pred.store.if53, label %pred.store.continue54

pred.store.if53:                                  ; preds = %pred.store.continue52
  %67 = or disjoint i64 %index, 7
  %68 = extractelement <4 x i32> %wide.load40, i64 3
  %69 = and i32 %68, 1
  %70 = icmp eq i32 %69, 0
  %71 = getelementptr inbounds [100010 x i32], ptr @X, i64 0, i64 %67
  %72 = select i1 %70, i32 2, i32 1
  store i32 %72, ptr %71, align 4, !tbaa !5
  br label %pred.store.continue54

pred.store.continue54:                            ; preds = %pred.store.if53, %pred.store.continue52
  %index.next = add nuw i64 %index, 8
  %73 = icmp eq i64 %index.next, 100008
  br i1 %73, label %scalar.ph, label %vector.body, !llvm.loop !11

.lr.ph25:                                         ; preds = %.lr.ph25, %.lr.ph25.preheader.new
  %indvars.iv29 = phi i64 [ 0, %.lr.ph25.preheader.new ], [ %indvars.iv.next30.3, %.lr.ph25 ]
  %niter = phi i64 [ 0, %.lr.ph25.preheader.new ], [ %niter.next.3, %.lr.ph25 ]
  %74 = getelementptr inbounds [100010 x i32], ptr @A, i64 0, i64 %indvars.iv29
  %75 = load i32, ptr %74, align 16, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [100010 x i32], ptr @X, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %77, align 4, !tbaa !5
  %indvars.iv.next30 = or disjoint i64 %indvars.iv29, 1
  %80 = getelementptr inbounds [100010 x i32], ptr @A, i64 0, i64 %indvars.iv.next30
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [100010 x i32], ptr @X, i64 0, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %83, align 4, !tbaa !5
  %indvars.iv.next30.1 = or disjoint i64 %indvars.iv29, 2
  %86 = getelementptr inbounds [100010 x i32], ptr @A, i64 0, i64 %indvars.iv.next30.1
  %87 = load i32, ptr %86, align 8, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [100010 x i32], ptr @X, i64 0, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %89, align 4, !tbaa !5
  %indvars.iv.next30.2 = or disjoint i64 %indvars.iv29, 3
  %92 = getelementptr inbounds [100010 x i32], ptr @A, i64 0, i64 %indvars.iv.next30.2
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [100010 x i32], ptr @X, i64 0, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %95, align 4, !tbaa !5
  %indvars.iv.next30.3 = add nuw nsw i64 %indvars.iv29, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %vector.body.preheader.loopexit.unr-lcssa, label %.lr.ph25, !llvm.loop !14

vector.body.preheader.loopexit.unr-lcssa:         ; preds = %.lr.ph25, %.lr.ph25.preheader
  %indvars.iv29.unr = phi i64 [ 0, %.lr.ph25.preheader ], [ %indvars.iv.next30.3, %.lr.ph25 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %vector.body.preheader, label %.lr.ph25.epil

.lr.ph25.epil:                                    ; preds = %vector.body.preheader.loopexit.unr-lcssa, %.lr.ph25.epil
  %indvars.iv29.epil = phi i64 [ %indvars.iv.next30.epil, %.lr.ph25.epil ], [ %indvars.iv29.unr, %vector.body.preheader.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph25.epil ], [ 0, %vector.body.preheader.loopexit.unr-lcssa ]
  %98 = getelementptr inbounds [100010 x i32], ptr @A, i64 0, i64 %indvars.iv29.epil
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [100010 x i32], ptr @X, i64 0, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %101, align 4, !tbaa !5
  %indvars.iv.next30.epil = add nuw nsw i64 %indvars.iv29.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %vector.body.preheader, label %.lr.ph25.epil, !llvm.loop !15

vector.body.preheader:                            ; preds = %vector.body.preheader.loopexit.unr-lcssa, %.lr.ph25.epil, %._crit_edge
  br label %vector.body

scalar.ph:                                        ; preds = %pred.store.continue54
  %104 = load i32, ptr getelementptr inbounds (i8, ptr @X, i64 400032), align 16, !tbaa !5
  %105 = icmp sgt i32 %104, 2
  br i1 %105, label %.sink.split, label %scalar.ph.1

.sink.split:                                      ; preds = %scalar.ph
  %106 = and i32 %104, 1
  %107 = icmp eq i32 %106, 0
  %. = select i1 %107, i32 2, i32 1
  store i32 %., ptr getelementptr inbounds (i8, ptr @X, i64 400032), align 16, !tbaa !5
  br label %scalar.ph.1

scalar.ph.1:                                      ; preds = %.sink.split, %scalar.ph
  %108 = load i32, ptr getelementptr inbounds (i8, ptr @X, i64 400036), align 4, !tbaa !5
  %109 = icmp sgt i32 %108, 2
  br i1 %109, label %.sink.split.1, label %.loopexit

.sink.split.1:                                    ; preds = %scalar.ph.1
  %110 = and i32 %108, 1
  %111 = icmp eq i32 %110, 0
  %..1 = select i1 %111, i32 2, i32 1
  store i32 %..1, ptr getelementptr inbounds (i8, ptr @X, i64 400036), align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.sink.split.1, %scalar.ph.1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @Y, ptr noundef nonnull getelementptr inbounds (i8, ptr @Y, i64 12), ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  br label %117

112:                                              ; preds = %117
  %113 = load i32, ptr getelementptr inbounds (i8, ptr @Y, i64 8), align 4, !tbaa !5
  %114 = load i32, ptr getelementptr inbounds (i8, ptr @Y, i64 4), align 4, !tbaa !5
  %.0.v = and i32 %113, -2
  %.0 = add i32 %114, %.0.v
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.0)
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %115, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

117:                                              ; preds = %117, %.loopexit
  %indvars.iv36 = phi i64 [ 0, %.loopexit ], [ %indvars.iv.next37.1, %117 ]
  %118 = getelementptr inbounds [100010 x i32], ptr @X, i64 0, i64 %indvars.iv36
  %119 = load i32, ptr %118, align 8, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [3 x i32], ptr @Y, i64 0, i64 %120
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %121, align 4, !tbaa !5
  %indvars.iv.next37 = or disjoint i64 %indvars.iv36, 1
  %124 = getelementptr inbounds [100010 x i32], ptr @X, i64 0, i64 %indvars.iv.next37
  %125 = load i32, ptr %124, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [3 x i32], ptr @Y, i64 0, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %127, align 4, !tbaa !5
  %indvars.iv.next37.1 = add nuw nsw i64 %indvars.iv36, 2
  %exitcond39.not.1 = icmp eq i64 %indvars.iv.next37.1, 100010
  br i1 %exitcond39.not.1, label %112, label %117, !llvm.loop !17
}

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

; 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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #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 = { 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 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 = { 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, !13}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.unroll.disable"}
!17 = distinct !{!17, !10}


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