; LLVM IR from HarshCasper/NeoAlgo :: C-Plus-Plus/other/Move_all_Negative_no_to_beginning_and_Positive_to_end.ll (Z5solvev)

; 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
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %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
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #5
  %11 = 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)
  %12 = load i32, ptr %1, align 4, !tbaa !5
  %13 = zext i32 %12 to i64
  %14 = call ptr @llvm.stacksave.p0()
  store ptr %14, ptr %2, align 8
  %15 = alloca i32, i64 %13, align 16
  store i64 %13, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %26, %0
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = load i32, ptr %1, align 4, !tbaa !5
  %19 = icmp slt i32 %17, %18
  br i1 %19, label %21, label %20

20:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %29

21:                                               ; preds = %16
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds i32, ptr %15, i64 %23
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %24)
  br label %26

26:                                               ; preds = %21
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr %4, align 4, !tbaa !5
  br label %16, !llvm.loop !9

29:                                               ; preds = %20
  %30 = load i32, ptr %1, align 4, !tbaa !5
  %31 = zext i32 %30 to i64
  %32 = alloca i32, i64 %31, align 16
  store i64 %31, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %54, %29
  %34 = load i32, ptr %7, align 4, !tbaa !5
  %35 = load i32, ptr %1, align 4, !tbaa !5
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %38, label %37

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

38:                                               ; preds = %33
  %39 = load i32, ptr %7, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds i32, ptr %15, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = icmp slt i32 %42, 0
  br i1 %43, label %44, label %53

44:                                               ; preds = %38
  %45 = load i32, ptr %7, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds i32, ptr %15, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = load i32, ptr %6, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %6, align 4, !tbaa !5
  %51 = sext i32 %49 to i64
  %52 = getelementptr inbounds i32, ptr %32, i64 %51
  store i32 %48, ptr %52, align 4, !tbaa !5
  br label %53

53:                                               ; preds = %44, %38
  br label %54

54:                                               ; preds = %53
  %55 = load i32, ptr %7, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %7, align 4, !tbaa !5
  br label %33, !llvm.loop !11

57:                                               ; preds = %37
  %58 = load i32, ptr %6, align 4, !tbaa !5
  %59 = load i32, ptr %1, align 4, !tbaa !5
  %60 = icmp eq i32 %58, %59
  br i1 %60, label %64, label %61

61:                                               ; preds = %57
  %62 = load i32, ptr %6, align 4, !tbaa !5
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %64, label %65

64:                                               ; preds = %61, %57
  store i32 1, ptr %8, align 4
  br label %107

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

66:                                               ; preds = %87, %65
  %67 = load i32, ptr %9, align 4, !tbaa !5
  %68 = load i32, ptr %1, align 4, !tbaa !5
  %69 = icmp slt i32 %67, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %66
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %90

71:                                               ; preds = %66
  %72 = load i32, ptr %9, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds i32, ptr %15, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = icmp sge i32 %75, 0
  br i1 %76, label %77, label %86

77:                                               ; preds = %71
  %78 = load i32, ptr %9, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds i32, ptr %15, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = load i32, ptr %6, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %6, align 4, !tbaa !5
  %84 = sext i32 %82 to i64
  %85 = getelementptr inbounds i32, ptr %32, i64 %84
  store i32 %81, ptr %85, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %77, %71
  br label %87

87:                                               ; preds = %86
  %88 = load i32, ptr %9, align 4, !tbaa !5
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %9, align 4, !tbaa !5
  br label %66, !llvm.loop !12

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

91:                                               ; preds = %103, %90
  %92 = load i32, ptr %10, align 4, !tbaa !5
  %93 = load i32, ptr %1, align 4, !tbaa !5
  %94 = icmp slt i32 %92, %93
  br i1 %94, label %96, label %95

95:                                               ; preds = %91
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %106

96:                                               ; preds = %91
  %97 = load i32, ptr %10, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds i32, ptr %32, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %100)
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %101, ptr noundef @.str)
  br label %103

103:                                              ; preds = %96
  %104 = load i32, ptr %10, align 4, !tbaa !5
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %10, align 4, !tbaa !5
  br label %91, !llvm.loop !13

106:                                              ; preds = %95
  store i32 0, ptr %8, align 4
  br label %107

107:                                              ; preds = %106, %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %108 = load ptr, ptr %2, align 8
  call void @llvm.stackrestore.p0(ptr %108)
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #5
  %109 = load i32, ptr %8, align 4
  switch i32 %109, label %111 [
    i32 0, label %110
    i32 1, label %110
  ]

110:                                              ; preds = %107, %107
  ret void

111:                                              ; preds = %107
  unreachable
}

; 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
declare ptr @llvm.stacksave.p0() #3

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

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

attributes #0 = { 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 #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 nosync nounwind willreturn }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %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
  %4 = zext i32 %3 to i64
  %5 = call ptr @llvm.stacksave.p0()
  %6 = alloca i32, i64 %4, align 16
  %7 = load i32, ptr %1, align 4, !tbaa !5
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph, label %.loopexit

._crit_edge:                                      ; preds = %.lr.ph
  %9 = zext i32 %16 to i64
  %10 = alloca i32, i64 %9, align 16
  %11 = icmp slt i32 %16, 1
  br i1 %11, label %.loopexit, label %.lr.ph32.preheader

.lr.ph32.preheader:                               ; preds = %._crit_edge
  %12 = add nsw i64 %9, -1
  %xtraiter = and i64 %9, 1
  %13 = icmp eq i64 %12, 0
  br i1 %13, label %._crit_edge33.unr-lcssa, label %.lr.ph32.preheader.new

.lr.ph32.preheader.new:                           ; preds = %.lr.ph32.preheader
  %unroll_iter = and i64 %9, 2147483646
  br label %.lr.ph32

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %14 = getelementptr inbounds i32, ptr %6, i64 %indvars.iv
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %16 = load i32, ptr %1, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = icmp slt i64 %indvars.iv.next, %17
  br i1 %18, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge33.unr-lcssa:                          ; preds = %43, %.lr.ph32.preheader
  %.1.lcssa.ph = phi i32 [ poison, %.lr.ph32.preheader ], [ %.1.1, %43 ]
  %indvars.iv42.unr = phi i64 [ 0, %.lr.ph32.preheader ], [ %indvars.iv.next43.1, %43 ]
  %.02129.unr = phi i32 [ 0, %.lr.ph32.preheader ], [ %.1.1, %43 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge33, label %.lr.ph32.epil

.lr.ph32.epil:                                    ; preds = %._crit_edge33.unr-lcssa
  %19 = getelementptr inbounds i32, ptr %6, i64 %indvars.iv42.unr
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = icmp slt i32 %20, 0
  br i1 %21, label %22, label %._crit_edge33

22:                                               ; preds = %.lr.ph32.epil
  %23 = add nsw i32 %.02129.unr, 1
  %24 = sext i32 %.02129.unr to i64
  %25 = getelementptr inbounds i32, ptr %10, i64 %24
  store i32 %20, ptr %25, align 4, !tbaa !5
  br label %._crit_edge33

._crit_edge33:                                    ; preds = %.lr.ph32.epil, %22, %._crit_edge33.unr-lcssa
  %.1.lcssa = phi i32 [ %.1.lcssa.ph, %._crit_edge33.unr-lcssa ], [ %23, %22 ], [ %.02129.unr, %.lr.ph32.epil ]
  %26 = icmp eq i32 %.1.lcssa, %16
  %27 = icmp eq i32 %.1.lcssa, 0
  %or.cond = or i1 %26, %27
  %brmerge = or i1 %or.cond, %11
  br i1 %brmerge, label %.loopexit, label %.lr.ph37.preheader

.lr.ph37.preheader:                               ; preds = %._crit_edge33
  %xtraiter59 = and i64 %9, 1
  %28 = icmp eq i64 %12, 0
  br i1 %28, label %.preheader.unr-lcssa, label %.lr.ph37.preheader.new

.lr.ph37.preheader.new:                           ; preds = %.lr.ph37.preheader
  %unroll_iter61 = and i64 %9, 2147483646
  br label %.lr.ph37

.lr.ph32:                                         ; preds = %43, %.lr.ph32.preheader.new
  %indvars.iv42 = phi i64 [ 0, %.lr.ph32.preheader.new ], [ %indvars.iv.next43.1, %43 ]
  %.02129 = phi i32 [ 0, %.lr.ph32.preheader.new ], [ %.1.1, %43 ]
  %niter = phi i64 [ 0, %.lr.ph32.preheader.new ], [ %niter.next.1, %43 ]
  %29 = getelementptr inbounds i32, ptr %6, i64 %indvars.iv42
  %30 = load i32, ptr %29, align 8, !tbaa !5
  %31 = icmp slt i32 %30, 0
  br i1 %31, label %32, label %.lr.ph32.1

32:                                               ; preds = %.lr.ph32
  %33 = add nsw i32 %.02129, 1
  %34 = sext i32 %.02129 to i64
  %35 = getelementptr inbounds i32, ptr %10, i64 %34
  store i32 %30, ptr %35, align 4, !tbaa !5
  br label %.lr.ph32.1

.lr.ph32.1:                                       ; preds = %.lr.ph32, %32
  %.1 = phi i32 [ %33, %32 ], [ %.02129, %.lr.ph32 ]
  %indvars.iv.next43 = or disjoint i64 %indvars.iv42, 1
  %36 = getelementptr inbounds i32, ptr %6, i64 %indvars.iv.next43
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = icmp slt i32 %37, 0
  br i1 %38, label %39, label %43

39:                                               ; preds = %.lr.ph32.1
  %40 = add nsw i32 %.1, 1
  %41 = sext i32 %.1 to i64
  %42 = getelementptr inbounds i32, ptr %10, i64 %41
  store i32 %37, ptr %42, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %39, %.lr.ph32.1
  %.1.1 = phi i32 [ %40, %39 ], [ %.1, %.lr.ph32.1 ]
  %indvars.iv.next43.1 = add nuw nsw i64 %indvars.iv42, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge33.unr-lcssa, label %.lr.ph32, !llvm.loop !11

.preheader.unr-lcssa:                             ; preds = %64, %.lr.ph37.preheader
  %indvars.iv45.unr = phi i64 [ 0, %.lr.ph37.preheader ], [ %indvars.iv.next46.1, %64 ]
  %.235.unr = phi i32 [ %.1.lcssa, %.lr.ph37.preheader ], [ %.3.1, %64 ]
  %lcmp.mod60.not = icmp eq i64 %xtraiter59, 0
  br i1 %lcmp.mod60.not, label %.preheader, label %.lr.ph37.epil

.lr.ph37.epil:                                    ; preds = %.preheader.unr-lcssa
  %44 = getelementptr inbounds i32, ptr %6, i64 %indvars.iv45.unr
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = icmp sgt i32 %45, -1
  br i1 %46, label %47, label %.preheader

47:                                               ; preds = %.lr.ph37.epil
  %48 = sext i32 %.235.unr to i64
  %49 = getelementptr inbounds i32, ptr %10, i64 %48
  store i32 %45, ptr %49, align 4, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.lr.ph37.epil, %47, %.preheader.unr-lcssa
  br i1 %11, label %.loopexit, label %.lr.ph39

.lr.ph37:                                         ; preds = %64, %.lr.ph37.preheader.new
  %indvars.iv45 = phi i64 [ 0, %.lr.ph37.preheader.new ], [ %indvars.iv.next46.1, %64 ]
  %.235 = phi i32 [ %.1.lcssa, %.lr.ph37.preheader.new ], [ %.3.1, %64 ]
  %niter62 = phi i64 [ 0, %.lr.ph37.preheader.new ], [ %niter62.next.1, %64 ]
  %50 = getelementptr inbounds i32, ptr %6, i64 %indvars.iv45
  %51 = load i32, ptr %50, align 8, !tbaa !5
  %52 = icmp sgt i32 %51, -1
  br i1 %52, label %53, label %.lr.ph37.1

53:                                               ; preds = %.lr.ph37
  %54 = add nsw i32 %.235, 1
  %55 = sext i32 %.235 to i64
  %56 = getelementptr inbounds i32, ptr %10, i64 %55
  store i32 %51, ptr %56, align 4, !tbaa !5
  br label %.lr.ph37.1

.lr.ph37.1:                                       ; preds = %.lr.ph37, %53
  %.3 = phi i32 [ %54, %53 ], [ %.235, %.lr.ph37 ]
  %indvars.iv.next46 = or disjoint i64 %indvars.iv45, 1
  %57 = getelementptr inbounds i32, ptr %6, i64 %indvars.iv.next46
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = icmp sgt i32 %58, -1
  br i1 %59, label %60, label %64

60:                                               ; preds = %.lr.ph37.1
  %61 = add nsw i32 %.3, 1
  %62 = sext i32 %.3 to i64
  %63 = getelementptr inbounds i32, ptr %10, i64 %62
  store i32 %58, ptr %63, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %60, %.lr.ph37.1
  %.3.1 = phi i32 [ %61, %60 ], [ %.3, %.lr.ph37.1 ]
  %indvars.iv.next46.1 = add nuw nsw i64 %indvars.iv45, 2
  %niter62.next.1 = add i64 %niter62, 2
  %niter62.ncmp.1 = icmp eq i64 %niter62.next.1, %unroll_iter61
  br i1 %niter62.ncmp.1, label %.preheader.unr-lcssa, label %.lr.ph37, !llvm.loop !12

.lr.ph39:                                         ; preds = %.preheader, %.lr.ph39
  %indvars.iv50 = phi i64 [ %indvars.iv.next51, %.lr.ph39 ], [ 0, %.preheader ]
  %65 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv50
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %66)
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef nonnull @.str)
  %indvars.iv.next51 = add nuw nsw i64 %indvars.iv50, 1
  %69 = load i32, ptr %1, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = icmp slt i64 %indvars.iv.next51, %70
  br i1 %71, label %.lr.ph39, label %.loopexit, !llvm.loop !13

.loopexit:                                        ; preds = %.lr.ph39, %._crit_edge33, %0, %._crit_edge, %.preheader
  call void @llvm.stackrestore.p0(ptr %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret void
}

; 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
declare ptr @llvm.stacksave.p0() #3

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

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

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 nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

attributes #0 = { 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 #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 nosync nounwind willreturn }
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 = !{!"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}


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