; LLVM IR from zchrissirhcz/pixel :: legacy/NaiveCNN/cnn (mat)

; 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.px_size_t = type { i32, i32 }
%struct.matrix_t = type { i32, i32, ptr }

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

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

declare i64 @px_create_size(i32 noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @create_matrix(i64) #2

; Function Attrs: nounwind uwtable
define dso_local ptr @matrix_upsample(ptr noundef %0, i32 noundef %1, i32 noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %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
  %11 = alloca %struct.px_size_t, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  %19 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %19, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %20 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %20, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.matrix_t, ptr %21, i32 0, i32 0
  %23 = load i32, ptr %22, align 8, !tbaa !11
  %24 = load i32, ptr %7, align 4, !tbaa !9
  %25 = mul nsw i32 %23, %24
  store i32 %25, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.matrix_t, ptr %26, i32 0, i32 1
  %28 = load i32, ptr %27, align 4, !tbaa !13
  %29 = load i32, ptr %8, align 4, !tbaa !9
  %30 = mul nsw i32 %28, %29
  store i32 %30, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %31 = load i32, ptr %9, align 4, !tbaa !9
  %32 = load i32, ptr %10, align 4, !tbaa !9
  %33 = call i64 @px_create_size(i32 noundef %31, i32 noundef %32)
  store i64 %33, ptr %11, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %34 = load i64, ptr %11, align 4
  %35 = call ptr @create_matrix(i64 %34)
  store ptr %35, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %139, %3
  %37 = load i32, ptr %13, align 4, !tbaa !9
  %38 = load ptr, ptr %12, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.matrix_t, ptr %38, i32 0, i32 0
  %40 = load i32, ptr %39, align 8, !tbaa !11
  %41 = icmp slt i32 %37, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %36
  store i32 2, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %143

43:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %89, %43
  %45 = load i32, ptr %15, align 4, !tbaa !9
  %46 = load ptr, ptr %12, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.matrix_t, ptr %46, i32 0, i32 1
  %48 = load i32, ptr %47, align 4, !tbaa !13
  %49 = icmp slt i32 %45, %48
  br i1 %49, label %51, label %50

50:                                               ; preds = %44
  store i32 5, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  br label %93

51:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %52

52:                                               ; preds = %85, %51
  %53 = load i32, ptr %16, align 4, !tbaa !9
  %54 = load i32, ptr %8, align 4, !tbaa !9
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %52
  store i32 8, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  br label %88

57:                                               ; preds = %52
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.matrix_t, ptr %58, i32 0, i32 2
  %60 = load ptr, ptr %59, align 8, !tbaa !14
  %61 = load i32, ptr %13, align 4, !tbaa !9
  %62 = load i32, ptr %7, align 4, !tbaa !9
  %63 = sdiv i32 %61, %62
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds ptr, ptr %60, i64 %64
  %66 = load ptr, ptr %65, align 8, !tbaa !5
  %67 = load i32, ptr %15, align 4, !tbaa !9
  %68 = load i32, ptr %8, align 4, !tbaa !9
  %69 = sdiv i32 %67, %68
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds float, ptr %66, i64 %70
  %72 = load float, ptr %71, align 4, !tbaa !15
  %73 = load ptr, ptr %12, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.matrix_t, ptr %73, i32 0, i32 2
  %75 = load ptr, ptr %74, align 8, !tbaa !14
  %76 = load i32, ptr %13, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds ptr, ptr %75, i64 %77
  %79 = load ptr, ptr %78, align 8, !tbaa !5
  %80 = load i32, ptr %15, align 4, !tbaa !9
  %81 = load i32, ptr %16, align 4, !tbaa !9
  %82 = add nsw i32 %80, %81
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds float, ptr %79, i64 %83
  store float %72, ptr %84, align 4, !tbaa !15
  br label %85

85:                                               ; preds = %57
  %86 = load i32, ptr %16, align 4, !tbaa !9
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %16, align 4, !tbaa !9
  br label %52, !llvm.loop !17

88:                                               ; preds = %56
  br label %89

89:                                               ; preds = %88
  %90 = load i32, ptr %15, align 4, !tbaa !9
  %91 = load i32, ptr %8, align 4, !tbaa !9
  %92 = add nsw i32 %90, %91
  store i32 %92, ptr %15, align 4, !tbaa !9
  br label %44, !llvm.loop !19

93:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  store i32 1, ptr %17, align 4, !tbaa !9
  br label %94

94:                                               ; preds = %135, %93
  %95 = load i32, ptr %17, align 4, !tbaa !9
  %96 = load i32, ptr %7, align 4, !tbaa !9
  %97 = icmp slt i32 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  store i32 11, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  br label %138

99:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %100

100:                                              ; preds = %131, %99
  %101 = load i32, ptr %18, align 4, !tbaa !9
  %102 = load ptr, ptr %12, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.matrix_t, ptr %102, i32 0, i32 1
  %104 = load i32, ptr %103, align 4, !tbaa !13
  %105 = icmp slt i32 %101, %104
  br i1 %105, label %107, label %106

106:                                              ; preds = %100
  store i32 14, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  br label %134

107:                                              ; preds = %100
  %108 = load ptr, ptr %12, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.matrix_t, ptr %108, i32 0, i32 2
  %110 = load ptr, ptr %109, align 8, !tbaa !14
  %111 = load i32, ptr %13, align 4, !tbaa !9
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds ptr, ptr %110, i64 %112
  %114 = load ptr, ptr %113, align 8, !tbaa !5
  %115 = load i32, ptr %18, align 4, !tbaa !9
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds float, ptr %114, i64 %116
  %118 = load float, ptr %117, align 4, !tbaa !15
  %119 = load ptr, ptr %12, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.matrix_t, ptr %119, i32 0, i32 2
  %121 = load ptr, ptr %120, align 8, !tbaa !14
  %122 = load i32, ptr %13, align 4, !tbaa !9
  %123 = load i32, ptr %17, align 4, !tbaa !9
  %124 = add nsw i32 %122, %123
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds ptr, ptr %121, i64 %125
  %127 = load ptr, ptr %126, align 8, !tbaa !5
  %128 = load i32, ptr %18, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds float, ptr %127, i64 %129
  store float %118, ptr %130, align 4, !tbaa !15
  br label %131

131:                                              ; preds = %107
  %132 = load i32, ptr %18, align 4, !tbaa !9
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %18, align 4, !tbaa !9
  br label %100, !llvm.loop !20

134:                                              ; preds = %106
  br label %135

135:                                              ; preds = %134
  %136 = load i32, ptr %17, align 4, !tbaa !9
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %17, align 4, !tbaa !9
  br label %94, !llvm.loop !21

138:                                              ; preds = %98
  br label %139

139:                                              ; preds = %138
  %140 = load i32, ptr %13, align 4, !tbaa !9
  %141 = load i32, ptr %7, align 4, !tbaa !9
  %142 = add nsw i32 %140, %141
  store i32 %142, ptr %13, align 4, !tbaa !9
  br label %36, !llvm.loop !22

143:                                              ; preds = %42
  %144 = load ptr, ptr %12, align 8, !tbaa !5
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  ret ptr %144
}

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 0}
!12 = !{!"matrix_t", !10, i64 0, !10, i64 4, !6, i64 8}
!13 = !{!12, !10, i64 4}
!14 = !{!12, !6, i64 8}
!15 = !{!16, !16, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !18}
!21 = distinct !{!21, !18}
!22 = distinct !{!22, !18}


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

declare i64 @px_create_size(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @create_matrix(i64) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @matrix_upsample(ptr nocapture noundef readonly %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #1 {
  %4 = load i32, ptr %0, align 8, !tbaa !5
  %5 = mul nsw i32 %4, %2
  %6 = getelementptr inbounds i8, ptr %0, i64 4
  %7 = load i32, ptr %6, align 4, !tbaa !11
  %8 = mul nsw i32 %7, %1
  %9 = tail call i64 @px_create_size(i32 noundef %5, i32 noundef %8) #2
  %10 = tail call ptr @create_matrix(i64 %9)
  %11 = load i32, ptr %10, align 8, !tbaa !5
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.preheader49.lr.ph, label %._crit_edge

.preheader49.lr.ph:                               ; preds = %3
  %13 = getelementptr inbounds i8, ptr %10, i64 4
  %14 = load i32, ptr %13, align 4, !tbaa !11
  %15 = icmp sgt i32 %14, 0
  %16 = icmp sgt i32 %1, 0
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  %18 = getelementptr inbounds i8, ptr %10, i64 8
  %19 = icmp sgt i32 %2, 1
  br i1 %15, label %.preheader49.us.preheader, label %._crit_edge

.preheader49.us.preheader:                        ; preds = %.preheader49.lr.ph
  %20 = zext i32 %1 to i64
  %21 = sext i32 %2 to i64
  %22 = zext nneg i32 %11 to i64
  %wide.trip.count110 = zext nneg i32 %2 to i64
  %wide.trip.count105 = zext nneg i32 %14 to i64
  %min.iters.check120 = icmp ult i32 %1, 8
  %n.vec123 = and i64 %20, 2147483640
  %cmp.n128 = icmp eq i64 %n.vec123, %20
  %min.iters.check = icmp ult i32 %14, 8
  %n.vec = and i64 %wide.trip.count105, 2147483640
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count105
  %xtraiter = and i64 %wide.trip.count105, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader49.us

.preheader49.us:                                  ; preds = %.preheader49.us.preheader, %._crit_edge54.us
  %indvars.iv112 = phi i64 [ 0, %.preheader49.us.preheader ], [ %indvars.iv.next113, %._crit_edge54.us ]
  br i1 %16, label %.preheader47.lr.ph.split.us.us, label %..preheader48_crit_edge.us

._crit_edge54.us:                                 ; preds = %._crit_edge.us55.us, %..preheader48_crit_edge.us
  %indvars.iv.next113 = add nsw i64 %indvars.iv112, %21
  %23 = icmp slt i64 %indvars.iv.next113, %22
  br i1 %23, label %.preheader49.us, label %._crit_edge, !llvm.loop !12

..preheader48_crit_edge.us:                       ; preds = %._crit_edge.us.us, %.preheader49.us
  br i1 %19, label %.preheader.lr.ph.split.us.us, label %._crit_edge54.us

.preheader47.lr.ph.split.us.us:                   ; preds = %.preheader49.us
  %24 = load ptr, ptr %17, align 8, !tbaa !14
  %25 = trunc nsw i64 %indvars.iv112 to i32
  %26 = sdiv i32 %25, %2
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds ptr, ptr %24, i64 %27
  %29 = load ptr, ptr %28, align 8, !tbaa !15
  %30 = load ptr, ptr %18, align 8, !tbaa !14
  %31 = getelementptr inbounds ptr, ptr %30, i64 %indvars.iv112
  %32 = load ptr, ptr %31, align 8, !tbaa !15
  br label %.preheader47.us.us

.preheader47.us.us:                               ; preds = %._crit_edge.us.us, %.preheader47.lr.ph.split.us.us
  %indvars.iv99 = phi i64 [ %indvars.iv.next100, %._crit_edge.us.us ], [ 0, %.preheader47.lr.ph.split.us.us ]
  %33 = trunc nuw i64 %indvars.iv99 to i32
  %34 = udiv i32 %33, %1
  %35 = zext nneg i32 %34 to i64
  %36 = getelementptr inbounds float, ptr %29, i64 %35
  %.pre = load float, ptr %36, align 4, !tbaa !16
  %invariant.gep = getelementptr inbounds float, ptr %32, i64 %indvars.iv99
  br i1 %min.iters.check120, label %scalar.ph119.preheader, label %vector.ph121

vector.ph121:                                     ; preds = %.preheader47.us.us
  %broadcast.splatinsert = insertelement <4 x float> poison, float %.pre, i64 0
  %broadcast.splat = shufflevector <4 x float> %broadcast.splatinsert, <4 x float> poison, <4 x i32> zeroinitializer
  br label %vector.body125

vector.body125:                                   ; preds = %vector.body125, %vector.ph121
  %index126 = phi i64 [ 0, %vector.ph121 ], [ %index.next127, %vector.body125 ]
  %37 = getelementptr inbounds float, ptr %invariant.gep, i64 %index126
  %38 = getelementptr inbounds i8, ptr %37, i64 16
  store <4 x float> %broadcast.splat, ptr %37, align 4, !tbaa !16
  store <4 x float> %broadcast.splat, ptr %38, align 4, !tbaa !16
  %index.next127 = add nuw i64 %index126, 8
  %39 = icmp eq i64 %index.next127, %n.vec123
  br i1 %39, label %middle.block118, label %vector.body125, !llvm.loop !18

middle.block118:                                  ; preds = %vector.body125
  br i1 %cmp.n128, label %._crit_edge.us.us, label %scalar.ph119.preheader

scalar.ph119.preheader:                           ; preds = %middle.block118, %.preheader47.us.us
  %indvars.iv94.ph = phi i64 [ 0, %.preheader47.us.us ], [ %n.vec123, %middle.block118 ]
  br label %scalar.ph119

scalar.ph119:                                     ; preds = %scalar.ph119.preheader, %scalar.ph119
  %indvars.iv94 = phi i64 [ %indvars.iv.next95, %scalar.ph119 ], [ %indvars.iv94.ph, %scalar.ph119.preheader ]
  %gep = getelementptr inbounds float, ptr %invariant.gep, i64 %indvars.iv94
  store float %.pre, ptr %gep, align 4, !tbaa !16
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %exitcond98.not = icmp eq i64 %indvars.iv.next95, %20
  br i1 %exitcond98.not, label %._crit_edge.us.us, label %scalar.ph119, !llvm.loop !21

._crit_edge.us.us:                                ; preds = %scalar.ph119, %middle.block118
  %indvars.iv.next100 = add nuw nsw i64 %indvars.iv99, %20
  %40 = trunc nuw i64 %indvars.iv.next100 to i32
  %41 = icmp sgt i32 %14, %40
  br i1 %41, label %.preheader47.us.us, label %..preheader48_crit_edge.us, !llvm.loop !22

.preheader.lr.ph.split.us.us:                     ; preds = %..preheader48_crit_edge.us
  %42 = load ptr, ptr %18, align 8, !tbaa !14
  %43 = getelementptr inbounds ptr, ptr %42, i64 %indvars.iv112
  %44 = load ptr, ptr %43, align 8, !tbaa !15
  %45 = ptrtoint ptr %44 to i64
  %invariant.gep115 = getelementptr ptr, ptr %42, i64 %indvars.iv112
  br label %.preheader.us.us

.preheader.us.us:                                 ; preds = %._crit_edge.us55.us, %.preheader.lr.ph.split.us.us
  %indvars.iv107 = phi i64 [ %indvars.iv.next108, %._crit_edge.us55.us ], [ 1, %.preheader.lr.ph.split.us.us ]
  %gep116 = getelementptr ptr, ptr %invariant.gep115, i64 %indvars.iv107
  %46 = load ptr, ptr %gep116, align 8, !tbaa !15
  %47 = ptrtoint ptr %46 to i64
  %48 = sub i64 %47, %45
  %diff.check = icmp ult i64 %48, 32
  %or.cond = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %.preheader.us.us, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.preheader.us.us ]
  %49 = getelementptr inbounds float, ptr %44, i64 %index
  %50 = getelementptr inbounds i8, ptr %49, i64 16
  %wide.load = load <4 x float>, ptr %49, align 4, !tbaa !16
  %wide.load117 = load <4 x float>, ptr %50, align 4, !tbaa !16
  %51 = getelementptr inbounds float, ptr %46, i64 %index
  %52 = getelementptr inbounds i8, ptr %51, i64 16
  store <4 x float> %wide.load, ptr %51, align 4, !tbaa !16
  store <4 x float> %wide.load117, ptr %52, align 4, !tbaa !16
  %index.next = add nuw i64 %index, 8
  %53 = icmp eq i64 %index.next, %n.vec
  br i1 %53, label %middle.block, label %vector.body, !llvm.loop !23

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us55.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader.us.us
  %indvars.iv102.ph = phi i64 [ 0, %.preheader.us.us ], [ %n.vec, %middle.block ]
  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.iv102.prol = phi i64 [ %indvars.iv.next103.prol, %scalar.ph.prol ], [ %indvars.iv102.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %54 = getelementptr inbounds float, ptr %44, i64 %indvars.iv102.prol
  %55 = load float, ptr %54, align 4, !tbaa !16
  %56 = getelementptr inbounds float, ptr %46, i64 %indvars.iv102.prol
  store float %55, ptr %56, align 4, !tbaa !16
  %indvars.iv.next103.prol = add nuw nsw i64 %indvars.iv102.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 !24

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv102.unr = phi i64 [ %indvars.iv102.ph, %scalar.ph.preheader ], [ %indvars.iv.next103.prol, %scalar.ph.prol ]
  %57 = sub nsw i64 %indvars.iv102.ph, %wide.trip.count105
  %58 = icmp ugt i64 %57, -4
  br i1 %58, label %._crit_edge.us55.us, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv102 = phi i64 [ %indvars.iv.next103.3, %scalar.ph ], [ %indvars.iv102.unr, %scalar.ph.prol.loopexit ]
  %59 = getelementptr inbounds float, ptr %44, i64 %indvars.iv102
  %60 = load float, ptr %59, align 4, !tbaa !16
  %61 = getelementptr inbounds float, ptr %46, i64 %indvars.iv102
  store float %60, ptr %61, align 4, !tbaa !16
  %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
  %62 = getelementptr inbounds float, ptr %44, i64 %indvars.iv.next103
  %63 = load float, ptr %62, align 4, !tbaa !16
  %64 = getelementptr inbounds float, ptr %46, i64 %indvars.iv.next103
  store float %63, ptr %64, align 4, !tbaa !16
  %indvars.iv.next103.1 = add nuw nsw i64 %indvars.iv102, 2
  %65 = getelementptr inbounds float, ptr %44, i64 %indvars.iv.next103.1
  %66 = load float, ptr %65, align 4, !tbaa !16
  %67 = getelementptr inbounds float, ptr %46, i64 %indvars.iv.next103.1
  store float %66, ptr %67, align 4, !tbaa !16
  %indvars.iv.next103.2 = add nuw nsw i64 %indvars.iv102, 3
  %68 = getelementptr inbounds float, ptr %44, i64 %indvars.iv.next103.2
  %69 = load float, ptr %68, align 4, !tbaa !16
  %70 = getelementptr inbounds float, ptr %46, i64 %indvars.iv.next103.2
  store float %69, ptr %70, align 4, !tbaa !16
  %indvars.iv.next103.3 = add nuw nsw i64 %indvars.iv102, 4
  %exitcond106.not.3 = icmp eq i64 %indvars.iv.next103.3, %wide.trip.count105
  br i1 %exitcond106.not.3, label %._crit_edge.us55.us, label %scalar.ph, !llvm.loop !26

._crit_edge.us55.us:                              ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %exitcond111.not = icmp eq i64 %indvars.iv.next108, %wide.trip.count110
  br i1 %exitcond111.not, label %._crit_edge54.us, label %.preheader.us.us, !llvm.loop !27

._crit_edge:                                      ; preds = %._crit_edge54.us, %.preheader49.lr.ph, %3
  ret ptr %10
}

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


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