; LLVM IR from next-step-for-interview-prep/Coding-Ninjas-DSA-course_code_and_notes_cpp :: Milestone-2=Intro_to_C++/questions and solutions (main)

; 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 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 ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %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) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %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 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = zext i32 %15 to i64
  %17 = load i32, ptr %3, align 4, !tbaa !5
  %18 = zext i32 %17 to i64
  %19 = call ptr @llvm.stacksave.p0()
  store ptr %19, ptr %4, align 8
  %20 = mul nuw i64 %16, %18
  %21 = alloca i32, i64 %20, align 16
  store i64 %16, ptr %5, align 8
  store i64 %18, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %46, %0
  %23 = load i32, ptr %7, align 4, !tbaa !5
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %49

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

28:                                               ; preds = %42, %27
  %29 = load i32, ptr %9, align 4, !tbaa !5
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %33, label %32

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

33:                                               ; preds = %28
  %34 = load i32, ptr %7, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = mul nsw i64 %35, %18
  %37 = getelementptr inbounds i32, ptr %21, i64 %36
  %38 = load i32, ptr %9, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds i32, ptr %37, i64 %39
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %40)
  br label %42

42:                                               ; preds = %33
  %43 = load i32, ptr %9, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %9, align 4, !tbaa !5
  br label %28, !llvm.loop !9

45:                                               ; preds = %32
  br label %46

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

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

50:                                               ; preds = %79, %49
  %51 = load i32, ptr %10, align 4, !tbaa !5
  %52 = load i32, ptr %3, align 4, !tbaa !5
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %55, label %54

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

55:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %72, %55
  %57 = load i32, ptr %12, align 4, !tbaa !5
  %58 = load i32, ptr %2, align 4, !tbaa !5
  %59 = icmp slt i32 %57, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %75

61:                                               ; preds = %56
  %62 = load i32, ptr %12, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = mul nsw i64 %63, %18
  %65 = getelementptr inbounds i32, ptr %21, i64 %64
  %66 = load i32, ptr %10, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds i32, ptr %65, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = load i32, ptr %11, align 4, !tbaa !5
  %71 = add nsw i32 %70, %69
  store i32 %71, ptr %11, align 4, !tbaa !5
  br label %72

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

75:                                               ; preds = %60
  %76 = load i32, ptr %11, align 4, !tbaa !5
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %76)
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef @.str)
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %79

79:                                               ; preds = %75
  %80 = load i32, ptr %10, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %10, align 4, !tbaa !5
  br label %50, !llvm.loop !13

82:                                               ; preds = %54
  %83 = load ptr, ptr %4, align 8
  call void @llvm.stackrestore.p0(ptr %83)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %84 = load i32, ptr %1, align 4
  ret i32 %84
}

; 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 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 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 norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %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) %1)
  %4 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %5 = load i32, ptr %1, align 4, !tbaa !5
  %6 = zext i32 %5 to i64
  %7 = load i32, ptr %2, align 4, !tbaa !5
  %8 = zext i32 %7 to i64
  %9 = call ptr @llvm.stacksave.p0()
  %10 = mul nuw i64 %8, %6
  %11 = alloca i32, i64 %10, align 16
  %12 = load i32, ptr %1, align 4, !tbaa !5
  %13 = icmp sgt i32 %12, 0
  %.pre40 = load i32, ptr %2, align 4, !tbaa !5
  br i1 %13, label %.preheader20.lr.ph, label %.preheader19

.preheader20.lr.ph:                               ; preds = %0
  %14 = icmp sgt i32 %.pre40, 0
  br i1 %14, label %.preheader20, label %._crit_edge28

.preheader20:                                     ; preds = %.preheader20.lr.ph, %._crit_edge
  %15 = phi i32 [ %22, %._crit_edge ], [ %12, %.preheader20.lr.ph ]
  %16 = phi i32 [ %23, %._crit_edge ], [ %.pre40, %.preheader20.lr.ph ]
  %indvars.iv31 = phi i64 [ %indvars.iv.next32, %._crit_edge ], [ 0, %.preheader20.lr.ph ]
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader20
  %18 = mul nuw nsw i64 %indvars.iv31, %8
  %19 = getelementptr inbounds i32, ptr %11, i64 %18
  br label %26

.preheader19:                                     ; preds = %._crit_edge, %0
  %20 = phi i32 [ %.pre40, %0 ], [ %23, %._crit_edge ]
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.preheader.preheader, label %._crit_edge28

.preheader.preheader:                             ; preds = %.preheader19
  %ident.check.not = icmp eq i32 %7, 1
  br label %.preheader

._crit_edge.loopexit:                             ; preds = %26
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader20
  %22 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %15, %.preheader20 ]
  %23 = phi i32 [ %29, %._crit_edge.loopexit ], [ %16, %.preheader20 ]
  %indvars.iv.next32 = add nuw nsw i64 %indvars.iv31, 1
  %24 = sext i32 %22 to i64
  %25 = icmp slt i64 %indvars.iv.next32, %24
  br i1 %25, label %.preheader20, label %.preheader19, !llvm.loop !9

26:                                               ; preds = %.lr.ph, %26
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %26 ]
  %27 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %27)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = icmp slt i64 %indvars.iv.next, %30
  br i1 %31, label %26, label %._crit_edge.loopexit, !llvm.loop !12

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge26
  %indvars.iv37 = phi i64 [ %indvars.iv.next38, %._crit_edge26 ], [ 0, %.preheader.preheader ]
  %32 = load i32, ptr %1, align 4, !tbaa !5
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %.lr.ph25, label %._crit_edge26

.lr.ph25:                                         ; preds = %.preheader
  %invariant.gep = getelementptr inbounds i32, ptr %11, i64 %indvars.iv37
  %wide.trip.count = zext nneg i32 %32 to i64
  %min.iters.check = icmp ugt i32 %32, 7
  %or.cond = select i1 %min.iters.check, i1 %ident.check.not, i1 false
  br i1 %or.cond, label %vector.ph, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph25
  %indvars.iv34.ph = phi i64 [ 0, %.lr.ph25 ], [ %n.vec, %middle.block ]
  %.01523.ph = phi i32 [ 0, %.lr.ph25 ], [ %44, %middle.block ]
  %xtraiter = and i64 %wide.trip.count, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv34.prol = phi i64 [ %indvars.iv.next35.prol, %scalar.ph.prol ], [ %indvars.iv34.ph, %scalar.ph.preheader ]
  %.01523.prol = phi i32 [ %36, %scalar.ph.prol ], [ %.01523.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %34 = mul nuw nsw i64 %indvars.iv34.prol, %8
  %gep.prol = getelementptr inbounds i32, ptr %invariant.gep, i64 %34
  %35 = load i32, ptr %gep.prol, align 4, !tbaa !5
  %36 = add nsw i32 %35, %.01523.prol
  %indvars.iv.next35.prol = add nuw nsw i64 %indvars.iv34.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !13

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %.lcssa48.unr = phi i32 [ poison, %scalar.ph.preheader ], [ %36, %scalar.ph.prol ]
  %indvars.iv34.unr = phi i64 [ %indvars.iv34.ph, %scalar.ph.preheader ], [ %indvars.iv.next35.prol, %scalar.ph.prol ]
  %.01523.unr = phi i32 [ %.01523.ph, %scalar.ph.preheader ], [ %36, %scalar.ph.prol ]
  %37 = sub nsw i64 %indvars.iv34.ph, %wide.trip.count
  %38 = icmp ugt i64 %37, -4
  br i1 %38, label %._crit_edge26, label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph25
  %n.vec = and i64 %wide.trip.count, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %41, %vector.body ]
  %vec.phi45 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %42, %vector.body ]
  %39 = getelementptr inbounds i32, ptr %invariant.gep, i64 %index
  %40 = getelementptr inbounds i8, ptr %39, i64 16
  %wide.load = load <4 x i32>, ptr %39, align 4, !tbaa !5
  %wide.load46 = load <4 x i32>, ptr %40, align 4, !tbaa !5
  %41 = add <4 x i32> %wide.load, %vec.phi
  %42 = add <4 x i32> %wide.load46, %vec.phi45
  %index.next = add nuw i64 %index, 8
  %43 = icmp eq i64 %index.next, %n.vec
  br i1 %43, label %middle.block, label %vector.body, !llvm.loop !15

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %42, %41
  %44 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge26, label %scalar.ph.preheader

._crit_edge28:                                    ; preds = %._crit_edge26, %.preheader20.lr.ph, %.preheader19
  call void @llvm.stackrestore.p0(ptr %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

._crit_edge26:                                    ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %.preheader
  %.015.lcssa = phi i32 [ 0, %.preheader ], [ %44, %middle.block ], [ %.lcssa48.unr, %scalar.ph.prol.loopexit ], [ %61, %scalar.ph ]
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.015.lcssa)
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull @.str)
  %indvars.iv.next38 = add nuw nsw i64 %indvars.iv37, 1
  %47 = load i32, ptr %2, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = icmp slt i64 %indvars.iv.next38, %48
  br i1 %49, label %.preheader, label %._crit_edge28, !llvm.loop !18

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv34 = phi i64 [ %indvars.iv.next35.3, %scalar.ph ], [ %indvars.iv34.unr, %scalar.ph.prol.loopexit ]
  %.01523 = phi i32 [ %61, %scalar.ph ], [ %.01523.unr, %scalar.ph.prol.loopexit ]
  %50 = mul nuw nsw i64 %indvars.iv34, %8
  %gep = getelementptr inbounds i32, ptr %invariant.gep, i64 %50
  %51 = load i32, ptr %gep, align 4, !tbaa !5
  %52 = add nsw i32 %51, %.01523
  %indvars.iv.next35 = add nuw nsw i64 %indvars.iv34, 1
  %53 = mul nuw nsw i64 %indvars.iv.next35, %8
  %gep.1 = getelementptr inbounds i32, ptr %invariant.gep, i64 %53
  %54 = load i32, ptr %gep.1, align 4, !tbaa !5
  %55 = add nsw i32 %54, %52
  %indvars.iv.next35.1 = add nuw nsw i64 %indvars.iv34, 2
  %56 = mul nuw nsw i64 %indvars.iv.next35.1, %8
  %gep.2 = getelementptr inbounds i32, ptr %invariant.gep, i64 %56
  %57 = load i32, ptr %gep.2, align 4, !tbaa !5
  %58 = add nsw i32 %57, %55
  %indvars.iv.next35.2 = add nuw nsw i64 %indvars.iv34, 3
  %59 = mul nuw nsw i64 %indvars.iv.next35.2, %8
  %gep.3 = getelementptr inbounds i32, ptr %invariant.gep, i64 %59
  %60 = load i32, ptr %gep.3, align 4, !tbaa !5
  %61 = add nsw i32 %60, %58
  %indvars.iv.next35.3 = add nuw nsw i64 %indvars.iv34, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next35.3, %wide.trip.count
  br i1 %exitcond.not.3, label %._crit_edge26, label %scalar.ph, !llvm.loop !19
}

; 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

; 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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !11}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.unswitch.partial.disable"}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.unroll.disable"}
!15 = distinct !{!15, !10, !16, !17}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10, !16}


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