; LLVM IR from bbrister/SIFT3D :: sift3d (sift)

; 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._SIFT3D_Descriptor_store = type { ptr, i64, i32, i32, i32 }
%struct._Mat_rm = type { %union.anon, i64, i32, i32, i32, i32 }
%union.anon = type { ptr }
%struct._SIFT3D_Descriptor = type { [64 x %struct._Hist], double, double, double, double }
%struct._Hist = type { [12 x float] }

; 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 i32 @resize_Mat_rm(ptr noundef) #1

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

41:                                               ; preds = %5
  %42 = load ptr, ptr %11, align 8, !tbaa !5
  %43 = call i32 @resize_Mat_rm(ptr noundef %42)
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %46

45:                                               ; preds = %41, %5
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %183

46:                                               ; preds = %41
  store i32 0, ptr %13, align 4, !tbaa !13
  store i32 0, ptr %12, align 4, !tbaa !13
  br label %47

47:                                               ; preds = %165, %46
  %48 = load i32, ptr %12, align 4, !tbaa !13
  %49 = load i32, ptr %14, align 4, !tbaa !13
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %51, label %168

51:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct._SIFT3D_Descriptor_store, ptr %52, i32 0, i32 0
  %54 = load ptr, ptr %53, align 8, !tbaa !18
  %55 = load i32, ptr %12, align 4, !tbaa !13
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds %struct._SIFT3D_Descriptor, ptr %54, i64 %56
  store ptr %57, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct._SIFT3D_Descriptor_store, ptr %58, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8, !tbaa !18
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = load i32, ptr %12, align 4, !tbaa !13
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds i32, ptr %61, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !13
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds %struct._SIFT3D_Descriptor, ptr %60, i64 %66
  store ptr %67, ptr %17, align 8, !tbaa !5
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = load i32, ptr %12, align 4, !tbaa !13
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds i32, ptr %68, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !13
  %73 = icmp eq i32 %72, -1
  br i1 %73, label %74, label %75

74:                                               ; preds = %51
  store i32 4, ptr %15, align 4
  br label %162

75:                                               ; preds = %51
  %76 = load ptr, ptr %16, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._SIFT3D_Descriptor, ptr %76, i32 0, i32 1
  %78 = load double, ptr %77, align 8, !tbaa !19
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct._Mat_rm, ptr %79, i32 0, i32 0
  %81 = load ptr, ptr %80, align 8, !tbaa !22
  %82 = load i32, ptr %13, align 4, !tbaa !13
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct._Mat_rm, ptr %83, i32 0, i32 2
  %85 = load i32, ptr %84, align 8, !tbaa !16
  %86 = mul nsw i32 %82, %85
  %87 = add nsw i32 0, %86
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds double, ptr %81, i64 %88
  store double %78, ptr %89, align 8, !tbaa !23
  %90 = load ptr, ptr %16, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct._SIFT3D_Descriptor, ptr %90, i32 0, i32 2
  %92 = load double, ptr %91, align 8, !tbaa !24
  %93 = load ptr, ptr %10, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct._Mat_rm, ptr %93, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8, !tbaa !22
  %96 = load i32, ptr %13, align 4, !tbaa !13
  %97 = load ptr, ptr %10, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct._Mat_rm, ptr %97, i32 0, i32 2
  %99 = load i32, ptr %98, align 8, !tbaa !16
  %100 = mul nsw i32 %96, %99
  %101 = add nsw i32 1, %100
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds double, ptr %95, i64 %102
  store double %92, ptr %103, align 8, !tbaa !23
  %104 = load ptr, ptr %16, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct._SIFT3D_Descriptor, ptr %104, i32 0, i32 3
  %106 = load double, ptr %105, align 8, !tbaa !25
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct._Mat_rm, ptr %107, i32 0, i32 0
  %109 = load ptr, ptr %108, align 8, !tbaa !22
  %110 = load i32, ptr %13, align 4, !tbaa !13
  %111 = load ptr, ptr %10, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct._Mat_rm, ptr %111, i32 0, i32 2
  %113 = load i32, ptr %112, align 8, !tbaa !16
  %114 = mul nsw i32 %110, %113
  %115 = add nsw i32 2, %114
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds double, ptr %109, i64 %116
  store double %106, ptr %117, align 8, !tbaa !23
  %118 = load ptr, ptr %17, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct._SIFT3D_Descriptor, ptr %118, i32 0, i32 1
  %120 = load double, ptr %119, align 8, !tbaa !19
  %121 = load ptr, ptr %11, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct._Mat_rm, ptr %121, i32 0, i32 0
  %123 = load ptr, ptr %122, align 8, !tbaa !22
  %124 = load i32, ptr %13, align 4, !tbaa !13
  %125 = load ptr, ptr %11, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct._Mat_rm, ptr %125, i32 0, i32 2
  %127 = load i32, ptr %126, align 8, !tbaa !16
  %128 = mul nsw i32 %124, %127
  %129 = add nsw i32 0, %128
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds double, ptr %123, i64 %130
  store double %120, ptr %131, align 8, !tbaa !23
  %132 = load ptr, ptr %17, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct._SIFT3D_Descriptor, ptr %132, i32 0, i32 2
  %134 = load double, ptr %133, align 8, !tbaa !24
  %135 = load ptr, ptr %11, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct._Mat_rm, ptr %135, i32 0, i32 0
  %137 = load ptr, ptr %136, align 8, !tbaa !22
  %138 = load i32, ptr %13, align 4, !tbaa !13
  %139 = load ptr, ptr %11, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct._Mat_rm, ptr %139, i32 0, i32 2
  %141 = load i32, ptr %140, align 8, !tbaa !16
  %142 = mul nsw i32 %138, %141
  %143 = add nsw i32 1, %142
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds double, ptr %137, i64 %144
  store double %134, ptr %145, align 8, !tbaa !23
  %146 = load ptr, ptr %17, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct._SIFT3D_Descriptor, ptr %146, i32 0, i32 3
  %148 = load double, ptr %147, align 8, !tbaa !25
  %149 = load ptr, ptr %11, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct._Mat_rm, ptr %149, i32 0, i32 0
  %151 = load ptr, ptr %150, align 8, !tbaa !22
  %152 = load i32, ptr %13, align 4, !tbaa !13
  %153 = load ptr, ptr %11, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct._Mat_rm, ptr %153, i32 0, i32 2
  %155 = load i32, ptr %154, align 8, !tbaa !16
  %156 = mul nsw i32 %152, %155
  %157 = add nsw i32 2, %156
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds double, ptr %151, i64 %158
  store double %148, ptr %159, align 8, !tbaa !23
  %160 = load i32, ptr %13, align 4, !tbaa !13
  %161 = add nsw i32 %160, 1
  store i32 %161, ptr %13, align 4, !tbaa !13
  store i32 0, ptr %15, align 4
  br label %162

162:                                              ; preds = %75, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  %163 = load i32, ptr %15, align 4
  switch i32 %163, label %185 [
    i32 0, label %164
    i32 4, label %165
  ]

164:                                              ; preds = %162
  br label %165

165:                                              ; preds = %164, %162
  %166 = load i32, ptr %12, align 4, !tbaa !13
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %12, align 4, !tbaa !13
  br label %47, !llvm.loop !26

168:                                              ; preds = %47
  %169 = load i32, ptr %13, align 4, !tbaa !13
  %170 = load ptr, ptr %11, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct._Mat_rm, ptr %170, i32 0, i32 3
  store i32 %169, ptr %171, align 4, !tbaa !14
  %172 = load ptr, ptr %10, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct._Mat_rm, ptr %172, i32 0, i32 3
  store i32 %169, ptr %173, align 4, !tbaa !14
  %174 = load ptr, ptr %10, align 8, !tbaa !5
  %175 = call i32 @resize_Mat_rm(ptr noundef %174)
  %176 = icmp ne i32 %175, 0
  br i1 %176, label %181, label %177

177:                                              ; preds = %168
  %178 = load ptr, ptr %11, align 8, !tbaa !5
  %179 = call i32 @resize_Mat_rm(ptr noundef %178)
  %180 = icmp ne i32 %179, 0
  br i1 %180, label %181, label %182

181:                                              ; preds = %177, %168
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %183

182:                                              ; preds = %177
  store i32 0, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %183

183:                                              ; preds = %182, %181, %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  %184 = load i32, ptr %6, align 4
  ret i32 %184

185:                                              ; preds = %162
  unreachable
}

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, !11, i64 8}
!10 = !{!"_SIFT3D_Descriptor_store", !6, i64 0, !11, i64 8, !12, i64 16, !12, i64 20, !12, i64 24}
!11 = !{!"long", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!12, !12, i64 0}
!14 = !{!15, !12, i64 20}
!15 = !{!"_Mat_rm", !7, i64 0, !11, i64 8, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28}
!16 = !{!15, !12, i64 16}
!17 = !{!15, !12, i64 28}
!18 = !{!10, !6, i64 0}
!19 = !{!20, !21, i64 3072}
!20 = !{!"_SIFT3D_Descriptor", !7, i64 0, !21, i64 3072, !21, i64 3080, !21, i64 3088, !21, i64 3096}
!21 = !{!"double", !7, i64 0}
!22 = !{!7, !7, i64 0}
!23 = !{!21, !21, i64 0}
!24 = !{!20, !21, i64 3080}
!25 = !{!20, !21, i64 3088}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


; 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._SIFT3D_Descriptor = type { [64 x %struct._Hist], double, double, double, double }
%struct._Hist = type { [12 x float] }

declare i32 @resize_Mat_rm(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @SIFT3D_matches_to_Mat_rm(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #1 {
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = load i64, ptr %6, align 8, !tbaa !5
  %8 = trunc i64 %7 to i32
  %9 = getelementptr inbounds i8, ptr %4, i64 20
  store i32 %8, ptr %9, align 4, !tbaa !12
  %10 = getelementptr inbounds i8, ptr %3, i64 20
  store i32 %8, ptr %10, align 4, !tbaa !12
  %11 = getelementptr inbounds i8, ptr %4, i64 16
  store i32 3, ptr %11, align 8, !tbaa !14
  %12 = getelementptr inbounds i8, ptr %3, i64 16
  store i32 3, ptr %12, align 8, !tbaa !14
  %13 = getelementptr inbounds i8, ptr %4, i64 28
  store i32 0, ptr %13, align 4, !tbaa !15
  %14 = getelementptr inbounds i8, ptr %3, i64 28
  store i32 0, ptr %14, align 4, !tbaa !15
  %15 = tail call i32 @resize_Mat_rm(ptr noundef %3) #2
  %.not = icmp eq i32 %15, 0
  br i1 %.not, label %16, label %67

16:                                               ; preds = %5
  %17 = tail call i32 @resize_Mat_rm(ptr noundef nonnull %4) #2
  %.not52 = icmp eq i32 %17, 0
  br i1 %.not52, label %.preheader, label %67

.preheader:                                       ; preds = %16
  %18 = icmp sgt i32 %8, 0
  br i1 %18, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.preheader
  %wide.trip.count = and i64 %7, 2147483647
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %63
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %63 ]
  %.05155 = phi i32 [ 0, %.lr.ph.preheader ], [ %.1, %63 ]
  %19 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv
  %20 = load i32, ptr %19, align 4, !tbaa !16
  %21 = icmp eq i32 %20, -1
  br i1 %21, label %63, label %22

22:                                               ; preds = %.lr.ph
  %23 = load ptr, ptr %1, align 8, !tbaa !17
  %24 = sext i32 %20 to i64
  %25 = getelementptr inbounds %struct._SIFT3D_Descriptor, ptr %23, i64 %24
  %26 = load ptr, ptr %0, align 8, !tbaa !17
  %27 = getelementptr inbounds %struct._SIFT3D_Descriptor, ptr %26, i64 %indvars.iv
  %28 = getelementptr inbounds i8, ptr %27, i64 3072
  %29 = load double, ptr %28, align 8, !tbaa !18
  %30 = load ptr, ptr %3, align 8, !tbaa !21
  %31 = load i32, ptr %12, align 8, !tbaa !14
  %32 = mul nsw i32 %31, %.05155
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds double, ptr %30, i64 %33
  store double %29, ptr %34, align 8, !tbaa !22
  %35 = getelementptr inbounds i8, ptr %27, i64 3080
  %36 = load double, ptr %35, align 8, !tbaa !23
  %37 = load ptr, ptr %3, align 8, !tbaa !21
  %38 = getelementptr double, ptr %37, i64 %33
  %39 = getelementptr i8, ptr %38, i64 8
  store double %36, ptr %39, align 8, !tbaa !22
  %40 = getelementptr inbounds i8, ptr %27, i64 3088
  %41 = load double, ptr %40, align 8, !tbaa !24
  %42 = load ptr, ptr %3, align 8, !tbaa !21
  %43 = getelementptr double, ptr %42, i64 %33
  %44 = getelementptr i8, ptr %43, i64 16
  store double %41, ptr %44, align 8, !tbaa !22
  %45 = getelementptr inbounds i8, ptr %25, i64 3072
  %46 = load double, ptr %45, align 8, !tbaa !18
  %47 = load ptr, ptr %4, align 8, !tbaa !21
  %48 = load i32, ptr %11, align 8, !tbaa !14
  %49 = mul nsw i32 %48, %.05155
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds double, ptr %47, i64 %50
  store double %46, ptr %51, align 8, !tbaa !22
  %52 = getelementptr inbounds i8, ptr %25, i64 3080
  %53 = load double, ptr %52, align 8, !tbaa !23
  %54 = load ptr, ptr %4, align 8, !tbaa !21
  %55 = getelementptr double, ptr %54, i64 %50
  %56 = getelementptr i8, ptr %55, i64 8
  store double %53, ptr %56, align 8, !tbaa !22
  %57 = getelementptr inbounds i8, ptr %25, i64 3088
  %58 = load double, ptr %57, align 8, !tbaa !24
  %59 = load ptr, ptr %4, align 8, !tbaa !21
  %60 = getelementptr double, ptr %59, i64 %50
  %61 = getelementptr i8, ptr %60, i64 16
  store double %58, ptr %61, align 8, !tbaa !22
  %62 = add nsw i32 %.05155, 1
  br label %63

63:                                               ; preds = %.lr.ph, %22
  %.1 = phi i32 [ %62, %22 ], [ %.05155, %.lr.ph ]
  %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, label %.lr.ph, !llvm.loop !25

._crit_edge:                                      ; preds = %63, %.preheader
  %.051.lcssa = phi i32 [ 0, %.preheader ], [ %.1, %63 ]
  store i32 %.051.lcssa, ptr %9, align 4, !tbaa !12
  store i32 %.051.lcssa, ptr %10, align 4, !tbaa !12
  %64 = tail call i32 @resize_Mat_rm(ptr noundef %3) #2
  %.not53 = icmp eq i32 %64, 0
  br i1 %.not53, label %65, label %67

65:                                               ; preds = %._crit_edge
  %66 = tail call i32 @resize_Mat_rm(ptr noundef nonnull %4) #2
  %.not54 = icmp ne i32 %66, 0
  %spec.select = sext i1 %.not54 to i32
  br label %67

67:                                               ; preds = %65, %._crit_edge, %5, %16
  %.0 = phi i32 [ -1, %16 ], [ -1, %5 ], [ -1, %._crit_edge ], [ %spec.select, %65 ]
  ret i32 %.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 = { 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 = !{!"_SIFT3D_Descriptor_store", !7, i64 0, !10, i64 8, !11, i64 16, !11, i64 20, !11, i64 24}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!13, !11, i64 20}
!13 = !{!"_Mat_rm", !8, i64 0, !10, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28}
!14 = !{!13, !11, i64 16}
!15 = !{!13, !11, i64 28}
!16 = !{!11, !11, i64 0}
!17 = !{!6, !7, i64 0}
!18 = !{!19, !20, i64 3072}
!19 = !{!"_SIFT3D_Descriptor", !8, i64 0, !20, i64 3072, !20, i64 3080, !20, i64 3088, !20, i64 3096}
!20 = !{!"double", !8, i64 0}
!21 = !{!8, !8, i64 0}
!22 = !{!20, !20, i64 0}
!23 = !{!19, !20, i64 3080}
!24 = !{!19, !20, i64 3088}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}


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