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

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

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 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 i64 @px_create_size(i32 noundef, i32 noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @get_pooling_out_size(i64, i64, i64, i64, i64) #2

; Function Attrs: nounwind uwtable
define dso_local void @forward_avg_pooling_for_matrix(ptr noundef %0, ptr noundef %1, i64 %2, i64 %3, i64 %4, i64 %5) #2 {
  %7 = alloca %struct.px_size_t, align 4
  %8 = alloca %struct.px_size_t, align 4
  %9 = alloca %struct.px_pad_t, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %struct.px_size_t, align 4
  %13 = alloca %struct.px_size_t, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca float, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store i64 %2, ptr %7, align 4
  store i64 %3, ptr %8, align 4
  %20 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 0
  store i64 %4, ptr %20, align 4
  %21 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 1
  store i64 %5, ptr %21, align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %22 = load ptr, ptr %10, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.matrix_t, ptr %22, i32 0, i32 0
  %24 = load i32, ptr %23, align 8, !tbaa !9
  %25 = load ptr, ptr %10, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.matrix_t, ptr %25, i32 0, i32 1
  %27 = load i32, ptr %26, align 4, !tbaa !12
  %28 = call i64 @px_create_size(i32 noundef %24, i32 noundef %27)
  store i64 %28, ptr %12, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %29 = load i64, ptr %12, align 4
  %30 = load i64, ptr %7, align 4
  %31 = load i64, ptr %8, align 4
  %32 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 0
  %33 = load i64, ptr %32, align 4
  %34 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 1
  %35 = load i64, ptr %34, align 4
  %36 = call i64 @get_pooling_out_size(i64 %29, i64 %30, i64 %31, i64 %33, i64 %35)
  store i64 %36, ptr %13, align 4
  %37 = load ptr, ptr %11, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.matrix_t, ptr %37, i32 0, i32 1
  %39 = load i32, ptr %38, align 4, !tbaa !12
  %40 = getelementptr inbounds %struct.px_size_t, ptr %13, i32 0, i32 0
  %41 = load i32, ptr %40, align 4, !tbaa !13
  %42 = icmp ne i32 %39, %41
  br i1 %42, label %50, label %43

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

50:                                               ; preds = %43, %6
  br label %51

51:                                               ; preds = %50
  %52 = load ptr, ptr @stderr, align 8, !tbaa !5
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef @.str) #4
  %54 = load ptr, ptr @stderr, align 8, !tbaa !5
  %55 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef @.str.1) #4
  br label %56

56:                                               ; preds = %51
  br label %57

57:                                               ; preds = %56
  store i32 1, ptr %14, align 4
  br label %150

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

59:                                               ; preds = %146, %58
  %60 = load i32, ptr %15, align 4, !tbaa !16
  %61 = load ptr, ptr %11, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.matrix_t, ptr %61, i32 0, i32 0
  %63 = load i32, ptr %62, align 8, !tbaa !9
  %64 = icmp slt i32 %60, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %59
  store i32 4, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %149

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

67:                                               ; preds = %142, %66
  %68 = load i32, ptr %16, align 4, !tbaa !16
  %69 = load ptr, ptr %11, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.matrix_t, ptr %69, i32 0, i32 1
  %71 = load i32, ptr %70, align 4, !tbaa !12
  %72 = icmp slt i32 %68, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %67
  store i32 7, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %145

74:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store float 0.000000e+00, ptr %17, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %75 = load i32, ptr %15, align 4, !tbaa !16
  %76 = getelementptr inbounds %struct.px_size_t, ptr %7, i32 0, i32 1
  %77 = load i32, ptr %76, align 4, !tbaa !15
  %78 = mul nsw i32 %75, %77
  store i32 %78, ptr %18, align 4, !tbaa !16
  br label %79

79:                                               ; preds = %120, %74
  %80 = load i32, ptr %18, align 4, !tbaa !16
  %81 = load i32, ptr %15, align 4, !tbaa !16
  %82 = add nsw i32 %81, 1
  %83 = getelementptr inbounds %struct.px_size_t, ptr %7, i32 0, i32 1
  %84 = load i32, ptr %83, align 4, !tbaa !15
  %85 = mul nsw i32 %82, %84
  %86 = icmp slt i32 %80, %85
  br i1 %86, label %88, label %87

87:                                               ; preds = %79
  store i32 10, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %123

88:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %89 = load i32, ptr %16, align 4, !tbaa !16
  %90 = getelementptr inbounds %struct.px_size_t, ptr %7, i32 0, i32 0
  %91 = load i32, ptr %90, align 4, !tbaa !13
  %92 = mul nsw i32 %89, %91
  store i32 %92, ptr %19, align 4, !tbaa !16
  br label %93

93:                                               ; preds = %116, %88
  %94 = load i32, ptr %19, align 4, !tbaa !16
  %95 = load i32, ptr %16, align 4, !tbaa !16
  %96 = add nsw i32 %95, 1
  %97 = getelementptr inbounds %struct.px_size_t, ptr %7, i32 0, i32 0
  %98 = load i32, ptr %97, align 4, !tbaa !13
  %99 = mul nsw i32 %96, %98
  %100 = icmp slt i32 %94, %99
  br i1 %100, label %102, label %101

101:                                              ; preds = %93
  store i32 13, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %119

102:                                              ; preds = %93
  %103 = load float, ptr %17, align 4, !tbaa !17
  %104 = load ptr, ptr %10, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.matrix_t, ptr %104, i32 0, i32 2
  %106 = load ptr, ptr %105, align 8, !tbaa !19
  %107 = load i32, ptr %18, align 4, !tbaa !16
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds ptr, ptr %106, i64 %108
  %110 = load ptr, ptr %109, align 8, !tbaa !5
  %111 = load i32, ptr %19, align 4, !tbaa !16
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds float, ptr %110, i64 %112
  %114 = load float, ptr %113, align 4, !tbaa !17
  %115 = fadd float %103, %114
  store float %115, ptr %17, align 4, !tbaa !17
  br label %116

116:                                              ; preds = %102
  %117 = load i32, ptr %19, align 4, !tbaa !16
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %19, align 4, !tbaa !16
  br label %93, !llvm.loop !20

119:                                              ; preds = %101
  br label %120

120:                                              ; preds = %119
  %121 = load i32, ptr %18, align 4, !tbaa !16
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %18, align 4, !tbaa !16
  br label %79, !llvm.loop !22

123:                                              ; preds = %87
  %124 = load float, ptr %17, align 4, !tbaa !17
  %125 = getelementptr inbounds %struct.px_size_t, ptr %7, i32 0, i32 1
  %126 = load i32, ptr %125, align 4, !tbaa !15
  %127 = getelementptr inbounds %struct.px_size_t, ptr %7, i32 0, i32 0
  %128 = load i32, ptr %127, align 4, !tbaa !13
  %129 = mul nsw i32 %126, %128
  %130 = sitofp i32 %129 to float
  %131 = fdiv float %124, %130
  %132 = load ptr, ptr %11, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.matrix_t, ptr %132, i32 0, i32 2
  %134 = load ptr, ptr %133, align 8, !tbaa !19
  %135 = load i32, ptr %15, align 4, !tbaa !16
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds ptr, ptr %134, i64 %136
  %138 = load ptr, ptr %137, align 8, !tbaa !5
  %139 = load i32, ptr %16, align 4, !tbaa !16
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds float, ptr %138, i64 %140
  store float %131, ptr %141, align 4, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %142

142:                                              ; preds = %123
  %143 = load i32, ptr %16, align 4, !tbaa !16
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %16, align 4, !tbaa !16
  br label %67, !llvm.loop !23

145:                                              ; preds = %73
  br label %146

146:                                              ; preds = %145
  %147 = load i32, ptr %15, align 4, !tbaa !16
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %15, align 4, !tbaa !16
  br label %59, !llvm.loop !24

149:                                              ; preds = %65
  store i32 0, ptr %14, align 4
  br label %150

150:                                              ; preds = %149, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  %151 = load i32, ptr %14, align 4
  switch i32 %151, label %153 [
    i32 0, label %152
    i32 1, label %152
  ]

152:                                              ; preds = %150, %150
  ret void

153:                                              ; preds = %150
  unreachable
}

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !11, i64 0}
!10 = !{!"matrix_t", !11, i64 0, !11, i64 4, !6, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 4}
!13 = !{!14, !11, i64 0}
!14 = !{!"px_size_t", !11, i64 0, !11, i64 4}
!15 = !{!14, !11, i64 4}
!16 = !{!11, !11, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"float", !7, i64 0}
!19 = !{!10, !6, i64 8}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = distinct !{!23, !21}
!24 = distinct !{!24, !21}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @get_pooling_out_size(i64, i64, i64, i64, i64) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @forward_avg_pooling_for_matrix(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, i64 %2, i64 %3, i64 %4, i64 %5) local_unnamed_addr #1 {
  %.sroa.028.0.extract.trunc = trunc i64 %2 to i32
  %.sroa.5.0.extract.shift = lshr i64 %2, 32
  %.sroa.5.0.extract.trunc = trunc nuw i64 %.sroa.5.0.extract.shift to i32
  %7 = load i32, ptr %0, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 4
  %9 = load i32, ptr %8, align 4, !tbaa !11
  %10 = tail call i64 @px_create_size(i32 noundef %7, i32 noundef %9) #3
  %11 = tail call i64 @get_pooling_out_size(i64 %10, i64 %2, i64 %3, i64 %4, i64 %5)
  %.sroa.0.0.extract.trunc = trunc i64 %11 to i32
  %12 = getelementptr inbounds i8, ptr %1, i64 4
  %13 = load i32, ptr %12, align 4, !tbaa !11
  %.not = icmp eq i32 %13, %.sroa.0.0.extract.trunc
  br i1 %.not, label %14, label %65

14:                                               ; preds = %6
  %.sroa.4.0.extract.shift = lshr i64 %11, 32
  %.sroa.4.0.extract.trunc = trunc nuw i64 %.sroa.4.0.extract.shift to i32
  %15 = load i32, ptr %1, align 8, !tbaa !5
  %.not38 = icmp eq i32 %15, %.sroa.4.0.extract.trunc
  br i1 %.not38, label %.preheader39, label %65

.preheader39:                                     ; preds = %14
  %16 = icmp sgt i32 %.sroa.4.0.extract.trunc, 0
  br i1 %16, label %.preheader.lr.ph, label %.loopexit

.preheader.lr.ph:                                 ; preds = %.preheader39
  %17 = icmp sgt i32 %.sroa.0.0.extract.trunc, 0
  %18 = getelementptr inbounds i8, ptr %0, i64 8
  %19 = mul nsw i32 %.sroa.5.0.extract.trunc, %.sroa.028.0.extract.trunc
  %20 = sitofp i32 %19 to float
  %21 = fdiv float 0.000000e+00, %20
  br i1 %17, label %.preheader.lr.ph.split.us, label %.loopexit

.preheader.lr.ph.split.us:                        ; preds = %.preheader.lr.ph
  %22 = getelementptr inbounds i8, ptr %1, i64 8
  %23 = load ptr, ptr %22, align 8, !tbaa !12
  %sext = shl i64 %2, 32
  %24 = ashr exact i64 %sext, 32
  %25 = ashr i64 %2, 32
  %wide.trip.count = and i64 %11, 2147483647
  %wide.trip.count80 = and i64 %11, 2147483647
  %26 = add i32 %.sroa.028.0.extract.trunc, -1
  %min.iters.check = icmp ult i64 %wide.trip.count, 8
  %n.mod.vf = and i64 %11, 7
  %n.vec = sub nsw i64 %wide.trip.count, %n.mod.vf
  %broadcast.splatinsert = insertelement <4 x float> poison, float %21, i64 0
  %broadcast.splat = shufflevector <4 x float> %broadcast.splatinsert, <4 x float> poison, <4 x i32> zeroinitializer
  %cmp.n = icmp eq i64 %n.mod.vf, 0
  %xtraiter = and i32 %.sroa.028.0.extract.trunc, 7
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  %27 = icmp ult i32 %26, 7
  br label %.preheader.us

.preheader.us:                                    ; preds = %._crit_edge.us, %.preheader.lr.ph.split.us
  %indvars.iv82 = phi i64 [ %indvars.iv.next83, %._crit_edge.us ], [ 0, %.preheader.lr.ph.split.us ]
  %indvars.iv73 = phi i32 [ %indvars.iv.next74, %._crit_edge.us ], [ %.sroa.5.0.extract.trunc, %.preheader.lr.ph.split.us ]
  %indvars.iv68 = phi i64 [ %indvars.iv.next69, %._crit_edge.us ], [ 0, %.preheader.lr.ph.split.us ]
  %28 = mul nsw i64 %indvars.iv82, %25
  %indvars.iv.next83 = add nuw nsw i64 %indvars.iv82, 1
  %29 = mul nsw i64 %indvars.iv.next83, %25
  %30 = icmp slt i64 %28, %29
  %31 = getelementptr inbounds ptr, ptr %23, i64 %indvars.iv82
  %32 = load ptr, ptr %31, align 8, !tbaa !13
  br i1 %30, label %.lr.ph45.us.us, label %.lr.ph.split.us55.preheader

.lr.ph.split.us55.preheader:                      ; preds = %.preheader.us
  br i1 %min.iters.check, label %.lr.ph.split.us55.preheader90, label %vector.body

vector.body:                                      ; preds = %.lr.ph.split.us55.preheader, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.lr.ph.split.us55.preheader ]
  %33 = getelementptr inbounds float, ptr %32, i64 %index
  %34 = getelementptr inbounds i8, ptr %33, i64 16
  store <4 x float> %broadcast.splat, ptr %33, align 4, !tbaa !14
  store <4 x float> %broadcast.splat, ptr %34, align 4, !tbaa !14
  %index.next = add nuw i64 %index, 8
  %35 = icmp eq i64 %index.next, %n.vec
  br i1 %35, label %middle.block, label %vector.body, !llvm.loop !16

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

.lr.ph.split.us55.preheader90:                    ; preds = %middle.block, %.lr.ph.split.us55.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.split.us55.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph.split.us55

.lr.ph.split.us55:                                ; preds = %.lr.ph.split.us55.preheader90, %.lr.ph.split.us55
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph.split.us55 ], [ %indvars.iv.ph, %.lr.ph.split.us55.preheader90 ]
  %36 = getelementptr inbounds float, ptr %32, i64 %indvars.iv
  store float %21, ptr %36, align 4, !tbaa !14
  %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 %.lr.ph.split.us55, !llvm.loop !20

._crit_edge.us:                                   ; preds = %.lr.ph.split.us55, %._crit_edge46.us.us, %middle.block
  %indvars.iv.next69 = add nsw i64 %indvars.iv68, %25
  %indvars.iv.next74 = add i32 %indvars.iv73, %.sroa.5.0.extract.trunc
  %exitcond86.not = icmp eq i64 %indvars.iv.next83, %.sroa.4.0.extract.shift
  br i1 %exitcond86.not, label %.loopexit, label %.preheader.us, !llvm.loop !21

.lr.ph45.us.us:                                   ; preds = %.preheader.us, %._crit_edge46.us.us
  %indvars.iv77 = phi i64 [ %indvars.iv.next78, %._crit_edge46.us.us ], [ 0, %.preheader.us ]
  %indvars.iv65 = phi i32 [ %indvars.iv.next66, %._crit_edge46.us.us ], [ %.sroa.028.0.extract.trunc, %.preheader.us ]
  %indvars.iv60 = phi i64 [ %indvars.iv.next61, %._crit_edge46.us.us ], [ 0, %.preheader.us ]
  %37 = mul nsw i64 %indvars.iv77, %24
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %38 = mul nsw i64 %indvars.iv.next78, %24
  %39 = icmp slt i64 %37, %38
  br i1 %39, label %.lr.ph45.split.us.us.us, label %._crit_edge46.us.us

._crit_edge46.us.us.loopexit:                     ; preds = %._crit_edge.us.us.us
  %.pre = fdiv float %.lcssa, %20
  br label %._crit_edge46.us.us

._crit_edge46.us.us:                              ; preds = %.lr.ph45.us.us, %._crit_edge46.us.us.loopexit
  %.pre-phi = phi float [ %.pre, %._crit_edge46.us.us.loopexit ], [ %21, %.lr.ph45.us.us ]
  %40 = getelementptr inbounds float, ptr %32, i64 %indvars.iv77
  store float %.pre-phi, ptr %40, align 4, !tbaa !14
  %indvars.iv.next61 = add i64 %indvars.iv60, %24
  %indvars.iv.next66 = add i32 %indvars.iv65, %.sroa.028.0.extract.trunc
  %exitcond81.not = icmp eq i64 %indvars.iv.next78, %wide.trip.count80
  br i1 %exitcond81.not, label %._crit_edge.us, label %.lr.ph45.us.us, !llvm.loop !22

.lr.ph45.split.us.us.us:                          ; preds = %.lr.ph45.us.us
  %41 = load ptr, ptr %18, align 8, !tbaa !12
  br label %.lr.ph.us.us.us

.lr.ph.us.us.us:                                  ; preds = %._crit_edge.us.us.us, %.lr.ph45.split.us.us.us
  %indvars.iv70 = phi i64 [ %indvars.iv.next71, %._crit_edge.us.us.us ], [ %indvars.iv68, %.lr.ph45.split.us.us.us ]
  %.03542.us.us.us = phi float [ %.lcssa, %._crit_edge.us.us.us ], [ 0.000000e+00, %.lr.ph45.split.us.us.us ]
  %42 = getelementptr inbounds ptr, ptr %41, i64 %indvars.iv70
  %43 = load ptr, ptr %42, align 8, !tbaa !13
  br i1 %lcmp.mod.not, label %.prol.loopexit, label %.prol.preheader

.prol.preheader:                                  ; preds = %.lr.ph.us.us.us, %.prol.preheader
  %indvars.iv62.prol = phi i64 [ %indvars.iv.next63.prol, %.prol.preheader ], [ %indvars.iv60, %.lr.ph.us.us.us ]
  %.140.us.us.us.prol = phi float [ %46, %.prol.preheader ], [ %.03542.us.us.us, %.lr.ph.us.us.us ]
  %prol.iter = phi i32 [ %prol.iter.next, %.prol.preheader ], [ 0, %.lr.ph.us.us.us ]
  %44 = getelementptr inbounds float, ptr %43, i64 %indvars.iv62.prol
  %45 = load float, ptr %44, align 4, !tbaa !14
  %46 = fadd float %.140.us.us.us.prol, %45
  %indvars.iv.next63.prol = add nsw i64 %indvars.iv62.prol, 1
  %prol.iter.next = add i32 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i32 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.prol.loopexit, label %.prol.preheader, !llvm.loop !23

.prol.loopexit:                                   ; preds = %.prol.preheader, %.lr.ph.us.us.us
  %.lcssa.unr = phi float [ poison, %.lr.ph.us.us.us ], [ %46, %.prol.preheader ]
  %indvars.iv62.unr = phi i64 [ %indvars.iv60, %.lr.ph.us.us.us ], [ %indvars.iv.next63.prol, %.prol.preheader ]
  %.140.us.us.us.unr = phi float [ %.03542.us.us.us, %.lr.ph.us.us.us ], [ %46, %.prol.preheader ]
  br i1 %27, label %._crit_edge.us.us.us, label %.lr.ph.us.us.us.new

.lr.ph.us.us.us.new:                              ; preds = %.prol.loopexit
  %invariant.gep = getelementptr i8, ptr %43, i64 4
  %invariant.gep94 = getelementptr i8, ptr %43, i64 8
  %invariant.gep96 = getelementptr i8, ptr %43, i64 12
  %invariant.gep98 = getelementptr i8, ptr %43, i64 16
  %invariant.gep100 = getelementptr i8, ptr %43, i64 20
  %invariant.gep102 = getelementptr i8, ptr %43, i64 24
  %invariant.gep104 = getelementptr i8, ptr %43, i64 28
  br label %47

47:                                               ; preds = %47, %.lr.ph.us.us.us.new
  %indvars.iv62 = phi i64 [ %indvars.iv62.unr, %.lr.ph.us.us.us.new ], [ %indvars.iv.next63.7, %47 ]
  %.140.us.us.us = phi float [ %.140.us.us.us.unr, %.lr.ph.us.us.us.new ], [ %64, %47 ]
  %48 = getelementptr inbounds float, ptr %43, i64 %indvars.iv62
  %49 = load float, ptr %48, align 4, !tbaa !14
  %50 = fadd float %.140.us.us.us, %49
  %gep = getelementptr float, ptr %invariant.gep, i64 %indvars.iv62
  %51 = load float, ptr %gep, align 4, !tbaa !14
  %52 = fadd float %50, %51
  %gep95 = getelementptr float, ptr %invariant.gep94, i64 %indvars.iv62
  %53 = load float, ptr %gep95, align 4, !tbaa !14
  %54 = fadd float %52, %53
  %gep97 = getelementptr float, ptr %invariant.gep96, i64 %indvars.iv62
  %55 = load float, ptr %gep97, align 4, !tbaa !14
  %56 = fadd float %54, %55
  %gep99 = getelementptr float, ptr %invariant.gep98, i64 %indvars.iv62
  %57 = load float, ptr %gep99, align 4, !tbaa !14
  %58 = fadd float %56, %57
  %gep101 = getelementptr float, ptr %invariant.gep100, i64 %indvars.iv62
  %59 = load float, ptr %gep101, align 4, !tbaa !14
  %60 = fadd float %58, %59
  %gep103 = getelementptr float, ptr %invariant.gep102, i64 %indvars.iv62
  %61 = load float, ptr %gep103, align 4, !tbaa !14
  %62 = fadd float %60, %61
  %gep105 = getelementptr float, ptr %invariant.gep104, i64 %indvars.iv62
  %63 = load float, ptr %gep105, align 4, !tbaa !14
  %64 = fadd float %62, %63
  %indvars.iv.next63.7 = add nsw i64 %indvars.iv62, 8
  %lftr.wideiv.7 = trunc i64 %indvars.iv.next63.7 to i32
  %exitcond67.not.7 = icmp eq i32 %indvars.iv65, %lftr.wideiv.7
  br i1 %exitcond67.not.7, label %._crit_edge.us.us.us, label %47, !llvm.loop !25

._crit_edge.us.us.us:                             ; preds = %47, %.prol.loopexit
  %.lcssa = phi float [ %.lcssa.unr, %.prol.loopexit ], [ %64, %47 ]
  %indvars.iv.next71 = add nsw i64 %indvars.iv70, 1
  %lftr.wideiv75 = trunc i64 %indvars.iv.next71 to i32
  %exitcond76.not = icmp eq i32 %indvars.iv73, %lftr.wideiv75
  br i1 %exitcond76.not, label %._crit_edge46.us.us.loopexit, label %.lr.ph.us.us.us, !llvm.loop !26

65:                                               ; preds = %6, %14
  %66 = load ptr, ptr @stderr, align 8, !tbaa !13
  %67 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef nonnull @.str) #4
  %68 = load ptr, ptr @stderr, align 8, !tbaa !13
  %69 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %68, ptr noundef nonnull @.str.1) #4
  br label %.loopexit

.loopexit:                                        ; preds = %._crit_edge.us, %.preheader.lr.ph, %.preheader39, %65
  ret void
}

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

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 = { 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 #3 = { nounwind }
attributes #4 = { cold 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 = !{!6, !10, i64 8}
!13 = !{!10, !10, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !8, i64 0}
!16 = distinct !{!16, !17, !18, !19}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!"llvm.loop.isvectorized", i32 1}
!19 = !{!"llvm.loop.unroll.runtime.disable"}
!20 = distinct !{!20, !17, !19, !18}
!21 = distinct !{!21, !17}
!22 = distinct !{!22, !17}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.unroll.disable"}
!25 = distinct !{!25, !17}
!26 = distinct !{!26, !17}


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