; LLVM IR from ljm941004/HYPERCV_PUBLIC :: modules/algorithm/src (EdgeSignalEnergy)

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

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@__const.cal_edge_signal_energy.opt1 = external hidden unnamed_addr constant [9 x float], align 16
@__const.cal_edge_signal_energy.opt2 = external hidden unnamed_addr constant [9 x float], align 16

; Function Attrs: nounwind uwtable
define dso_local float @cal_edge_signal_energy(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca [9 x float], align 16
  %4 = alloca [9 x float], align 16
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca float, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = icmp ne ptr %15, null
  br i1 %16, label %17, label %18

17:                                               ; preds = %1
  br label %22

18:                                               ; preds = %1
  %19 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %20 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %21 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #6
  unreachable

22:                                               ; preds = %17
  %23 = load ptr, ptr %2, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %23, i32 0, i32 3
  store i32 1, ptr %24, align 4, !tbaa !9
  br i1 true, label %25, label %26

25:                                               ; preds = %22
  br label %30

26:                                               ; preds = %22
  %27 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %28 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  %29 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #6
  unreachable

30:                                               ; preds = %25
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %31, i32 0, i32 2
  store i32 1, ptr %32, align 8, !tbaa !12
  br i1 true, label %33, label %34

33:                                               ; preds = %30
  br label %38

34:                                               ; preds = %30
  %35 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %36 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  %37 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #6
  unreachable

38:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 36, ptr %3) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %3, ptr align 16 @__const.cal_edge_signal_energy.opt1, i64 36, i1 false)
  call void @llvm.lifetime.start.p0(i64 36, ptr %4) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %4, ptr align 16 @__const.cal_edge_signal_energy.opt2, i64 36, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !13
  br label %39

39:                                               ; preds = %60, %38
  %40 = load i32, ptr %5, align 4, !tbaa !13
  %41 = icmp slt i32 %40, 9
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %63

43:                                               ; preds = %39
  %44 = load i32, ptr %5, align 4, !tbaa !13
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [9 x float], ptr %3, i64 0, i64 %45
  %47 = load float, ptr %46, align 4, !tbaa !14
  %48 = fdiv float %47, 6.000000e+00
  %49 = load i32, ptr %5, align 4, !tbaa !13
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [9 x float], ptr %3, i64 0, i64 %50
  store float %48, ptr %51, align 4, !tbaa !14
  %52 = load i32, ptr %5, align 4, !tbaa !13
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [9 x float], ptr %4, i64 0, i64 %53
  %55 = load float, ptr %54, align 4, !tbaa !14
  %56 = fdiv float %55, 6.000000e+00
  %57 = load i32, ptr %5, align 4, !tbaa !13
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [9 x float], ptr %4, i64 0, i64 %58
  store float %56, ptr %59, align 4, !tbaa !14
  br label %60

60:                                               ; preds = %43
  %61 = load i32, ptr %5, align 4, !tbaa !13
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %5, align 4, !tbaa !13
  br label %39, !llvm.loop !16

63:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %64 = load ptr, ptr %2, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %64, i32 0, i32 0
  %66 = load i32, ptr %65, align 8, !tbaa !18
  store i32 %66, ptr %6, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %67 = load ptr, ptr %2, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %67, i32 0, i32 1
  %69 = load i32, ptr %68, align 4, !tbaa !19
  store i32 %69, ptr %7, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %70 = load i32, ptr %6, align 4, !tbaa !13
  %71 = load i32, ptr %7, align 4, !tbaa !13
  %72 = call ptr @create_simple_mat(i32 noundef %70, i32 noundef %71, i32 noundef 4, i32 noundef 1)
  store ptr %72, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %73 = load i32, ptr %6, align 4, !tbaa !13
  %74 = load i32, ptr %7, align 4, !tbaa !13
  %75 = call ptr @create_simple_mat(i32 noundef %73, i32 noundef %74, i32 noundef 4, i32 noundef 1)
  store ptr %75, ptr %9, align 8, !tbaa !5
  %76 = load ptr, ptr %2, align 8, !tbaa !5
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = getelementptr inbounds [9 x float], ptr %3, i64 0, i64 0
  call void @hypercv_filter2D(ptr noundef %76, ptr noundef %77, ptr noundef %78, i32 noundef 3, i32 noundef 3, i32 noundef 0)
  %79 = load ptr, ptr %2, align 8, !tbaa !5
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = getelementptr inbounds [9 x float], ptr %4, i64 0, i64 0
  call void @hypercv_filter2D(ptr noundef %79, ptr noundef %80, ptr noundef %81, i32 noundef 3, i32 noundef 3, i32 noundef 0)
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  call void @simple_mat_addition_float(ptr noundef %82, ptr noundef %83, ptr noundef %84)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %85, i32 0, i32 5
  %87 = load ptr, ptr %86, align 8, !tbaa !20
  store ptr %87, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store float 0.000000e+00, ptr %11, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !13
  br label %88

88:                                               ; preds = %119, %63
  %89 = load i32, ptr %12, align 4, !tbaa !13
  %90 = load i32, ptr %6, align 4, !tbaa !13
  %91 = icmp slt i32 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  store i32 5, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %122

93:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !13
  br label %94

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

98:                                               ; preds = %94
  store i32 8, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %118

99:                                               ; preds = %94
  %100 = load ptr, ptr %10, align 8, !tbaa !5
  %101 = load i32, ptr %12, align 4, !tbaa !13
  %102 = load i32, ptr %7, align 4, !tbaa !13
  %103 = mul nsw i32 %101, %102
  %104 = load i32, ptr %14, align 4, !tbaa !13
  %105 = add nsw i32 %103, %104
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds float, ptr %100, i64 %106
  %108 = load float, ptr %107, align 4, !tbaa !14
  %109 = fpext float %108 to double
  %110 = call double @pow(double noundef %109, double noundef 2.000000e+00) #7
  %111 = load float, ptr %11, align 4, !tbaa !14
  %112 = fpext float %111 to double
  %113 = fadd double %112, %110
  %114 = fptrunc double %113 to float
  store float %114, ptr %11, align 4, !tbaa !14
  br label %115

115:                                              ; preds = %99
  %116 = load i32, ptr %14, align 4, !tbaa !13
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %14, align 4, !tbaa !13
  br label %94, !llvm.loop !21

118:                                              ; preds = %98
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %12, align 4, !tbaa !13
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %12, align 4, !tbaa !13
  br label %88, !llvm.loop !22

122:                                              ; preds = %92
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  call void @delete_simple_mat(ptr noundef %123)
  %124 = load ptr, ptr %9, align 8, !tbaa !5
  call void @delete_simple_mat(ptr noundef %124)
  %125 = load float, ptr %11, align 4, !tbaa !14
  %126 = load i32, ptr %6, align 4, !tbaa !13
  %127 = sitofp i32 %126 to float
  %128 = fdiv float %125, %127
  %129 = load i32, ptr %7, align 4, !tbaa !13
  %130 = sitofp i32 %129 to float
  %131 = fdiv float %128, %130
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr %3) #7
  ret float %131
}

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

declare ptr @create_simple_mat(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

declare void @hypercv_filter2D(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) #1

declare void @simple_mat_addition_float(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind
declare double @pow(double noundef, double noundef) #5

declare void @delete_simple_mat(ptr noundef) #1

attributes #0 = { 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 #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 = { noreturn 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { noreturn nounwind }
attributes #7 = { 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 12}
!10 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !6, i64 24}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 8}
!13 = !{!11, !11, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!10, !11, i64 0}
!19 = !{!10, !11, i64 4}
!20 = !{!10, !6, i64 24}
!21 = distinct !{!21, !17}
!22 = distinct !{!22, !17}


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

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@__const.cal_edge_signal_energy.opt1 = external hidden unnamed_addr constant [9 x float], align 16
@__const.cal_edge_signal_energy.opt2 = external hidden unnamed_addr constant [9 x float], align 16

; Function Attrs: nounwind uwtable
define dso_local float @cal_edge_signal_energy(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca [9 x float], align 16
  %3 = alloca [9 x float], align 16
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %4, label %8

4:                                                ; preds = %1
  %5 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  tail call void @exit(i32 noundef 1) #6
  unreachable

8:                                                ; preds = %1
  %9 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 1, ptr %9, align 4, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 1, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %2) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(36) %2, ptr noundef nonnull align 16 dereferenceable(36) @__const.cal_edge_signal_energy.opt1, i64 36, i1 false)
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %3) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(36) %3, ptr noundef nonnull align 16 dereferenceable(36) @__const.cal_edge_signal_energy.opt2, i64 36, i1 false)
  %11 = load <4 x float>, ptr %2, align 16, !tbaa !12
  %12 = fdiv <4 x float> %11, <float 6.000000e+00, float 6.000000e+00, float 6.000000e+00, float 6.000000e+00>
  store <4 x float> %12, ptr %2, align 16, !tbaa !12
  %13 = load <4 x float>, ptr %3, align 16, !tbaa !12
  %14 = fdiv <4 x float> %13, <float 6.000000e+00, float 6.000000e+00, float 6.000000e+00, float 6.000000e+00>
  store <4 x float> %14, ptr %3, align 16, !tbaa !12
  %15 = getelementptr inbounds i8, ptr %2, i64 16
  %16 = getelementptr inbounds i8, ptr %3, i64 16
  %17 = load <4 x float>, ptr %15, align 16, !tbaa !12
  %18 = fdiv <4 x float> %17, <float 6.000000e+00, float 6.000000e+00, float 6.000000e+00, float 6.000000e+00>
  store <4 x float> %18, ptr %15, align 16, !tbaa !12
  %19 = load <4 x float>, ptr %16, align 16, !tbaa !12
  %20 = fdiv <4 x float> %19, <float 6.000000e+00, float 6.000000e+00, float 6.000000e+00, float 6.000000e+00>
  store <4 x float> %20, ptr %16, align 16, !tbaa !12
  %21 = getelementptr inbounds i8, ptr %2, i64 32
  %22 = load float, ptr %21, align 16, !tbaa !12
  %23 = fdiv float %22, 6.000000e+00
  store float %23, ptr %21, align 16, !tbaa !12
  %24 = getelementptr inbounds i8, ptr %3, i64 32
  %25 = load float, ptr %24, align 16, !tbaa !12
  %26 = fdiv float %25, 6.000000e+00
  store float %26, ptr %24, align 16, !tbaa !12
  %27 = load i32, ptr %0, align 8, !tbaa !14
  %28 = getelementptr inbounds i8, ptr %0, i64 4
  %29 = load i32, ptr %28, align 4, !tbaa !15
  %30 = tail call ptr @create_simple_mat(i32 noundef %27, i32 noundef %29, i32 noundef 4, i32 noundef 1) #7
  %31 = tail call ptr @create_simple_mat(i32 noundef %27, i32 noundef %29, i32 noundef 4, i32 noundef 1) #7
  call void @hypercv_filter2D(ptr noundef nonnull %0, ptr noundef %30, ptr noundef nonnull %2, i32 noundef 3, i32 noundef 3, i32 noundef 0) #7
  call void @hypercv_filter2D(ptr noundef nonnull %0, ptr noundef %31, ptr noundef nonnull %3, i32 noundef 3, i32 noundef 3, i32 noundef 0) #7
  call void @simple_mat_addition_float(ptr noundef %30, ptr noundef %31, ptr noundef %30) #7
  %32 = getelementptr inbounds i8, ptr %30, i64 24
  %33 = load ptr, ptr %32, align 8, !tbaa !16
  %34 = icmp sgt i32 %27, 0
  %35 = icmp sgt i32 %29, 0
  %or.cond = and i1 %34, %35
  br i1 %or.cond, label %.preheader.us.preheader, label %._crit_edge49

.preheader.us.preheader:                          ; preds = %8
  %36 = zext nneg i32 %29 to i64
  %wide.trip.count57 = zext nneg i32 %27 to i64
  %xtraiter = and i64 %36, 1
  %37 = icmp eq i32 %29, 1
  %unroll_iter = and i64 %36, 2147483646
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us
  %indvars.iv54 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next55, %._crit_edge.us ]
  %.03947.us = phi float [ 0.000000e+00, %.preheader.us.preheader ], [ %.lcssa, %._crit_edge.us ]
  %38 = mul nuw nsw i64 %indvars.iv54, %36
  %invariant.gep = getelementptr inbounds float, ptr %33, i64 %38
  br i1 %37, label %._crit_edge.us.unr-lcssa, label %.preheader.us.new

.preheader.us.new:                                ; preds = %.preheader.us, %.preheader.us.new
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %.145.us = phi float [ %48, %.preheader.us.new ], [ %.03947.us, %.preheader.us ]
  %niter = phi i64 [ %niter.next.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %gep = getelementptr inbounds float, ptr %invariant.gep, i64 %indvars.iv
  %39 = load float, ptr %gep, align 4, !tbaa !12
  %40 = fpext float %39 to double
  %square.us = fmul double %40, %40
  %41 = fpext float %.145.us to double
  %42 = fadd double %square.us, %41
  %43 = fptrunc double %42 to float
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %gep.1 = getelementptr inbounds float, ptr %invariant.gep, i64 %indvars.iv.next
  %44 = load float, ptr %gep.1, align 4, !tbaa !12
  %45 = fpext float %44 to double
  %square.us.1 = fmul double %45, %45
  %46 = fpext float %43 to double
  %47 = fadd double %square.us.1, %46
  %48 = fptrunc double %47 to float
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.us.unr-lcssa, label %.preheader.us.new, !llvm.loop !17

._crit_edge.us.unr-lcssa:                         ; preds = %.preheader.us.new, %.preheader.us
  %.lcssa.ph = phi float [ poison, %.preheader.us ], [ %48, %.preheader.us.new ]
  %indvars.iv.unr = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next.1, %.preheader.us.new ]
  %.145.us.unr = phi float [ %.03947.us, %.preheader.us ], [ %48, %.preheader.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge.us, label %._crit_edge.us.epilog-lcssa

._crit_edge.us.epilog-lcssa:                      ; preds = %._crit_edge.us.unr-lcssa
  %gep.epil = getelementptr inbounds float, ptr %invariant.gep, i64 %indvars.iv.unr
  %49 = load float, ptr %gep.epil, align 4, !tbaa !12
  %50 = fpext float %49 to double
  %square.us.epil = fmul double %50, %50
  %51 = fpext float %.145.us.unr to double
  %52 = fadd double %square.us.epil, %51
  %53 = fptrunc double %52 to float
  br label %._crit_edge.us

._crit_edge.us:                                   ; preds = %._crit_edge.us.unr-lcssa, %._crit_edge.us.epilog-lcssa
  %.lcssa = phi float [ %.lcssa.ph, %._crit_edge.us.unr-lcssa ], [ %53, %._crit_edge.us.epilog-lcssa ]
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %exitcond58.not = icmp eq i64 %indvars.iv.next55, %wide.trip.count57
  br i1 %exitcond58.not, label %._crit_edge49, label %.preheader.us, !llvm.loop !19

._crit_edge49:                                    ; preds = %._crit_edge.us, %8
  %.039.lcssa = phi float [ 0.000000e+00, %8 ], [ %.lcssa, %._crit_edge.us ]
  call void @delete_simple_mat(ptr noundef %30) #7
  call void @delete_simple_mat(ptr noundef %31) #7
  %54 = sitofp i32 %27 to float
  %55 = fdiv float %.039.lcssa, %54
  %56 = sitofp i32 %29 to float
  %57 = fdiv float %55, %56
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %2) #7
  ret float %57
}

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

declare ptr @create_simple_mat(i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #5

declare void @hypercv_filter2D(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #5

declare void @simple_mat_addition_float(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

declare void @delete_simple_mat(ptr noundef) local_unnamed_addr #5

attributes #0 = { 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 #1 = { 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 #2 = { noreturn 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { "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 #6 = { noreturn nounwind }
attributes #7 = { 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 12}
!6 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !10, i64 24}
!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 8}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !8, i64 0}
!14 = !{!6, !7, i64 0}
!15 = !{!6, !7, i64 4}
!16 = !{!6, !10, i64 24}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}


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