; LLVM IR from lzyrapx/Competitive-Programming :: LibreOJ (6091（构造）)

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

@a = external dso_local global [1010 x i32], align 16
@b = external dso_local global [1010 x i32], align 16
@d = external dso_local global [1010 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = 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
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %14

14:                                               ; preds = %32, %0
  %15 = load i32, ptr %3, align 4, !tbaa !5
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = icmp sle i32 %15, %16
  br i1 %17, label %19, label %18

18:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %35

19:                                               ; preds = %14
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [1010 x i32], ptr @a, i64 0, i64 %21
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %22)
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [1010 x i32], ptr @a, i64 0, i64 %25
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [1010 x i32], ptr @d, i64 0, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %29, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %19
  %33 = load i32, ptr %3, align 4, !tbaa !5
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %3, align 4, !tbaa !5
  br label %14, !llvm.loop !9

35:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %36

36:                                               ; preds = %46, %35
  %37 = load i32, ptr %4, align 4, !tbaa !5
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = icmp sle i32 %37, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %49

41:                                               ; preds = %36
  %42 = load i32, ptr %4, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [1010 x i32], ptr @b, i64 0, i64 %43
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %44)
  br label %46

46:                                               ; preds = %41
  %47 = load i32, ptr %4, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %4, align 4, !tbaa !5
  br label %36, !llvm.loop !11

49:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %72, %49
  %51 = load i32, ptr %7, align 4, !tbaa !5
  %52 = load i32, ptr %2, align 4, !tbaa !5
  %53 = icmp sle i32 %51, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %75

55:                                               ; preds = %50
  %56 = load i32, ptr %7, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [1010 x i32], ptr @d, i64 0, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = icmp eq i32 %59, 2
  br i1 %60, label %61, label %63

61:                                               ; preds = %55
  %62 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %62, ptr %5, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %61, %55
  %64 = load i32, ptr %7, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [1010 x i32], ptr @d, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %69, label %71

69:                                               ; preds = %63
  %70 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %70, ptr %6, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %69, %63
  br label %72

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

75:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %140, %75
  %77 = load i32, ptr %8, align 4, !tbaa !5
  %78 = load i32, ptr %2, align 4, !tbaa !5
  %79 = icmp sle i32 %77, %78
  br i1 %79, label %81, label %80

80:                                               ; preds = %76
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %143

81:                                               ; preds = %76
  %82 = load i32, ptr %8, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [1010 x i32], ptr @a, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = load i32, ptr %5, align 4, !tbaa !5
  %87 = icmp eq i32 %85, %86
  br i1 %87, label %88, label %139

88:                                               ; preds = %81
  %89 = load i32, ptr %6, align 4, !tbaa !5
  %90 = load i32, ptr %8, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [1010 x i32], ptr @a, i64 0, i64 %91
  store i32 %89, ptr %92, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %93

93:                                               ; preds = %112, %88
  %94 = load i32, ptr %11, align 4, !tbaa !5
  %95 = load i32, ptr %2, align 4, !tbaa !5
  %96 = icmp sle i32 %94, %95
  br i1 %96, label %98, label %97

97:                                               ; preds = %93
  store i32 14, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %115

98:                                               ; preds = %93
  %99 = load i32, ptr %11, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [1010 x i32], ptr @a, i64 0, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = load i32, ptr %11, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [1010 x i32], ptr @b, i64 0, i64 %104
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = icmp ne i32 %102, %106
  br i1 %107, label %108, label %111

108:                                              ; preds = %98
  %109 = load i32, ptr %10, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %10, align 4, !tbaa !5
  br label %111

111:                                              ; preds = %108, %98
  br label %112

112:                                              ; preds = %111
  %113 = load i32, ptr %11, align 4, !tbaa !5
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %11, align 4, !tbaa !5
  br label %93, !llvm.loop !13

115:                                              ; preds = %97
  %116 = load i32, ptr %10, align 4, !tbaa !5
  %117 = icmp eq i32 %116, 1
  br i1 %117, label %118, label %134

118:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %130, %118
  %120 = load i32, ptr %12, align 4, !tbaa !5
  %121 = load i32, ptr %2, align 4, !tbaa !5
  %122 = icmp sle i32 %120, %121
  br i1 %122, label %124, label %123

123:                                              ; preds = %119
  store i32 17, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %133

124:                                              ; preds = %119
  %125 = load i32, ptr %12, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [1010 x i32], ptr @a, i64 0, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %128)
  br label %130

130:                                              ; preds = %124
  %131 = load i32, ptr %12, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %12, align 4, !tbaa !5
  br label %119, !llvm.loop !14

133:                                              ; preds = %123
  call void @exit(i32 noundef 0) #5
  unreachable

134:                                              ; preds = %115
  %135 = load i32, ptr %5, align 4, !tbaa !5
  %136 = load i32, ptr %8, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [1010 x i32], ptr @a, i64 0, i64 %137
  store i32 %135, ptr %138, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %139

139:                                              ; preds = %134, %81
  br label %140

140:                                              ; preds = %139
  %141 = load i32, ptr %8, align 4, !tbaa !5
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %8, align 4, !tbaa !5
  br label %76, !llvm.loop !15

143:                                              ; preds = %80
  store i32 0, ptr %1, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  %144 = load i32, ptr %1, align 4
  ret i32 %144
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #2

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

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { noreturn nounwind "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 = { nounwind }
attributes #5 = { noreturn 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}
!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::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 }

@a = external dso_local global [1010 x i32], align 16
@b = external dso_local global [1010 x i32], align 16
@d = external dso_local local_unnamed_addr global [1010 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = 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
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %2 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %3 = load i32, ptr %1, align 4, !tbaa !5
  %.not51 = icmp slt i32 %3, 1
  br i1 %.not51, label %._crit_edge71, label %.lr.ph

.preheader50:                                     ; preds = %.lr.ph
  %.not4153 = icmp slt i32 %11, 1
  br i1 %.not4153, label %._crit_edge71, label %.lr.ph55

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %4 = getelementptr inbounds [1010 x i32], ptr @a, i64 0, i64 %indvars.iv
  %5 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %6 = load i32, ptr %4, align 4, !tbaa !5
  %7 = sext i32 %6 to i64
  %8 = getelementptr inbounds [1010 x i32], ptr @d, i64 0, i64 %7
  %9 = load i32, ptr %8, align 4, !tbaa !5
  %10 = add nsw i32 %9, 1
  store i32 %10, ptr %8, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %11 = load i32, ptr %1, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %.not.not = icmp slt i64 %indvars.iv, %12
  br i1 %.not.not, label %.lr.ph, label %.preheader50, !llvm.loop !9

.preheader49:                                     ; preds = %.lr.ph55
  %.not4256 = icmp slt i32 %17, 1
  br i1 %.not4256, label %._crit_edge71, label %.lr.ph60.preheader

.lr.ph60.preheader:                               ; preds = %.preheader49
  %13 = zext nneg i32 %17 to i64
  %xtraiter = and i64 %13, 3
  %14 = icmp ult i32 %17, 4
  br i1 %14, label %.preheader48.unr-lcssa, label %.lr.ph60.preheader.new

.lr.ph60.preheader.new:                           ; preds = %.lr.ph60.preheader
  %unroll_iter = and i64 %13, 2147483644
  br label %.lr.ph60

.lr.ph55:                                         ; preds = %.preheader50, %.lr.ph55
  %indvars.iv79 = phi i64 [ %indvars.iv.next80, %.lr.ph55 ], [ 1, %.preheader50 ]
  %15 = getelementptr inbounds [1010 x i32], ptr @b, i64 0, i64 %indvars.iv79
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %17 = load i32, ptr %1, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %.not41.not = icmp slt i64 %indvars.iv79, %18
  br i1 %.not41.not, label %.lr.ph55, label %.preheader49, !llvm.loop !11

.preheader48.unr-lcssa:                           ; preds = %.lr.ph60, %.lr.ph60.preheader
  %spec.select.lcssa.ph = phi i32 [ poison, %.lr.ph60.preheader ], [ %spec.select.3, %.lr.ph60 ]
  %.136.lcssa.ph = phi i32 [ poison, %.lr.ph60.preheader ], [ %.136.3, %.lr.ph60 ]
  %indvars.iv82.unr = phi i64 [ 1, %.lr.ph60.preheader ], [ %indvars.iv.next83.3, %.lr.ph60 ]
  %.03558.unr = phi i32 [ undef, %.lr.ph60.preheader ], [ %.136.3, %.lr.ph60 ]
  %.03757.unr = phi i32 [ undef, %.lr.ph60.preheader ], [ %spec.select.3, %.lr.ph60 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader48, label %.lr.ph60.epil

.lr.ph60.epil:                                    ; preds = %.preheader48.unr-lcssa, %.lr.ph60.epil
  %indvars.iv82.epil = phi i64 [ %indvars.iv.next83.epil, %.lr.ph60.epil ], [ %indvars.iv82.unr, %.preheader48.unr-lcssa ]
  %.03558.epil = phi i32 [ %.136.epil, %.lr.ph60.epil ], [ %.03558.unr, %.preheader48.unr-lcssa ]
  %.03757.epil = phi i32 [ %spec.select.epil, %.lr.ph60.epil ], [ %.03757.unr, %.preheader48.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph60.epil ], [ 0, %.preheader48.unr-lcssa ]
  %19 = getelementptr inbounds [1010 x i32], ptr @d, i64 0, i64 %indvars.iv82.epil
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = icmp eq i32 %20, 2
  %22 = trunc nuw nsw i64 %indvars.iv82.epil to i32
  %spec.select.epil = select i1 %21, i32 %22, i32 %.03757.epil
  %23 = icmp eq i32 %20, 0
  %.136.epil = select i1 %23, i32 %22, i32 %.03558.epil
  %indvars.iv.next83.epil = add nuw nsw i64 %indvars.iv82.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 %.preheader48, label %.lr.ph60.epil, !llvm.loop !12

.preheader48:                                     ; preds = %.lr.ph60.epil, %.preheader48.unr-lcssa
  %spec.select.lcssa = phi i32 [ %spec.select.lcssa.ph, %.preheader48.unr-lcssa ], [ %spec.select.epil, %.lr.ph60.epil ]
  %.136.lcssa = phi i32 [ %.136.lcssa.ph, %.preheader48.unr-lcssa ], [ %.136.epil, %.lr.ph60.epil ]
  br i1 %.not4256, label %._crit_edge71, label %.lr.ph70.split.preheader

.lr.ph70.split.preheader:                         ; preds = %.preheader48
  %24 = add nuw i32 %17, 1
  %wide.trip.count93 = zext i32 %24 to i64
  %25 = zext nneg i32 %17 to i64
  %min.iters.check = icmp ult i32 %17, 8
  %n.vec = and i64 %25, 2147483640
  %ind.end = or disjoint i64 %n.vec, 1
  %cmp.n = icmp eq i64 %n.vec, %25
  br label %.lr.ph70.split

.lr.ph60:                                         ; preds = %.lr.ph60, %.lr.ph60.preheader.new
  %indvars.iv82 = phi i64 [ 1, %.lr.ph60.preheader.new ], [ %indvars.iv.next83.3, %.lr.ph60 ]
  %.03558 = phi i32 [ undef, %.lr.ph60.preheader.new ], [ %.136.3, %.lr.ph60 ]
  %.03757 = phi i32 [ undef, %.lr.ph60.preheader.new ], [ %spec.select.3, %.lr.ph60 ]
  %niter = phi i64 [ 0, %.lr.ph60.preheader.new ], [ %niter.next.3, %.lr.ph60 ]
  %26 = getelementptr inbounds [1010 x i32], ptr @d, i64 0, i64 %indvars.iv82
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = icmp eq i32 %27, 2
  %29 = trunc nuw nsw i64 %indvars.iv82 to i32
  %spec.select = select i1 %28, i32 %29, i32 %.03757
  %30 = icmp eq i32 %27, 0
  %.136 = select i1 %30, i32 %29, i32 %.03558
  %indvars.iv.next83 = add nuw nsw i64 %indvars.iv82, 1
  %31 = getelementptr inbounds [1010 x i32], ptr @d, i64 0, i64 %indvars.iv.next83
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = icmp eq i32 %32, 2
  %34 = trunc nuw nsw i64 %indvars.iv.next83 to i32
  %spec.select.1 = select i1 %33, i32 %34, i32 %spec.select
  %35 = icmp eq i32 %32, 0
  %.136.1 = select i1 %35, i32 %34, i32 %.136
  %indvars.iv.next83.1 = add nuw nsw i64 %indvars.iv82, 2
  %36 = getelementptr inbounds [1010 x i32], ptr @d, i64 0, i64 %indvars.iv.next83.1
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = icmp eq i32 %37, 2
  %39 = trunc nuw nsw i64 %indvars.iv.next83.1 to i32
  %spec.select.2 = select i1 %38, i32 %39, i32 %spec.select.1
  %40 = icmp eq i32 %37, 0
  %.136.2 = select i1 %40, i32 %39, i32 %.136.1
  %indvars.iv.next83.2 = add nuw nsw i64 %indvars.iv82, 3
  %41 = getelementptr inbounds [1010 x i32], ptr @d, i64 0, i64 %indvars.iv.next83.2
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = icmp eq i32 %42, 2
  %44 = trunc nuw nsw i64 %indvars.iv.next83.2 to i32
  %spec.select.3 = select i1 %43, i32 %44, i32 %spec.select.2
  %45 = icmp eq i32 %42, 0
  %.136.3 = select i1 %45, i32 %44, i32 %.136.2
  %indvars.iv.next83.3 = add nuw nsw i64 %indvars.iv82, 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 %.preheader48.unr-lcssa, label %.lr.ph60, !llvm.loop !14

._crit_edge71:                                    ; preds = %73, %.preheader49, %0, %.preheader50, %.preheader48
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

.lr.ph70.split:                                   ; preds = %.lr.ph70.split.preheader, %73
  %indvars.iv90 = phi i64 [ 1, %.lr.ph70.split.preheader ], [ %indvars.iv.next91, %73 ]
  %46 = getelementptr inbounds [1010 x i32], ptr @a, i64 0, i64 %indvars.iv90
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = icmp eq i32 %47, %spec.select.lcssa
  br i1 %48, label %.lr.ph66, label %73

.lr.ph66:                                         ; preds = %.lr.ph70.split
  store i32 %.136.lcssa, ptr %46, align 4, !tbaa !5
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.body

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph66
  %indvars.iv85.ph = phi i64 [ 1, %.lr.ph66 ], [ %ind.end, %middle.block ]
  %.03264.ph = phi i32 [ 0, %.lr.ph66 ], [ %60, %middle.block ]
  br label %scalar.ph

vector.body:                                      ; preds = %.lr.ph66, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.lr.ph66 ]
  %vec.phi = phi <4 x i32> [ %57, %vector.body ], [ zeroinitializer, %.lr.ph66 ]
  %vec.phi108 = phi <4 x i32> [ %58, %vector.body ], [ zeroinitializer, %.lr.ph66 ]
  %offset.idx = or disjoint i64 %index, 1
  %49 = getelementptr inbounds [1010 x i32], ptr @a, i64 0, i64 %offset.idx
  %50 = getelementptr inbounds i8, ptr %49, i64 16
  %wide.load = load <4 x i32>, ptr %49, align 4, !tbaa !5
  %wide.load109 = load <4 x i32>, ptr %50, align 4, !tbaa !5
  %51 = getelementptr inbounds [1010 x i32], ptr @b, i64 0, i64 %offset.idx
  %52 = getelementptr inbounds i8, ptr %51, i64 16
  %wide.load110 = load <4 x i32>, ptr %51, align 4, !tbaa !5
  %wide.load111 = load <4 x i32>, ptr %52, align 4, !tbaa !5
  %53 = icmp ne <4 x i32> %wide.load, %wide.load110
  %54 = icmp ne <4 x i32> %wide.load109, %wide.load111
  %55 = zext <4 x i1> %53 to <4 x i32>
  %56 = zext <4 x i1> %54 to <4 x i32>
  %57 = add <4 x i32> %vec.phi, %55
  %58 = add <4 x i32> %vec.phi108, %56
  %index.next = add nuw i64 %index, 8
  %59 = icmp eq i64 %index.next, %n.vec
  br i1 %59, label %middle.block, label %vector.body, !llvm.loop !15

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %58, %57
  %60 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

._crit_edge:                                      ; preds = %scalar.ph, %middle.block
  %spec.select47.lcssa = phi i32 [ %60, %middle.block ], [ %spec.select47, %scalar.ph ]
  %61 = icmp eq i32 %spec.select47.lcssa, 1
  br i1 %61, label %.lr.ph74, label %72

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv85 = phi i64 [ %indvars.iv.next86, %scalar.ph ], [ %indvars.iv85.ph, %scalar.ph.preheader ]
  %.03264 = phi i32 [ %spec.select47, %scalar.ph ], [ %.03264.ph, %scalar.ph.preheader ]
  %62 = getelementptr inbounds [1010 x i32], ptr @a, i64 0, i64 %indvars.iv85
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = getelementptr inbounds [1010 x i32], ptr @b, i64 0, i64 %indvars.iv85
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %.not46 = icmp ne i32 %63, %65
  %66 = zext i1 %.not46 to i32
  %spec.select47 = add nuw nsw i32 %.03264, %66
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %exitcond89.not = icmp eq i64 %indvars.iv.next86, %wide.trip.count93
  br i1 %exitcond89.not, label %._crit_edge, label %scalar.ph, !llvm.loop !18

._crit_edge75:                                    ; preds = %.lr.ph74
  call void @exit(i32 noundef 0) #7
  unreachable

.lr.ph74:                                         ; preds = %._crit_edge, %.lr.ph74
  %indvars.iv95 = phi i64 [ %indvars.iv.next96, %.lr.ph74 ], [ 1, %._crit_edge ]
  %67 = getelementptr inbounds [1010 x i32], ptr @a, i64 0, i64 %indvars.iv95
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %68)
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %70 = load i32, ptr %1, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %.not45.not = icmp slt i64 %indvars.iv95, %71
  br i1 %.not45.not, label %.lr.ph74, label %._crit_edge75, !llvm.loop !19

72:                                               ; preds = %._crit_edge
  store i32 %spec.select.lcssa, ptr %46, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %.lr.ph70.split, %72
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %exitcond94.not = icmp eq i64 %indvars.iv.next91, %wide.trip.count93
  br i1 %exitcond94.not, label %._crit_edge71, label %.lr.ph70.split, !llvm.loop !20
}

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #5

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { nofree nounwind "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 = { noreturn nounwind "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { noreturn 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, !13}
!13 = !{!"llvm.loop.unroll.disable"}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10, !16, !17}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = distinct !{!18, !10, !17, !16}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass