; LLVM IR from imteekay/algorithms :: competitive-programming/uri (start_grid)

; 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
@_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 [25 x i32], align 16
  %6 = alloca [25 x i32], align 16
  %7 = alloca [25 x i32], align 16
  %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
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 100, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 100, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 100, ptr %7) #5
  br label %15

15:                                               ; preds = %137, %0
  %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) %2)
  %17 = load ptr, ptr %16, align 8, !tbaa !5
  %18 = getelementptr i8, ptr %17, i64 -24
  %19 = load i64, ptr %18, align 8
  %20 = getelementptr inbounds i8, ptr %16, i64 %19
  %21 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %20)
  br i1 %21, label %22, label %141

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

23:                                               ; preds = %34, %22
  %24 = load i32, ptr %8, align 4, !tbaa !8
  %25 = load i32, ptr %2, align 4, !tbaa !8
  %26 = icmp sle i32 %24, %25
  br i1 %26, label %28, label %27

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

28:                                               ; preds = %23
  %29 = 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)
  %30 = load i32, ptr %3, align 4, !tbaa !8
  %31 = load i32, ptr %8, align 4, !tbaa !8
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [25 x i32], ptr %5, i64 0, i64 %32
  store i32 %30, ptr %33, align 4, !tbaa !8
  br label %34

34:                                               ; preds = %28
  %35 = load i32, ptr %8, align 4, !tbaa !8
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %8, align 4, !tbaa !8
  br label %23, !llvm.loop !11

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

38:                                               ; preds = %49, %37
  %39 = load i32, ptr %9, align 4, !tbaa !8
  %40 = load i32, ptr %2, align 4, !tbaa !8
  %41 = icmp sle i32 %39, %40
  br i1 %41, label %43, label %42

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

43:                                               ; preds = %38
  %44 = 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)
  %45 = load i32, ptr %3, align 4, !tbaa !8
  %46 = load i32, ptr %9, align 4, !tbaa !8
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [25 x i32], ptr %6, i64 0, i64 %47
  store i32 %45, ptr %48, align 4, !tbaa !8
  br label %49

49:                                               ; preds = %43
  %50 = load i32, ptr %9, align 4, !tbaa !8
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %9, align 4, !tbaa !8
  br label %38, !llvm.loop !13

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

53:                                               ; preds = %66, %52
  %54 = load i32, ptr %10, align 4, !tbaa !8
  %55 = load i32, ptr %2, align 4, !tbaa !8
  %56 = icmp sle i32 %54, %55
  br i1 %56, label %58, label %57

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

58:                                               ; preds = %53
  %59 = load i32, ptr %10, align 4, !tbaa !8
  %60 = load i32, ptr %10, align 4, !tbaa !8
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [25 x i32], ptr %6, i64 0, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !8
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [25 x i32], ptr %7, i64 0, i64 %64
  store i32 %59, ptr %65, align 4, !tbaa !8
  br label %66

66:                                               ; preds = %58
  %67 = load i32, ptr %10, align 4, !tbaa !8
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %10, align 4, !tbaa !8
  br label %53, !llvm.loop !14

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

70:                                               ; preds = %134, %69
  %71 = load i32, ptr %11, align 4, !tbaa !8
  %72 = load i32, ptr %2, align 4, !tbaa !8
  %73 = icmp sle i32 %71, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %70
  store i32 13, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %137

75:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %76 = load i32, ptr %11, align 4, !tbaa !8
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %13, align 4, !tbaa !8
  br label %78

78:                                               ; preds = %130, %75
  %79 = load i32, ptr %13, align 4, !tbaa !8
  %80 = load i32, ptr %2, align 4, !tbaa !8
  %81 = icmp sle i32 %79, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %78
  store i32 16, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %133

83:                                               ; preds = %78
  %84 = load i32, ptr %11, align 4, !tbaa !8
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [25 x i32], ptr %5, i64 0, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !8
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [25 x i32], ptr %7, i64 0, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !8
  %91 = load i32, ptr %13, align 4, !tbaa !8
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [25 x i32], ptr %5, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !8
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [25 x i32], ptr %7, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !8
  %98 = icmp sgt i32 %90, %97
  br i1 %98, label %99, label %129

99:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %100 = load i32, ptr %11, align 4, !tbaa !8
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [25 x i32], ptr %5, i64 0, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !8
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [25 x i32], ptr %7, i64 0, i64 %104
  %106 = load i32, ptr %105, align 4, !tbaa !8
  store i32 %106, ptr %14, align 4, !tbaa !8
  %107 = load i32, ptr %13, align 4, !tbaa !8
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [25 x i32], ptr %5, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !8
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [25 x i32], ptr %7, i64 0, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !8
  %114 = load i32, ptr %11, align 4, !tbaa !8
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [25 x i32], ptr %5, i64 0, i64 %115
  %117 = load i32, ptr %116, align 4, !tbaa !8
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [25 x i32], ptr %7, i64 0, i64 %118
  store i32 %113, ptr %119, align 4, !tbaa !8
  %120 = load i32, ptr %14, align 4, !tbaa !8
  %121 = load i32, ptr %13, align 4, !tbaa !8
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [25 x i32], ptr %5, i64 0, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !8
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [25 x i32], ptr %7, i64 0, i64 %125
  store i32 %120, ptr %126, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  %127 = load i32, ptr %4, align 4, !tbaa !8
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %4, align 4, !tbaa !8
  br label %129

129:                                              ; preds = %99, %83
  br label %130

130:                                              ; preds = %129
  %131 = load i32, ptr %13, align 4, !tbaa !8
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %13, align 4, !tbaa !8
  br label %78, !llvm.loop !15

133:                                              ; preds = %82
  br label %134

134:                                              ; preds = %133
  %135 = load i32, ptr %11, align 4, !tbaa !8
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %11, align 4, !tbaa !8
  br label %70, !llvm.loop !16

137:                                              ; preds = %74
  %138 = load i32, ptr %4, align 4, !tbaa !8
  %139 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %138)
  %140 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %139, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %15, !llvm.loop !17

141:                                              ; preds = %15
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 100, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 100, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 100, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %142 = load i32, ptr %1, align 4
  ret i32 %142
}

; 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: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) #3 align 2

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 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) #3 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)) #4

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 = { 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 = { 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 #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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


; 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
@_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 = alloca [25 x i32], align 16
  %4 = alloca [25 x i32], align 16
  %5 = alloca [25 x i32], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %5) #5
  %6 = 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)
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr %6, i64 %9
  %11 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %10)
  br i1 %11, label %.preheader38, label %._crit_edge57

.preheader38:                                     ; preds = %0, %._crit_edge
  %12 = load i32, ptr %1, align 4, !tbaa !8
  %.not39 = icmp slt i32 %12, 1
  br i1 %.not39, label %._crit_edge, label %.lr.ph

.preheader37:                                     ; preds = %.lr.ph
  %.not3241 = icmp slt i32 %16, 1
  br i1 %.not3241, label %._crit_edge, label %.lr.ph43

.lr.ph:                                           ; preds = %.preheader38, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.preheader38 ]
  %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)
  %14 = load i32, ptr %2, align 4, !tbaa !8
  %15 = getelementptr inbounds [25 x i32], ptr %3, i64 0, i64 %indvars.iv
  store i32 %14, ptr %15, align 4, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %16 = load i32, ptr %1, align 4, !tbaa !8
  %17 = sext i32 %16 to i64
  %.not.not = icmp slt i64 %indvars.iv, %17
  br i1 %.not.not, label %.lr.ph, label %.preheader37, !llvm.loop !11

.preheader36:                                     ; preds = %.lr.ph43
  %.not3344 = icmp slt i32 %23, 1
  br i1 %.not3344, label %._crit_edge, label %.lr.ph46.preheader

.lr.ph46.preheader:                               ; preds = %.preheader36
  %18 = zext nneg i32 %23 to i64
  %xtraiter = and i64 %18, 3
  %19 = icmp ult i32 %23, 4
  br i1 %19, label %.preheader.unr-lcssa, label %.lr.ph46.preheader.new

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

.lr.ph43:                                         ; preds = %.preheader37, %.lr.ph43
  %indvars.iv60 = phi i64 [ %indvars.iv.next61, %.lr.ph43 ], [ 1, %.preheader37 ]
  %20 = 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)
  %21 = load i32, ptr %2, align 4, !tbaa !8
  %22 = getelementptr inbounds [25 x i32], ptr %4, i64 0, i64 %indvars.iv60
  store i32 %21, ptr %22, align 4, !tbaa !8
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %23 = load i32, ptr %1, align 4, !tbaa !8
  %24 = sext i32 %23 to i64
  %.not32.not = icmp slt i64 %indvars.iv60, %24
  br i1 %.not32.not, label %.lr.ph43, label %.preheader36, !llvm.loop !13

.preheader.unr-lcssa:                             ; preds = %.lr.ph46, %.lr.ph46.preheader
  %indvars.iv63.unr = phi i64 [ 1, %.lr.ph46.preheader ], [ %indvars.iv.next64.3, %.lr.ph46 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.lr.ph46.epil

.lr.ph46.epil:                                    ; preds = %.preheader.unr-lcssa, %.lr.ph46.epil
  %indvars.iv63.epil = phi i64 [ %indvars.iv.next64.epil, %.lr.ph46.epil ], [ %indvars.iv63.unr, %.preheader.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph46.epil ], [ 0, %.preheader.unr-lcssa ]
  %25 = getelementptr inbounds [25 x i32], ptr %4, i64 0, i64 %indvars.iv63.epil
  %26 = load i32, ptr %25, align 4, !tbaa !8
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [25 x i32], ptr %5, i64 0, i64 %27
  %29 = trunc nuw nsw i64 %indvars.iv63.epil to i32
  store i32 %29, ptr %28, align 4, !tbaa !8
  %indvars.iv.next64.epil = add nuw nsw i64 %indvars.iv63.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 %.preheader, label %.lr.ph46.epil, !llvm.loop !14

.preheader:                                       ; preds = %.lr.ph46.epil, %.preheader.unr-lcssa
  br i1 %.not3344, label %._crit_edge, label %.lr.ph55.preheader

.lr.ph55.preheader:                               ; preds = %.preheader
  %30 = add nuw i32 %23, 1
  %31 = zext nneg i32 %23 to i64
  %wide.trip.count75 = zext i32 %30 to i64
  %32 = add nsw i32 %23, -2
  br label %.lr.ph55

.lr.ph46:                                         ; preds = %.lr.ph46, %.lr.ph46.preheader.new
  %indvars.iv63 = phi i64 [ 1, %.lr.ph46.preheader.new ], [ %indvars.iv.next64.3, %.lr.ph46 ]
  %niter = phi i64 [ 0, %.lr.ph46.preheader.new ], [ %niter.next.3, %.lr.ph46 ]
  %33 = getelementptr inbounds [25 x i32], ptr %4, i64 0, i64 %indvars.iv63
  %34 = load i32, ptr %33, align 4, !tbaa !8
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [25 x i32], ptr %5, i64 0, i64 %35
  %37 = trunc nuw nsw i64 %indvars.iv63 to i32
  store i32 %37, ptr %36, align 4, !tbaa !8
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %38 = getelementptr inbounds [25 x i32], ptr %4, i64 0, i64 %indvars.iv.next64
  %39 = load i32, ptr %38, align 4, !tbaa !8
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [25 x i32], ptr %5, i64 0, i64 %40
  %42 = trunc nuw nsw i64 %indvars.iv.next64 to i32
  store i32 %42, ptr %41, align 4, !tbaa !8
  %indvars.iv.next64.1 = add nuw nsw i64 %indvars.iv63, 2
  %43 = getelementptr inbounds [25 x i32], ptr %4, i64 0, i64 %indvars.iv.next64.1
  %44 = load i32, ptr %43, align 4, !tbaa !8
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [25 x i32], ptr %5, i64 0, i64 %45
  %47 = trunc nuw nsw i64 %indvars.iv.next64.1 to i32
  store i32 %47, ptr %46, align 4, !tbaa !8
  %indvars.iv.next64.2 = add nuw nsw i64 %indvars.iv63, 3
  %48 = getelementptr inbounds [25 x i32], ptr %4, i64 0, i64 %indvars.iv.next64.2
  %49 = load i32, ptr %48, align 4, !tbaa !8
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [25 x i32], ptr %5, i64 0, i64 %50
  %52 = trunc nuw nsw i64 %indvars.iv.next64.2 to i32
  store i32 %52, ptr %51, align 4, !tbaa !8
  %indvars.iv.next64.3 = add nuw nsw i64 %indvars.iv63, 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 %.preheader.unr-lcssa, label %.lr.ph46, !llvm.loop !16

.loopexit:                                        ; preds = %.prol.loopexit, %96, %.lr.ph55
  %.1.lcssa = phi i32 [ %.02953, %.lr.ph55 ], [ %.2.lcssa.unr, %.prol.loopexit ], [ %.2.1, %96 ]
  %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1
  %exitcond76.not = icmp eq i64 %indvars.iv.next73, %wide.trip.count75
  %indvar.next = add i32 %indvar, 1
  br i1 %exitcond76.not, label %._crit_edge, label %.lr.ph55, !llvm.loop !17

._crit_edge:                                      ; preds = %.loopexit, %.preheader36, %.preheader38, %.preheader37, %.preheader
  %.029.lcssa = phi i32 [ 0, %.preheader ], [ 0, %.preheader37 ], [ 0, %.preheader38 ], [ 0, %.preheader36 ], [ %.1.lcssa, %.loopexit ]
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.029.lcssa)
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %55 = 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)
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  %57 = getelementptr i8, ptr %56, i64 -24
  %58 = load i64, ptr %57, align 8
  %59 = getelementptr inbounds i8, ptr %55, i64 %58
  %60 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %59)
  br i1 %60, label %.preheader38, label %._crit_edge57, !llvm.loop !18

.lr.ph55:                                         ; preds = %.lr.ph55.preheader, %.loopexit
  %indvar = phi i32 [ 0, %.lr.ph55.preheader ], [ %indvar.next, %.loopexit ]
  %indvars.iv72 = phi i64 [ 1, %.lr.ph55.preheader ], [ %indvars.iv.next73, %.loopexit ]
  %indvars.iv66 = phi i64 [ 2, %.lr.ph55.preheader ], [ %indvars.iv.next67, %.loopexit ]
  %.02953 = phi i32 [ 0, %.lr.ph55.preheader ], [ %.1.lcssa, %.loopexit ]
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %.not3547.not = icmp ult i64 %indvars.iv72, %31
  br i1 %.not3547.not, label %.lr.ph50, label %.loopexit

.lr.ph50:                                         ; preds = %.lr.ph55
  %61 = getelementptr inbounds [25 x i32], ptr %3, i64 0, i64 %indvars.iv72
  %62 = load i32, ptr %61, align 4, !tbaa !8
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [25 x i32], ptr %5, i64 0, i64 %63
  %65 = sub i32 %indvar, %23
  %66 = and i32 %65, 1
  %lcmp.mod89.not.not = icmp eq i32 %66, 0
  br i1 %lcmp.mod89.not.not, label %.prol.preheader, label %.prol.loopexit

.prol.preheader:                                  ; preds = %.lr.ph50
  %67 = load i32, ptr %64, align 4, !tbaa !8
  %68 = getelementptr inbounds [25 x i32], ptr %3, i64 0, i64 %indvars.iv66
  %69 = load i32, ptr %68, align 4, !tbaa !8
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [25 x i32], ptr %5, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !8
  %73 = icmp sgt i32 %67, %72
  br i1 %73, label %74, label %.prol.loopexit.unr-lcssa

74:                                               ; preds = %.prol.preheader
  store i32 %72, ptr %64, align 4, !tbaa !8
  store i32 %67, ptr %71, align 4, !tbaa !8
  %75 = add nsw i32 %.02953, 1
  br label %.prol.loopexit.unr-lcssa

.prol.loopexit.unr-lcssa:                         ; preds = %74, %.prol.preheader
  %.2.prol = phi i32 [ %75, %74 ], [ %.02953, %.prol.preheader ]
  %indvars.iv.next69.prol = add nuw nsw i64 %indvars.iv66, 1
  br label %.prol.loopexit

.prol.loopexit:                                   ; preds = %.prol.loopexit.unr-lcssa, %.lr.ph50
  %.2.lcssa.unr = phi i32 [ poison, %.lr.ph50 ], [ %.2.prol, %.prol.loopexit.unr-lcssa ]
  %indvars.iv68.unr = phi i64 [ %indvars.iv66, %.lr.ph50 ], [ %indvars.iv.next69.prol, %.prol.loopexit.unr-lcssa ]
  %.148.unr = phi i32 [ %.02953, %.lr.ph50 ], [ %.2.prol, %.prol.loopexit.unr-lcssa ]
  %76 = icmp eq i32 %32, %indvar
  br i1 %76, label %.loopexit, label %.lr.ph50.new

.lr.ph50.new:                                     ; preds = %.prol.loopexit, %96
  %indvars.iv68 = phi i64 [ %indvars.iv.next69.1, %96 ], [ %indvars.iv68.unr, %.prol.loopexit ]
  %.148 = phi i32 [ %.2.1, %96 ], [ %.148.unr, %.prol.loopexit ]
  %77 = load i32, ptr %64, align 4, !tbaa !8
  %78 = getelementptr inbounds [25 x i32], ptr %3, i64 0, i64 %indvars.iv68
  %79 = load i32, ptr %78, align 4, !tbaa !8
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [25 x i32], ptr %5, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !8
  %83 = icmp sgt i32 %77, %82
  br i1 %83, label %84, label %86

84:                                               ; preds = %.lr.ph50.new
  store i32 %82, ptr %64, align 4, !tbaa !8
  store i32 %77, ptr %81, align 4, !tbaa !8
  %85 = add nsw i32 %.148, 1
  br label %86

86:                                               ; preds = %.lr.ph50.new, %84
  %.2 = phi i32 [ %85, %84 ], [ %.148, %.lr.ph50.new ]
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %87 = load i32, ptr %64, align 4, !tbaa !8
  %88 = getelementptr inbounds [25 x i32], ptr %3, i64 0, i64 %indvars.iv.next69
  %89 = load i32, ptr %88, align 4, !tbaa !8
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [25 x i32], ptr %5, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !8
  %93 = icmp sgt i32 %87, %92
  br i1 %93, label %94, label %96

94:                                               ; preds = %86
  store i32 %92, ptr %64, align 4, !tbaa !8
  store i32 %87, ptr %91, align 4, !tbaa !8
  %95 = add nsw i32 %.2, 1
  br label %96

96:                                               ; preds = %94, %86
  %.2.1 = phi i32 [ %95, %94 ], [ %.2, %86 ]
  %indvars.iv.next69.1 = add nuw nsw i64 %indvars.iv68, 2
  %lftr.wideiv.1 = trunc i64 %indvars.iv.next69.1 to i32
  %exitcond71.not.1 = icmp eq i32 %30, %lftr.wideiv.1
  br i1 %exitcond71.not.1, label %.loopexit, label %.lr.ph50.new, !llvm.loop !19

._crit_edge57:                                    ; preds = %._crit_edge, %0
  call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  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 uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #3 align 2

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

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

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

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 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 = { 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 #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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.unroll.disable"}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass