; LLVM IR from zchrissirhcz/pixel :: src (px_convolution)

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

; 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

declare void @px_destroy_matrix(ptr noundef) #2

declare ptr @px_create_matrix(i64) #2

; Function Attrs: nounwind uwtable
define dso_local ptr @px_forward_convolution_layer_for_matrix(ptr noundef %0, ptr noundef %1, ptr noundef byval(%struct.px_conv_param_t) align 8 %2, float noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca float, align 4
  %8 = alloca %struct.px_pad_t, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %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 %struct.px_size_t, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca float, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca float, align 4
  %29 = alloca float, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store float %3, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #5
  %32 = call { i64, i64 } @px_get_pad_from_conv_param(ptr noundef byval(%struct.px_conv_param_t) align 8 %2)
  %33 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 0
  %34 = extractvalue { i64, i64 } %32, 0
  store i64 %34, ptr %33, align 4
  %35 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 1
  %36 = extractvalue { i64, i64 } %32, 1
  store i64 %36, ptr %35, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 0
  %39 = load i64, ptr %38, align 4
  %40 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 1
  %41 = load i64, ptr %40, align 4
  %42 = call ptr @px_copy_make_border_for_matrix(ptr noundef %37, i64 %39, i64 %41)
  store ptr %42, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.px_matrix_t, ptr %43, i32 0, i32 1
  %45 = load i32, ptr %44, align 8, !tbaa !11
  store i32 %45, ptr %10, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.px_matrix_t, ptr %46, i32 0, i32 2
  %48 = load i32, ptr %47, align 4, !tbaa !15
  store i32 %48, ptr %11, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.px_matrix_t, ptr %49, i32 0, i32 1
  %51 = load i32, ptr %50, align 8, !tbaa !11
  store i32 %51, ptr %12, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.px_matrix_t, ptr %52, i32 0, i32 2
  %54 = load i32, ptr %53, align 4, !tbaa !15
  store i32 %54, ptr %13, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %55 = getelementptr inbounds %struct.px_conv_param_t, ptr %2, i32 0, i32 0
  %56 = load i32, ptr %55, align 8, !tbaa !16
  store i32 %56, ptr %14, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %57 = getelementptr inbounds %struct.px_conv_param_t, ptr %2, i32 0, i32 1
  %58 = load i32, ptr %57, align 4, !tbaa !18
  store i32 %58, ptr %15, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %59 = load i32, ptr %10, align 4, !tbaa !14
  %60 = load i32, ptr %12, align 4, !tbaa !14
  %61 = sub nsw i32 %59, %60
  %62 = load i32, ptr %14, align 4, !tbaa !14
  %63 = sdiv i32 %61, %62
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %16, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %65 = load i32, ptr %11, align 4, !tbaa !14
  %66 = load i32, ptr %13, align 4, !tbaa !14
  %67 = sub nsw i32 %65, %66
  %68 = load i32, ptr %15, align 4, !tbaa !14
  %69 = sdiv i32 %67, %68
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %17, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.memset.p0.i64(ptr align 4 %18, i8 0, i64 8, i1 false)
  %71 = load i32, ptr %16, align 4, !tbaa !14
  %72 = getelementptr inbounds %struct.px_size_t, ptr %18, i32 0, i32 1
  store i32 %71, ptr %72, align 4, !tbaa !19
  %73 = load i32, ptr %17, align 4, !tbaa !14
  %74 = getelementptr inbounds %struct.px_size_t, ptr %18, i32 0, i32 0
  store i32 %73, ptr %74, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %75 = load i64, ptr %18, align 4
  %76 = call ptr @px_create_matrix(i64 %75)
  store ptr %76, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 0, ptr %20, align 4, !tbaa !14
  br label %77

77:                                               ; preds = %150, %4
  %78 = load i32, ptr %20, align 4, !tbaa !14
  %79 = load i32, ptr %12, align 4, !tbaa !14
  %80 = add nsw i32 %78, %79
  %81 = sub nsw i32 %80, 1
  %82 = load i32, ptr %10, align 4, !tbaa !14
  %83 = icmp slt i32 %81, %82
  br i1 %83, label %85, label %84

84:                                               ; preds = %77
  store i32 2, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %154

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

86:                                               ; preds = %145, %85
  %87 = load i32, ptr %22, align 4, !tbaa !14
  %88 = load i32, ptr %13, align 4, !tbaa !14
  %89 = add nsw i32 %87, %88
  %90 = sub nsw i32 %89, 1
  %91 = load i32, ptr %11, align 4, !tbaa !14
  %92 = icmp slt i32 %90, %91
  br i1 %92, label %94, label %93

93:                                               ; preds = %86
  store i32 5, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %149

94:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %95 = load float, ptr %7, align 4, !tbaa !9
  store float %95, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 0, ptr %24, align 4, !tbaa !14
  br label %96

96:                                               ; preds = %130, %94
  %97 = load i32, ptr %24, align 4, !tbaa !14
  %98 = load i32, ptr %12, align 4, !tbaa !14
  %99 = icmp slt i32 %97, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %96
  store i32 8, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %133

101:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  store i32 0, ptr %25, align 4, !tbaa !14
  br label %102

102:                                              ; preds = %126, %101
  %103 = load i32, ptr %25, align 4, !tbaa !14
  %104 = load i32, ptr %13, align 4, !tbaa !14
  %105 = icmp slt i32 %103, %104
  br i1 %105, label %107, label %106

106:                                              ; preds = %102
  store i32 11, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %129

107:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %108 = load i32, ptr %20, align 4, !tbaa !14
  %109 = load i32, ptr %24, align 4, !tbaa !14
  %110 = add nsw i32 %108, %109
  store i32 %110, ptr %26, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %111 = load i32, ptr %22, align 4, !tbaa !14
  %112 = load i32, ptr %25, align 4, !tbaa !14
  %113 = add nsw i32 %111, %112
  store i32 %113, ptr %27, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  %115 = load i32, ptr %26, align 4, !tbaa !14
  %116 = load i32, ptr %27, align 4, !tbaa !14
  %117 = call float @px_get_matrix_value(ptr noundef %114, i32 noundef %115, i32 noundef %116)
  store float %117, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = load i32, ptr %24, align 4, !tbaa !14
  %120 = load i32, ptr %25, align 4, !tbaa !14
  %121 = call float @px_get_matrix_value(ptr noundef %118, i32 noundef %119, i32 noundef %120)
  store float %121, ptr %29, align 4, !tbaa !9
  %122 = load float, ptr %28, align 4, !tbaa !9
  %123 = load float, ptr %29, align 4, !tbaa !9
  %124 = load float, ptr %23, align 4, !tbaa !9
  %125 = call float @llvm.fmuladd.f32(float %122, float %123, float %124)
  store float %125, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  br label %126

126:                                              ; preds = %107
  %127 = load i32, ptr %25, align 4, !tbaa !14
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %25, align 4, !tbaa !14
  br label %102, !llvm.loop !22

129:                                              ; preds = %106
  br label %130

130:                                              ; preds = %129
  %131 = load i32, ptr %24, align 4, !tbaa !14
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %24, align 4, !tbaa !14
  br label %96, !llvm.loop !24

133:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  %134 = load i32, ptr %20, align 4, !tbaa !14
  %135 = load i32, ptr %14, align 4, !tbaa !14
  %136 = sdiv i32 %134, %135
  store i32 %136, ptr %30, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  %137 = load i32, ptr %22, align 4, !tbaa !14
  %138 = load i32, ptr %15, align 4, !tbaa !14
  %139 = sdiv i32 %137, %138
  store i32 %139, ptr %31, align 4, !tbaa !14
  %140 = load ptr, ptr %19, align 8, !tbaa !5
  %141 = load i32, ptr %30, align 4, !tbaa !14
  %142 = load i32, ptr %31, align 4, !tbaa !14
  %143 = load float, ptr %23, align 4, !tbaa !9
  %144 = call i32 @px_set_matrix_value(ptr noundef %140, i32 noundef %141, i32 noundef %142, float noundef %143)
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  br label %145

145:                                              ; preds = %133
  %146 = load i32, ptr %15, align 4, !tbaa !14
  %147 = load i32, ptr %22, align 4, !tbaa !14
  %148 = add nsw i32 %147, %146
  store i32 %148, ptr %22, align 4, !tbaa !14
  br label %86, !llvm.loop !25

149:                                              ; preds = %93
  br label %150

150:                                              ; preds = %149
  %151 = load i32, ptr %14, align 4, !tbaa !14
  %152 = load i32, ptr %20, align 4, !tbaa !14
  %153 = add nsw i32 %152, %151
  store i32 %153, ptr %20, align 4, !tbaa !14
  br label %77, !llvm.loop !26

154:                                              ; preds = %84
  %155 = load ptr, ptr %9, align 8, !tbaa !5
  call void @px_destroy_matrix(ptr noundef %155)
  %156 = load ptr, ptr %19, align 8, !tbaa !5
  store i32 1, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  ret ptr %156
}

; Function Attrs: nounwind uwtable
declare dso_local { i64, i64 } @px_get_pad_from_conv_param(ptr noundef byval(%struct.px_conv_param_t) align 8) #3

declare ptr @px_copy_make_border_for_matrix(ptr noundef, i64, i64) #2

declare float @px_get_matrix_value(ptr noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

declare i32 @px_set_matrix_value(ptr noundef, i32 noundef, i32 noundef, float noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"px_matrix_t", !6, i64 0, !13, i64 8, !13, i64 12}
!13 = !{!"int", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!12, !13, i64 12}
!16 = !{!17, !13, i64 0}
!17 = !{!"px_conv_param_t", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20}
!18 = !{!17, !13, i64 4}
!19 = !{!20, !13, i64 4}
!20 = !{!"px_size_t", !13, i64 0, !13, i64 4}
!21 = !{!20, !13, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !23}


; 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.px_conv_param_t = type { i32, i32, i32, i32, i32, i32 }

declare void @px_destroy_matrix(ptr noundef) local_unnamed_addr #0

declare ptr @px_create_matrix(i64) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local ptr @px_forward_convolution_layer_for_matrix(ptr noundef %0, ptr noundef %1, ptr noundef byval(%struct.px_conv_param_t) align 8 %2, float noundef %3) local_unnamed_addr #1 {
  %5 = tail call { i64, i64 } @px_get_pad_from_conv_param(ptr noundef nonnull byval(%struct.px_conv_param_t) align 8 %2)
  %6 = extractvalue { i64, i64 } %5, 0
  %7 = extractvalue { i64, i64 } %5, 1
  %8 = tail call ptr @px_copy_make_border_for_matrix(ptr noundef %0, i64 %6, i64 %7) #3
  %9 = getelementptr inbounds i8, ptr %8, i64 8
  %10 = load i32, ptr %9, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %8, i64 12
  %12 = load i32, ptr %11, align 4, !tbaa !11
  %13 = getelementptr inbounds i8, ptr %1, i64 8
  %14 = load i32, ptr %13, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %1, i64 12
  %16 = load i32, ptr %15, align 4, !tbaa !11
  %17 = load i32, ptr %2, align 8, !tbaa !12
  %18 = getelementptr inbounds i8, ptr %2, i64 4
  %19 = load i32, ptr %18, align 4, !tbaa !14
  %20 = sub nsw i32 %10, %14
  %21 = sdiv i32 %20, %17
  %22 = add nsw i32 %21, 1
  %23 = sub nsw i32 %12, %16
  %24 = sdiv i32 %23, %19
  %25 = add nsw i32 %24, 1
  %.sroa.5.0.insert.ext = zext i32 %22 to i64
  %.sroa.5.0.insert.shift = shl nuw i64 %.sroa.5.0.insert.ext, 32
  %.sroa.0.0.insert.ext = zext i32 %25 to i64
  %.sroa.0.0.insert.insert = or disjoint i64 %.sroa.5.0.insert.shift, %.sroa.0.0.insert.ext
  %26 = tail call ptr @px_create_matrix(i64 %.sroa.0.0.insert.insert) #3
  %.not73 = icmp sgt i32 %14, %10
  br i1 %.not73, label %._crit_edge77, label %.preheader59.lr.ph

.preheader59.lr.ph:                               ; preds = %4
  %.not5766 = icmp sgt i32 %16, %12
  %27 = icmp sgt i32 %16, 0
  br i1 %.not5766, label %._crit_edge77, label %.preheader59.lr.ph.split

.preheader59.lr.ph.split:                         ; preds = %.preheader59.lr.ph
  %28 = icmp sgt i32 %14, 0
  br i1 %28, label %.preheader59.lr.ph.split.split.us, label %.preheader59

.preheader59.lr.ph.split.split.us:                ; preds = %.preheader59.lr.ph.split
  br i1 %27, label %.preheader59.us78.us, label %.preheader59.us78

.preheader59.us78.us:                             ; preds = %.preheader59.lr.ph.split.split.us, %._crit_edge.split.us.split.us.us.us
  %.074.us79.us = phi i32 [ %42, %._crit_edge.split.us.split.us.us.us ], [ 0, %.preheader59.lr.ph.split.split.us ]
  br label %.preheader58.us.us.us.us

.preheader58.us.us.us.us:                         ; preds = %._crit_edge64.split.us.us.us.us.us, %.preheader59.us78.us
  %.05367.us.us.us.us = phi i32 [ 0, %.preheader59.us78.us ], [ %40, %._crit_edge64.split.us.us.us.us.us ]
  br label %.preheader.us.us.us.us.us

.preheader.us.us.us.us.us:                        ; preds = %._crit_edge.us.us.us.us.us, %.preheader58.us.us.us.us
  %.05463.us.us.us.us.us = phi float [ %3, %.preheader58.us.us.us.us ], [ %34, %._crit_edge.us.us.us.us.us ]
  %.05662.us.us.us.us.us = phi i32 [ 0, %.preheader58.us.us.us.us ], [ %36, %._crit_edge.us.us.us.us.us ]
  %29 = add nsw i32 %.05662.us.us.us.us.us, %.074.us79.us
  br label %30

30:                                               ; preds = %30, %.preheader.us.us.us.us.us
  %.161.us.us.us.us.us = phi float [ %.05463.us.us.us.us.us, %.preheader.us.us.us.us.us ], [ %34, %30 ]
  %.05560.us.us.us.us.us = phi i32 [ 0, %.preheader.us.us.us.us.us ], [ %35, %30 ]
  %31 = add nsw i32 %.05560.us.us.us.us.us, %.05367.us.us.us.us
  %32 = tail call float @px_get_matrix_value(ptr noundef %8, i32 noundef %29, i32 noundef %31) #3
  %33 = tail call float @px_get_matrix_value(ptr noundef %1, i32 noundef %.05662.us.us.us.us.us, i32 noundef %.05560.us.us.us.us.us) #3
  %34 = tail call float @llvm.fmuladd.f32(float %32, float %33, float %.161.us.us.us.us.us)
  %35 = add nuw nsw i32 %.05560.us.us.us.us.us, 1
  %exitcond.not = icmp eq i32 %35, %16
  br i1 %exitcond.not, label %._crit_edge.us.us.us.us.us, label %30, !llvm.loop !15

._crit_edge.us.us.us.us.us:                       ; preds = %30
  %36 = add nuw nsw i32 %.05662.us.us.us.us.us, 1
  %exitcond89.not = icmp eq i32 %36, %14
  br i1 %exitcond89.not, label %._crit_edge64.split.us.us.us.us.us, label %.preheader.us.us.us.us.us, !llvm.loop !17

._crit_edge64.split.us.us.us.us.us:               ; preds = %._crit_edge.us.us.us.us.us
  %37 = sdiv i32 %.074.us79.us, %17
  %38 = sdiv i32 %.05367.us.us.us.us, %19
  %39 = tail call i32 @px_set_matrix_value(ptr noundef %26, i32 noundef %37, i32 noundef %38, float noundef %34) #3
  %40 = add nsw i32 %.05367.us.us.us.us, %19
  %41 = add nsw i32 %40, %16
  %.not57.us.us.us.us = icmp sgt i32 %41, %12
  br i1 %.not57.us.us.us.us, label %._crit_edge.split.us.split.us.us.us, label %.preheader58.us.us.us.us, !llvm.loop !18

._crit_edge.split.us.split.us.us.us:              ; preds = %._crit_edge64.split.us.us.us.us.us
  %42 = add nsw i32 %.074.us79.us, %17
  %43 = add nsw i32 %42, %14
  %.not.us80.us = icmp sgt i32 %43, %10
  br i1 %.not.us80.us, label %._crit_edge77, label %.preheader59.us78.us, !llvm.loop !19

.preheader59.us78:                                ; preds = %.preheader59.lr.ph.split.split.us, %._crit_edge.split.us.split.us84
  %.074.us79 = phi i32 [ %49, %._crit_edge.split.us.split.us84 ], [ 0, %.preheader59.lr.ph.split.split.us ]
  %44 = sdiv i32 %.074.us79, %17
  br label %.preheader58.us.us81

.preheader58.us.us81:                             ; preds = %.preheader59.us78, %.preheader58.us.us81
  %.05367.us.us82 = phi i32 [ 0, %.preheader59.us78 ], [ %47, %.preheader58.us.us81 ]
  %45 = sdiv i32 %.05367.us.us82, %19
  %46 = tail call i32 @px_set_matrix_value(ptr noundef %26, i32 noundef %44, i32 noundef %45, float noundef %3) #3
  %47 = add nsw i32 %.05367.us.us82, %19
  %48 = add nsw i32 %47, %16
  %.not57.us.us83 = icmp sgt i32 %48, %12
  br i1 %.not57.us.us83, label %._crit_edge.split.us.split.us84, label %.preheader58.us.us81, !llvm.loop !18

._crit_edge.split.us.split.us84:                  ; preds = %.preheader58.us.us81
  %49 = add nsw i32 %.074.us79, %17
  %50 = add nsw i32 %49, %14
  %.not.us80 = icmp sgt i32 %50, %10
  br i1 %.not.us80, label %._crit_edge77, label %.preheader59.us78, !llvm.loop !19

.preheader59:                                     ; preds = %.preheader59.lr.ph.split, %._crit_edge.split
  %.074 = phi i32 [ %56, %._crit_edge.split ], [ 0, %.preheader59.lr.ph.split ]
  %51 = sdiv i32 %.074, %17
  br label %.preheader58

._crit_edge77:                                    ; preds = %._crit_edge.split, %._crit_edge.split.us.split.us84, %._crit_edge.split.us.split.us.us.us, %.preheader59.lr.ph, %4
  tail call void @px_destroy_matrix(ptr noundef %8) #3
  ret ptr %26

.preheader58:                                     ; preds = %.preheader59, %.preheader58
  %.05367 = phi i32 [ 0, %.preheader59 ], [ %54, %.preheader58 ]
  %52 = sdiv i32 %.05367, %19
  %53 = tail call i32 @px_set_matrix_value(ptr noundef %26, i32 noundef %51, i32 noundef %52, float noundef %3) #3
  %54 = add nsw i32 %.05367, %19
  %55 = add nsw i32 %54, %16
  %.not57 = icmp sgt i32 %55, %12
  br i1 %.not57, label %._crit_edge.split, label %.preheader58, !llvm.loop !18

._crit_edge.split:                                ; preds = %.preheader58
  %56 = add nsw i32 %.074, %17
  %57 = add nsw i32 %56, %14
  %.not = icmp sgt i32 %57, %10
  br i1 %.not, label %._crit_edge77, label %.preheader59, !llvm.loop !19
}

; Function Attrs: nounwind uwtable
declare dso_local { i64, i64 } @px_get_pad_from_conv_param(ptr noundef byval(%struct.px_conv_param_t) align 8) local_unnamed_addr #1

declare ptr @px_copy_make_border_for_matrix(ptr noundef, i64, i64) local_unnamed_addr #0

declare float @px_get_matrix_value(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #2

declare i32 @px_set_matrix_value(ptr noundef, i32 noundef, i32 noundef, float noundef) local_unnamed_addr #0

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


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