; LLVM IR from lzyrapx/Competitive-Programming :: HDUOJ (2153)

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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@_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 [100 x [100 x i32]], align 16
  %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
  call void @llvm.lifetime.start.p0(i64 40000, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  br label %9

9:                                                ; preds = %121, %17, %0
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %11 = load i32, ptr %3, align 4, !tbaa !5
  %12 = icmp ne i32 %11, 0
  br i1 %12, label %13, label %122

13:                                               ; preds = %9
  %14 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %14, i8 0, i64 40000, i1 false)
  store i32 0, ptr %6, align 4, !tbaa !5
  store i32 0, ptr %5, align 4, !tbaa !5
  store i32 0, ptr %4, align 4, !tbaa !5
  %15 = load i32, ptr %3, align 4, !tbaa !5
  %16 = icmp eq i32 %15, 1
  br i1 %16, label %17, label %19

17:                                               ; preds = %13
  %18 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  br label %9, !llvm.loop !9

19:                                               ; preds = %13
  br label %20

20:                                               ; preds = %25, %19
  %21 = load i32, ptr %5, align 4, !tbaa !5
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = sub nsw i32 %22, 1
  %24 = icmp slt i32 %21, %23
  br i1 %24, label %25, label %35

25:                                               ; preds = %20
  %26 = load i32, ptr %6, align 4, !tbaa !5
  %27 = add nsw i32 %26, 1
  store i32 %27, ptr %6, align 4, !tbaa !5
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %29
  %31 = load i32, ptr %5, align 4, !tbaa !5
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %5, align 4, !tbaa !5
  %33 = sext i32 %31 to i64
  %34 = getelementptr inbounds [100 x i32], ptr %30, i64 0, i64 %33
  store i32 %27, ptr %34, align 4, !tbaa !5
  br label %20, !llvm.loop !11

35:                                               ; preds = %20
  br label %36

36:                                               ; preds = %41, %35
  %37 = load i32, ptr %4, align 4, !tbaa !5
  %38 = load i32, ptr %3, align 4, !tbaa !5
  %39 = sub nsw i32 %38, 1
  %40 = icmp slt i32 %37, %39
  br i1 %40, label %41, label %51

41:                                               ; preds = %36
  %42 = load i32, ptr %6, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %6, align 4, !tbaa !5
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %4, align 4, !tbaa !5
  %46 = sext i32 %44 to i64
  %47 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %46
  %48 = load i32, ptr %5, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [100 x i32], ptr %47, i64 0, i64 %49
  store i32 %43, ptr %50, align 4, !tbaa !5
  br label %36, !llvm.loop !12

51:                                               ; preds = %36
  br label %52

52:                                               ; preds = %55, %51
  %53 = load i32, ptr %5, align 4, !tbaa !5
  %54 = icmp sgt i32 %53, 0
  br i1 %54, label %55, label %65

55:                                               ; preds = %52
  %56 = load i32, ptr %6, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %6, align 4, !tbaa !5
  %58 = load i32, ptr %4, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %59
  %61 = load i32, ptr %5, align 4, !tbaa !5
  %62 = add nsw i32 %61, -1
  store i32 %62, ptr %5, align 4, !tbaa !5
  %63 = sext i32 %61 to i64
  %64 = getelementptr inbounds [100 x i32], ptr %60, i64 0, i64 %63
  store i32 %57, ptr %64, align 4, !tbaa !5
  br label %52, !llvm.loop !13

65:                                               ; preds = %52
  br label %66

66:                                               ; preds = %72, %65
  %67 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 1
  %68 = getelementptr inbounds [100 x i32], ptr %67, i64 0, i64 0
  %69 = load i32, ptr %68, align 16, !tbaa !5
  %70 = icmp ne i32 %69, 0
  %71 = xor i1 %70, true
  br i1 %71, label %72, label %82

72:                                               ; preds = %66
  %73 = load i32, ptr %6, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %6, align 4, !tbaa !5
  %75 = load i32, ptr %4, align 4, !tbaa !5
  %76 = add nsw i32 %75, -1
  store i32 %76, ptr %4, align 4, !tbaa !5
  %77 = sext i32 %75 to i64
  %78 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %77
  %79 = load i32, ptr %5, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [100 x i32], ptr %78, i64 0, i64 %80
  store i32 %74, ptr %81, align 4, !tbaa !5
  br label %66, !llvm.loop !14

82:                                               ; preds = %66
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %118, %82
  %84 = load i32, ptr %7, align 4, !tbaa !5
  %85 = load i32, ptr %3, align 4, !tbaa !5
  %86 = icmp slt i32 %84, %85
  br i1 %86, label %87, label %121

87:                                               ; preds = %83
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %113, %87
  %89 = load i32, ptr %8, align 4, !tbaa !5
  %90 = load i32, ptr %3, align 4, !tbaa !5
  %91 = icmp slt i32 %89, %90
  br i1 %91, label %92, label %116

92:                                               ; preds = %88
  %93 = load i32, ptr %7, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %94
  %96 = load i32, ptr %8, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [100 x i32], ptr %95, i64 0, i64 %97
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %103, label %101

101:                                              ; preds = %92
  %102 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  br label %112

103:                                              ; preds = %92
  %104 = load i32, ptr %7, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %105
  %107 = load i32, ptr %8, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [100 x i32], ptr %106, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %110)
  br label %112

112:                                              ; preds = %103, %101
  br label %113

113:                                              ; preds = %112
  %114 = load i32, ptr %8, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %8, align 4, !tbaa !5
  br label %88, !llvm.loop !15

116:                                              ; preds = %88
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %118

118:                                              ; preds = %116
  %119 = load i32, ptr %7, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %7, align 4, !tbaa !5
  br label %83, !llvm.loop !16

121:                                              ; preds = %83
  br label %9, !llvm.loop !9

122:                                              ; preds = %9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 40000, ptr %2) #6
  ret i32 0
}

; 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

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

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

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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}
!16 = distinct !{!16, !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" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@_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 [100 x [100 x i32]], align 16
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %3 = 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)
  %4 = load i32, ptr %2, align 4, !tbaa !5
  %.not58 = icmp eq i32 %4, 0
  br i1 %.not58, label %._crit_edge61, label %.lr.ph60

.lr.ph60:                                         ; preds = %0
  %5 = getelementptr inbounds i8, ptr %1, i64 400
  br label %6

6:                                                ; preds = %.lr.ph60, %.backedge
  %7 = phi i32 [ %4, %.lr.ph60 ], [ %22, %.backedge ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40000) %1, i8 0, i64 40000, i1 false)
  %8 = icmp eq i32 %7, 1
  br i1 %8, label %19, label %.preheader36

.preheader36:                                     ; preds = %6
  %9 = add i32 %7, -1
  %10 = icmp sgt i32 %7, 1
  br i1 %10, label %.lr.ph.preheader, label %.preheader33

.lr.ph.preheader:                                 ; preds = %.preheader36
  %wide.trip.count = zext i32 %9 to i64
  %min.iters.check107 = icmp ult i32 %7, 9
  br i1 %min.iters.check107, label %.lr.ph.preheader120, label %vector.ph108

.lr.ph.preheader120:                              ; preds = %middle.block105, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec110, %middle.block105 ]
  br label %.lr.ph

vector.ph108:                                     ; preds = %.lr.ph.preheader
  %n.vec110 = and i64 %wide.trip.count, 2147483640
  br label %vector.body112

vector.body112:                                   ; preds = %vector.body112, %vector.ph108
  %index113 = phi i64 [ 0, %vector.ph108 ], [ %index.next118, %vector.body112 ]
  %vec.ind114 = phi <4 x i64> [ <i64 0, i64 1, i64 2, i64 3>, %vector.ph108 ], [ %vec.ind.next117, %vector.body112 ]
  %11 = trunc <4 x i64> %vec.ind114 to <4 x i32>
  %12 = add <4 x i32> %11, <i32 1, i32 1, i32 1, i32 1>
  %13 = trunc <4 x i64> %vec.ind114 to <4 x i32>
  %14 = add <4 x i32> %13, <i32 5, i32 5, i32 5, i32 5>
  %15 = getelementptr inbounds [100 x i32], ptr %1, i64 0, i64 %index113
  %16 = getelementptr inbounds i8, ptr %15, i64 16
  store <4 x i32> %12, ptr %15, align 16, !tbaa !5
  store <4 x i32> %14, ptr %16, align 16, !tbaa !5
  %index.next118 = add nuw i64 %index113, 8
  %vec.ind.next117 = add <4 x i64> %vec.ind114, <i64 8, i64 8, i64 8, i64 8>
  %17 = icmp eq i64 %index.next118, %n.vec110
  br i1 %17, label %middle.block105, label %vector.body112, !llvm.loop !9

middle.block105:                                  ; preds = %vector.body112
  %18 = extractelement <4 x i32> %14, i64 3
  %cmp.n119 = icmp eq i64 %n.vec110, %wide.trip.count
  br i1 %cmp.n119, label %.preheader35, label %.lr.ph.preheader120

19:                                               ; preds = %6
  %20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  br label %.backedge

.backedge:                                        ; preds = %._crit_edge, %.preheader32, %19
  %21 = 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)
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %.not = icmp eq i32 %22, 0
  br i1 %.not, label %._crit_edge61, label %6, !llvm.loop !13

.preheader35:                                     ; preds = %.lr.ph, %middle.block105
  %indvars.lcssa = phi i32 [ %18, %middle.block105 ], [ %indvars, %.lr.ph ]
  br i1 %10, label %.lr.ph43, label %.preheader34

.lr.ph43:                                         ; preds = %.preheader35
  %23 = zext nneg i32 %9 to i64
  %24 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %wide.trip.count, 3
  %25 = icmp ult i64 %24, 3
  br i1 %25, label %.preheader34.loopexit.unr-lcssa, label %.lr.ph43.new

.lr.ph43.new:                                     ; preds = %.lr.ph43
  %unroll_iter = and i64 %wide.trip.count, 4294967292
  br label %38

.lr.ph:                                           ; preds = %.lr.ph.preheader120, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader120 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %indvars = trunc i64 %indvars.iv.next to i32
  %26 = getelementptr inbounds [100 x i32], ptr %1, i64 0, i64 %indvars.iv
  store i32 %indvars, ptr %26, align 4, !tbaa !5
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader35, label %.lr.ph, !llvm.loop !14

.preheader34.loopexit.unr-lcssa:                  ; preds = %38, %.lr.ph43
  %.lcssa122.ph = phi i32 [ poison, %.lr.ph43 ], [ %45, %38 ]
  %indvars.iv70.unr = phi i64 [ 0, %.lr.ph43 ], [ %indvars.iv.next71.3, %38 ]
  %.142.unr = phi i32 [ %indvars.lcssa, %.lr.ph43 ], [ %45, %38 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader34, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader34.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv70.epil = phi i64 [ %indvars.iv.next71.epil, %.epil.preheader ], [ %indvars.iv70.unr, %.preheader34.loopexit.unr-lcssa ]
  %.142.epil = phi i32 [ %27, %.epil.preheader ], [ %.142.unr, %.preheader34.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.preheader34.loopexit.unr-lcssa ]
  %27 = add nuw nsw i32 %.142.epil, 1
  %indvars.iv.next71.epil = add nuw nsw i64 %indvars.iv70.epil, 1
  %28 = getelementptr inbounds [100 x [100 x i32]], ptr %1, i64 0, i64 %indvars.iv70.epil, i64 %23
  store i32 %27, ptr %28, align 4, !tbaa !5
  %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 %.preheader34, label %.epil.preheader, !llvm.loop !15

.preheader34:                                     ; preds = %.preheader34.loopexit.unr-lcssa, %.epil.preheader, %.preheader35
  %.027.lcssa = phi i32 [ 0, %.preheader35 ], [ %9, %.epil.preheader ], [ %9, %.preheader34.loopexit.unr-lcssa ]
  %.1.lcssa = phi i32 [ %indvars.lcssa, %.preheader35 ], [ %.lcssa122.ph, %.preheader34.loopexit.unr-lcssa ], [ %27, %.epil.preheader ]
  %29 = icmp sgt i32 %9, 0
  br i1 %29, label %.lr.ph48, label %.preheader33

.lr.ph48:                                         ; preds = %.preheader34
  %30 = zext nneg i32 %.027.lcssa to i64
  %31 = zext nneg i32 %9 to i64
  %min.iters.check = icmp ult i32 %7, 9
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph48
  %indvars.iv76.ph = phi i64 [ %31, %.lr.ph48 ], [ %ind.end, %middle.block ]
  %.247.ph = phi i32 [ %.1.lcssa, %.lr.ph48 ], [ %ind.end101, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph48
  %n.vec = and i64 %wide.trip.count, 2147483640
  %ind.end = sub nsw i64 %31, %n.vec
  %.cast = trunc nuw nsw i64 %n.vec to i32
  %ind.end101 = add i32 %.1.lcssa, %.cast
  %.splatinsert = insertelement <4 x i32> poison, i32 %.1.lcssa, i64 0
  %.splat = shufflevector <4 x i32> %.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %induction = add <4 x i32> %.splat, <i32 0, i32 1, i32 2, i32 3>
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ %induction, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %offset.idx = sub i64 %31, %index
  %32 = add nuw nsw <4 x i32> %vec.ind, <i32 1, i32 1, i32 1, i32 1>
  %33 = add <4 x i32> %vec.ind, <i32 5, i32 5, i32 5, i32 5>
  %34 = getelementptr inbounds [100 x [100 x i32]], ptr %1, i64 0, i64 %30, i64 %offset.idx
  %35 = getelementptr inbounds i8, ptr %34, i64 -12
  %36 = getelementptr inbounds i8, ptr %34, i64 -28
  %reverse = shufflevector <4 x i32> %32, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  store <4 x i32> %reverse, ptr %35, align 4, !tbaa !5
  %reverse104 = shufflevector <4 x i32> %33, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  store <4 x i32> %reverse104, ptr %36, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %37 = icmp eq i64 %index.next, %n.vec
  br i1 %37, label %middle.block, label %vector.body, !llvm.loop !17

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.preheader33, label %scalar.ph.preheader

38:                                               ; preds = %38, %.lr.ph43.new
  %indvars.iv70 = phi i64 [ 0, %.lr.ph43.new ], [ %indvars.iv.next71.3, %38 ]
  %.142 = phi i32 [ %indvars.lcssa, %.lr.ph43.new ], [ %45, %38 ]
  %niter = phi i64 [ 0, %.lr.ph43.new ], [ %niter.next.3, %38 ]
  %39 = add nuw nsw i32 %.142, 1
  %indvars.iv.next71 = or disjoint i64 %indvars.iv70, 1
  %40 = getelementptr inbounds [100 x [100 x i32]], ptr %1, i64 0, i64 %indvars.iv70, i64 %23
  store i32 %39, ptr %40, align 4, !tbaa !5
  %41 = add nuw nsw i32 %.142, 2
  %indvars.iv.next71.1 = or disjoint i64 %indvars.iv70, 2
  %42 = getelementptr inbounds [100 x [100 x i32]], ptr %1, i64 0, i64 %indvars.iv.next71, i64 %23
  store i32 %41, ptr %42, align 4, !tbaa !5
  %43 = add nuw nsw i32 %.142, 3
  %indvars.iv.next71.2 = or disjoint i64 %indvars.iv70, 3
  %44 = getelementptr inbounds [100 x [100 x i32]], ptr %1, i64 0, i64 %indvars.iv.next71.1, i64 %23
  store i32 %43, ptr %44, align 4, !tbaa !5
  %45 = add nuw nsw i32 %.142, 4
  %indvars.iv.next71.3 = add nuw nsw i64 %indvars.iv70, 4
  %46 = getelementptr inbounds [100 x [100 x i32]], ptr %1, i64 0, i64 %indvars.iv.next71.2, i64 %23
  store i32 %45, ptr %46, align 4, !tbaa !5
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader34.loopexit.unr-lcssa, label %38, !llvm.loop !18

.preheader33:                                     ; preds = %scalar.ph, %middle.block, %.preheader36, %.preheader34
  %.027.lcssa98 = phi i32 [ %.027.lcssa, %.preheader34 ], [ 0, %.preheader36 ], [ %.027.lcssa, %middle.block ], [ %.027.lcssa, %scalar.ph ]
  %.126.lcssa = phi i32 [ %9, %.preheader34 ], [ 0, %.preheader36 ], [ 0, %middle.block ], [ 0, %scalar.ph ]
  %.2.lcssa = phi i32 [ %.1.lcssa, %.preheader34 ], [ 0, %.preheader36 ], [ %ind.end101, %middle.block ], [ %50, %scalar.ph ]
  %47 = load i32, ptr %5, align 16, !tbaa !5
  %.not3051 = icmp eq i32 %47, 0
  br i1 %.not3051, label %.lr.ph54, label %.preheader32

.lr.ph54:                                         ; preds = %.preheader33
  %48 = sext i32 %.126.lcssa to i64
  %49 = zext nneg i32 %.027.lcssa98 to i64
  br label %54

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv76 = phi i64 [ %indvars.iv.next77, %scalar.ph ], [ %indvars.iv76.ph, %scalar.ph.preheader ]
  %.247 = phi i32 [ %50, %scalar.ph ], [ %.247.ph, %scalar.ph.preheader ]
  %50 = add nuw nsw i32 %.247, 1
  %indvars.iv.next77 = add nsw i64 %indvars.iv76, -1
  %51 = getelementptr inbounds [100 x [100 x i32]], ptr %1, i64 0, i64 %30, i64 %indvars.iv76
  store i32 %50, ptr %51, align 4, !tbaa !5
  %52 = icmp ugt i64 %indvars.iv76, 1
  br i1 %52, label %scalar.ph, label %.preheader33, !llvm.loop !19

.preheader32:                                     ; preds = %54, %.preheader33
  %53 = icmp sgt i32 %7, 0
  br i1 %53, label %.preheader, label %.backedge, !llvm.loop !13

54:                                               ; preds = %.lr.ph54, %54
  %indvars.iv80 = phi i64 [ %49, %.lr.ph54 ], [ %indvars.iv.next81, %54 ]
  %.353 = phi i32 [ %.2.lcssa, %.lr.ph54 ], [ %55, %54 ]
  %55 = add nuw nsw i32 %.353, 1
  %indvars.iv.next81 = add nsw i64 %indvars.iv80, -1
  %56 = getelementptr inbounds [100 x [100 x i32]], ptr %1, i64 0, i64 %indvars.iv80, i64 %48
  store i32 %55, ptr %56, align 4, !tbaa !5
  %57 = load i32, ptr %5, align 16, !tbaa !5
  %.not30 = icmp eq i32 %57, 0
  br i1 %.not30, label %54, label %.preheader32, !llvm.loop !20

.preheader:                                       ; preds = %.preheader32, %._crit_edge
  %58 = phi i32 [ %71, %._crit_edge ], [ %7, %.preheader32 ]
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %._crit_edge ], [ 0, %.preheader32 ]
  %59 = icmp sgt i32 %58, 0
  br i1 %59, label %.lr.ph56, label %._crit_edge

.lr.ph56:                                         ; preds = %.preheader, %66
  %indvars.iv84 = phi i64 [ %indvars.iv.next85, %66 ], [ 0, %.preheader ]
  %60 = getelementptr inbounds [100 x [100 x i32]], ptr %1, i64 0, i64 %indvars.iv88, i64 %indvars.iv84
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %.not31 = icmp eq i32 %61, 0
  br i1 %.not31, label %62, label %64

62:                                               ; preds = %.lr.ph56
  %63 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %66

64:                                               ; preds = %.lr.ph56
  %65 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %61)
  br label %66

66:                                               ; preds = %62, %64
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %67 = load i32, ptr %2, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = icmp slt i64 %indvars.iv.next85, %68
  br i1 %69, label %.lr.ph56, label %._crit_edge, !llvm.loop !21

._crit_edge:                                      ; preds = %66, %.preheader
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %71 = load i32, ptr %2, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = icmp slt i64 %indvars.iv.next89, %72
  br i1 %73, label %.preheader, label %.backedge, !llvm.loop !22

._crit_edge61:                                    ; preds = %.backedge, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %1) #7
  ret i32 0
}

; 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10, !12, !11}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.unroll.disable"}
!17 = distinct !{!17, !10, !11, !12}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10, !12, !11}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}


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