; LLVM IR from AllAlgorithms/c :: algorithms/converting a matrix to sparse matrix (converting matrix to sparse)

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

%struct.term = type { i32, i32, i32 }

@.str.13 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [10 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @create_sparse(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3) #2 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %13 = load i32, ptr %6, align 4, !tbaa !9
  %14 = load ptr, ptr %8, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.term, ptr %14, i64 0
  %16 = getelementptr inbounds %struct.term, ptr %15, i32 0, i32 1
  store i32 %13, ptr %16, align 4, !tbaa !11
  %17 = load i32, ptr %7, align 4, !tbaa !9
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.term, ptr %18, i64 0
  %20 = getelementptr inbounds %struct.term, ptr %19, i32 0, i32 0
  store i32 %17, ptr %20, align 4, !tbaa !13
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %21

21:                                               ; preds = %48, %4
  %22 = load i32, ptr %9, align 4, !tbaa !9
  %23 = load i32, ptr %6, align 4, !tbaa !9
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %25, label %51

25:                                               ; preds = %21
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %26

26:                                               ; preds = %44, %25
  %27 = load i32, ptr %10, align 4, !tbaa !9
  %28 = load i32, ptr %7, align 4, !tbaa !9
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %30, label %47

30:                                               ; preds = %26
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = load i32, ptr %9, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [10 x i32], ptr %31, i64 %33
  %35 = load i32, ptr %10, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [10 x i32], ptr %34, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !9
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %43

40:                                               ; preds = %30
  %41 = load i32, ptr %11, align 4, !tbaa !9
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %11, align 4, !tbaa !9
  br label %43

43:                                               ; preds = %40, %30
  br label %44

44:                                               ; preds = %43
  %45 = load i32, ptr %10, align 4, !tbaa !9
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %10, align 4, !tbaa !9
  br label %26, !llvm.loop !14

47:                                               ; preds = %26
  br label %48

48:                                               ; preds = %47
  %49 = load i32, ptr %9, align 4, !tbaa !9
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %9, align 4, !tbaa !9
  br label %21, !llvm.loop !16

51:                                               ; preds = %21
  %52 = load i32, ptr %11, align 4, !tbaa !9
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.term, ptr %53, i64 0
  %55 = getelementptr inbounds %struct.term, ptr %54, i32 0, i32 2
  store i32 %52, ptr %55, align 4, !tbaa !17
  store i32 1, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %56

56:                                               ; preds = %108, %51
  %57 = load i32, ptr %9, align 4, !tbaa !9
  %58 = load i32, ptr %6, align 4, !tbaa !9
  %59 = icmp slt i32 %57, %58
  br i1 %59, label %60, label %111

60:                                               ; preds = %56
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %104, %60
  %62 = load i32, ptr %10, align 4, !tbaa !9
  %63 = load i32, ptr %7, align 4, !tbaa !9
  %64 = icmp slt i32 %62, %63
  br i1 %64, label %65, label %107

65:                                               ; preds = %61
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = load i32, ptr %9, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [10 x i32], ptr %66, i64 %68
  %70 = load i32, ptr %10, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [10 x i32], ptr %69, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !9
  %74 = icmp ne i32 %73, 0
  br i1 %74, label %75, label %103

75:                                               ; preds = %65
  %76 = load i32, ptr %9, align 4, !tbaa !9
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = load i32, ptr %12, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds %struct.term, ptr %77, i64 %79
  %81 = getelementptr inbounds %struct.term, ptr %80, i32 0, i32 1
  store i32 %76, ptr %81, align 4, !tbaa !11
  %82 = load i32, ptr %10, align 4, !tbaa !9
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = load i32, ptr %12, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds %struct.term, ptr %83, i64 %85
  %87 = getelementptr inbounds %struct.term, ptr %86, i32 0, i32 0
  store i32 %82, ptr %87, align 4, !tbaa !13
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = load i32, ptr %9, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [10 x i32], ptr %88, i64 %90
  %92 = load i32, ptr %10, align 4, !tbaa !9
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [10 x i32], ptr %91, i64 0, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !9
  %96 = load ptr, ptr %8, align 8, !tbaa !5
  %97 = load i32, ptr %12, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds %struct.term, ptr %96, i64 %98
  %100 = getelementptr inbounds %struct.term, ptr %99, i32 0, i32 2
  store i32 %95, ptr %100, align 4, !tbaa !17
  %101 = load i32, ptr %12, align 4, !tbaa !9
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %12, align 4, !tbaa !9
  br label %103

103:                                              ; preds = %75, %65
  br label %104

104:                                              ; preds = %103
  %105 = load i32, ptr %10, align 4, !tbaa !9
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %10, align 4, !tbaa !9
  br label %61, !llvm.loop !18

107:                                              ; preds = %61
  br label %108

108:                                              ; preds = %107
  %109 = load i32, ptr %9, align 4, !tbaa !9
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %9, align 4, !tbaa !9
  br label %56, !llvm.loop !19

111:                                              ; preds = %56
  %112 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %113

113:                                              ; preds = %137, %111
  %114 = load i32, ptr %9, align 4, !tbaa !9
  %115 = load i32, ptr %11, align 4, !tbaa !9
  %116 = icmp sle i32 %114, %115
  br i1 %116, label %117, label %140

117:                                              ; preds = %113
  %118 = load ptr, ptr %8, align 8, !tbaa !5
  %119 = load i32, ptr %9, align 4, !tbaa !9
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds %struct.term, ptr %118, i64 %120
  %122 = getelementptr inbounds %struct.term, ptr %121, i32 0, i32 1
  %123 = load i32, ptr %122, align 4, !tbaa !11
  %124 = load ptr, ptr %8, align 8, !tbaa !5
  %125 = load i32, ptr %9, align 4, !tbaa !9
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds %struct.term, ptr %124, i64 %126
  %128 = getelementptr inbounds %struct.term, ptr %127, i32 0, i32 0
  %129 = load i32, ptr %128, align 4, !tbaa !13
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  %131 = load i32, ptr %9, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds %struct.term, ptr %130, i64 %132
  %134 = getelementptr inbounds %struct.term, ptr %133, i32 0, i32 2
  %135 = load i32, ptr %134, align 4, !tbaa !17
  %136 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, i32 noundef %123, i32 noundef %129, i32 noundef %135)
  br label %137

137:                                              ; preds = %117
  %138 = load i32, ptr %9, align 4, !tbaa !9
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %9, align 4, !tbaa !9
  br label %113, !llvm.loop !20

140:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  ret void
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 #2 = { nounwind 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 #3 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 4}
!12 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8}
!13 = !{!12, !10, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = !{!12, !10, i64 8}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}


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

%struct.term = type { i32, i32, i32 }

@.str.13 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [10 x i8], align 1

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

; Function Attrs: nofree nounwind uwtable
define dso_local void @create_sparse(ptr nocapture noundef readonly %0, i32 noundef %1, i32 noundef %2, ptr nocapture noundef %3) local_unnamed_addr #1 {
  %5 = getelementptr inbounds i8, ptr %3, i64 4
  store i32 %1, ptr %5, align 4, !tbaa !5
  store i32 %2, ptr %3, align 4, !tbaa !10
  %6 = icmp sgt i32 %1, 0
  %7 = icmp sgt i32 %2, 0
  %or.cond105 = and i1 %6, %7
  br i1 %or.cond105, label %.preheader56.us.preheader, label %._crit_edge67.thread

.preheader56.us.preheader:                        ; preds = %4
  %wide.trip.count78 = zext nneg i32 %1 to i64
  %wide.trip.count = zext nneg i32 %2 to i64
  %min.iters.check = icmp ult i32 %2, 8
  %n.vec = and i64 %wide.trip.count, 2147483640
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br label %.preheader56.us

.preheader56.us:                                  ; preds = %.preheader56.us.preheader, %._crit_edge.us
  %indvars.iv75 = phi i64 [ 0, %.preheader56.us.preheader ], [ %indvars.iv.next76, %._crit_edge.us ]
  %.04560.us = phi i32 [ 0, %.preheader56.us.preheader ], [ %spec.select.us.lcssa, %._crit_edge.us ]
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.preheader56.us
  %8 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %.04560.us, i64 0
  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> [ %8, %vector.ph ], [ %15, %vector.body ]
  %vec.phi106 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %16, %vector.body ]
  %9 = getelementptr inbounds [10 x i32], ptr %0, i64 %indvars.iv75, i64 %index
  %10 = getelementptr inbounds i8, ptr %9, i64 16
  %wide.load = load <4 x i32>, ptr %9, align 4, !tbaa !11
  %wide.load107 = load <4 x i32>, ptr %10, align 4, !tbaa !11
  %11 = icmp ne <4 x i32> %wide.load, zeroinitializer
  %12 = icmp ne <4 x i32> %wide.load107, zeroinitializer
  %13 = zext <4 x i1> %11 to <4 x i32>
  %14 = zext <4 x i1> %12 to <4 x i32>
  %15 = add <4 x i32> %vec.phi, %13
  %16 = add <4 x i32> %vec.phi106, %14
  %index.next = add nuw i64 %index, 8
  %17 = icmp eq i64 %index.next, %n.vec
  br i1 %17, label %middle.block, label %vector.body, !llvm.loop !12

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

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader56.us
  %indvars.iv.ph = phi i64 [ 0, %.preheader56.us ], [ %n.vec, %middle.block ]
  %.14658.us.ph = phi i32 [ %.04560.us, %.preheader56.us ], [ %18, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %.14658.us = phi i32 [ %spec.select.us, %scalar.ph ], [ %.14658.us.ph, %scalar.ph.preheader ]
  %19 = getelementptr inbounds [10 x i32], ptr %0, i64 %indvars.iv75, i64 %indvars.iv
  %20 = load i32, ptr %19, align 4, !tbaa !11
  %.not55.us = icmp ne i32 %20, 0
  %21 = zext i1 %.not55.us to i32
  %spec.select.us = add nsw i32 %.14658.us, %21
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.us, label %scalar.ph, !llvm.loop !16

._crit_edge.us:                                   ; preds = %scalar.ph, %middle.block
  %spec.select.us.lcssa = phi i32 [ %18, %middle.block ], [ %spec.select.us, %scalar.ph ]
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %exitcond79.not = icmp eq i64 %indvars.iv.next76, %wide.trip.count78
  br i1 %exitcond79.not, label %._crit_edge61, label %.preheader56.us, !llvm.loop !17

._crit_edge61:                                    ; preds = %._crit_edge.us
  %22 = getelementptr inbounds i8, ptr %3, i64 8
  store i32 %spec.select.us.lcssa, ptr %22, align 4, !tbaa !18
  br i1 %6, label %.preheader.us.preheader, label %._crit_edge67

.preheader.us.preheader:                          ; preds = %._crit_edge61
  %wide.trip.count88 = zext nneg i32 %1 to i64
  %wide.trip.count83 = zext nneg i32 %2 to i64
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us68
  %indvars.iv85 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next86, %._crit_edge.us68 ]
  %.066.us = phi i32 [ 1, %.preheader.us.preheader ], [ %.2.us, %._crit_edge.us68 ]
  %23 = trunc nuw nsw i64 %indvars.iv85 to i32
  br label %24

24:                                               ; preds = %.preheader.us, %35
  %indvars.iv80 = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next81, %35 ]
  %.164.us = phi i32 [ %.066.us, %.preheader.us ], [ %.2.us, %35 ]
  %25 = getelementptr inbounds [10 x i32], ptr %0, i64 %indvars.iv85, i64 %indvars.iv80
  %26 = load i32, ptr %25, align 4, !tbaa !11
  %.not54.us = icmp eq i32 %26, 0
  br i1 %.not54.us, label %35, label %27

27:                                               ; preds = %24
  %28 = sext i32 %.164.us to i64
  %29 = getelementptr inbounds %struct.term, ptr %3, i64 %28
  %30 = getelementptr inbounds i8, ptr %29, i64 4
  store i32 %23, ptr %30, align 4, !tbaa !5
  %31 = trunc nuw nsw i64 %indvars.iv80 to i32
  store i32 %31, ptr %29, align 4, !tbaa !10
  %32 = load i32, ptr %25, align 4, !tbaa !11
  %33 = getelementptr inbounds i8, ptr %29, i64 8
  store i32 %32, ptr %33, align 4, !tbaa !18
  %34 = add nsw i32 %.164.us, 1
  br label %35

35:                                               ; preds = %27, %24
  %.2.us = phi i32 [ %34, %27 ], [ %.164.us, %24 ]
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %exitcond84.not = icmp eq i64 %indvars.iv.next81, %wide.trip.count83
  br i1 %exitcond84.not, label %._crit_edge.us68, label %24, !llvm.loop !19

._crit_edge.us68:                                 ; preds = %35
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %exitcond89.not = icmp eq i64 %indvars.iv.next86, %wide.trip.count88
  br i1 %exitcond89.not, label %._crit_edge67, label %.preheader.us, !llvm.loop !20

._crit_edge67.thread:                             ; preds = %4
  %36 = getelementptr inbounds i8, ptr %3, i64 8
  store i32 0, ptr %36, align 4, !tbaa !18
  %37 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  br label %.lr.ph.preheader

._crit_edge67:                                    ; preds = %._crit_edge.us68, %._crit_edge61
  %38 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  %.not70 = icmp slt i32 %spec.select.us.lcssa, 0
  br i1 %.not70, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %._crit_edge67.thread, %._crit_edge67
  %.045.lcssa96104 = phi i32 [ 0, %._crit_edge67.thread ], [ %spec.select.us.lcssa, %._crit_edge67 ]
  %39 = add nuw i32 %.045.lcssa96104, 1
  %wide.trip.count93 = zext i32 %39 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv90 = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next91, %.lr.ph ]
  %40 = getelementptr inbounds %struct.term, ptr %3, i64 %indvars.iv90
  %41 = getelementptr inbounds i8, ptr %40, i64 4
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = load i32, ptr %40, align 4, !tbaa !10
  %44 = getelementptr inbounds i8, ptr %40, i64 8
  %45 = load i32, ptr %44, align 4, !tbaa !18
  %46 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, i32 noundef %42, i32 noundef %43, i32 noundef %45)
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %exitcond94.not = icmp eq i64 %indvars.iv.next91, %wide.trip.count93
  br i1 %exitcond94.not, label %._crit_edge, label %.lr.ph, !llvm.loop !21

._crit_edge:                                      ; preds = %.lr.ph, %._crit_edge67
  ret void
}

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

attributes #0 = { 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 #1 = { nofree nounwind 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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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, !7, i64 4}
!6 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13, !14, !15}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !13, !15, !14}
!17 = distinct !{!17, !13}
!18 = !{!6, !7, i64 8}
!19 = distinct !{!19, !13}
!20 = distinct !{!20, !13}
!21 = distinct !{!21, !13}


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