; LLVM IR from openxrlab/xrsfm :: 3rdparty/SiftGPU/SiftMatch.ll (ZN11SiftMatchGLC2Eii)

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

%class.SiftMatchGL = type { %class.SiftMatchGPU.base, [4 x i8], [2 x %class.GLTexImage], [2 x %class.GLTexImage], %class.GLTexImage, [2 x %class.GLTexImage], ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [2 x i32], [2 x i32], [2 x i32], i32, i32, i32, i32, i32, %"class.std::vector" }
%class.SiftMatchGPU.base = type <{ ptr, i32, i32, ptr, i32 }>
%class.GLTexImage = type <{ ptr, i32, i32, i32, i32, i32, i32, i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.SiftMatchGPU = type <{ ptr, i32, i32, ptr, i32, [4 x i8] }>

@_ZTV11SiftMatchGL = external dso_local unnamed_addr constant { [17 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11SiftMatchGLC2Eii(ptr noundef nonnull align 8 dereferenceable(464) %0, i32 noundef %1, i32 noundef %2) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  %9 = load ptr, ptr %4, align 8
  call void @_ZN12SiftMatchGPUC2Ei(ptr noundef nonnull align 8 dereferenceable(28) %9, i32 noundef 4096)
  store ptr getelementptr inbounds inrange(-16, 120) ({ [17 x ptr] }, ptr @_ZTV11SiftMatchGL, i32 0, i32 0, i32 2), ptr %9, align 8, !tbaa !11
  %10 = getelementptr inbounds %class.SiftMatchGL, ptr %9, i32 0, i32 2
  %11 = getelementptr inbounds [2 x %class.GLTexImage], ptr %10, i32 0, i32 0
  %12 = getelementptr inbounds %class.GLTexImage, ptr %11, i64 2
  br label %13

13:                                               ; preds = %15, %3
  %14 = phi ptr [ %11, %3 ], [ %16, %15 ]
  invoke void @_ZN10GLTexImageC1Ev(ptr noundef nonnull align 8 dereferenceable(36) %14)
          to label %15 unwind label %77

15:                                               ; preds = %13
  %16 = getelementptr inbounds %class.GLTexImage, ptr %14, i64 1
  %17 = icmp eq ptr %16, %12
  br i1 %17, label %18, label %13

18:                                               ; preds = %15
  %19 = getelementptr inbounds %class.SiftMatchGL, ptr %9, i32 0, i32 3
  %20 = getelementptr inbounds [2 x %class.GLTexImage], ptr %19, i32 0, i32 0
  %21 = getelementptr inbounds %class.GLTexImage, ptr %20, i64 2
  br label %22

22:                                               ; preds = %24, %18
  %23 = phi ptr [ %20, %18 ], [ %25, %24 ]
  invoke void @_ZN10GLTexImageC1Ev(ptr noundef nonnull align 8 dereferenceable(36) %23)
          to label %24 unwind label %87

24:                                               ; preds = %22
  %25 = getelementptr inbounds %class.GLTexImage, ptr %23, i64 1
  %26 = icmp eq ptr %25, %21
  br i1 %26, label %27, label %22

27:                                               ; preds = %24
  %28 = getelementptr inbounds %class.SiftMatchGL, ptr %9, i32 0, i32 4
  invoke void @_ZN10GLTexImageC1Ev(ptr noundef nonnull align 8 dereferenceable(36) %28)
          to label %29 unwind label %97

29:                                               ; preds = %27
  %30 = getelementptr inbounds %class.SiftMatchGL, ptr %9, i32 0, i32 5
  %31 = getelementptr inbounds [2 x %class.GLTexImage], ptr %30, i32 0, i32 0
  %32 = getelementptr inbounds %class.GLTexImage, ptr %31, i64 2
  br label %33

33:                                               ; preds = %35, %29
  %34 = phi ptr [ %31, %29 ], [ %36, %35 ]
  invoke void @_ZN10GLTexImageC1Ev(ptr noundef nonnull align 8 dereferenceable(36) %34)
          to label %35 unwind label %101

35:                                               ; preds = %33
  %36 = getelementptr inbounds %class.GLTexImage, ptr %34, i64 1
  %37 = icmp eq ptr %36, %32
  br i1 %37, label %38, label %33

38:                                               ; preds = %35
  %39 = getelementptr inbounds %class.SiftMatchGL, ptr %9, i32 0, i32 30
  call void @_ZNSt6vectorIfSaIfEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %39) #4
  %40 = getelementptr inbounds %class.SiftMatchGL, ptr %9, i32 0, i32 7
  store ptr null, ptr %40, align 8, !tbaa !13
  %41 = getelementptr inbounds %class.SiftMatchGL, ptr %9, i32 0, i32 9
  store ptr null, ptr %41, align 8, !tbaa !21
  %42 = getelementptr inbounds %class.SiftMatchGL, ptr %9, i32 0, i32 8
  store ptr null, ptr %42, align 8, !tbaa !22
  %43 = getelementptr inbounds %class.SiftMatchGL, ptr %9, i32 0, i32 6
  store ptr null, ptr %43, align 8, !tbaa !23
  %44 = getelementptr inbounds %class.SiftMatchGL, ptr %9, i32 0, i32 22
  %45 = getelementptr inbounds [2 x i32], ptr %44, i64 0, i64 1
  store i32 0, ptr %45, align 4, !tbaa !9
  %46 = getelementptr inbounds %class.SiftMatchGL, ptr %9, i32 0, i32 22
  %47 = getelementptr inbounds [2 x i32], ptr %46, i64 0, i64 0
  store i32 0, ptr %47, align 8, !tbaa !9
  %48 = getelementptr inbounds %class.SiftMatchGL, ptr %9, i32 0, i32 23
  %49 = getelementptr inbounds [2 x i32], ptr %48, i64 0, i64 1
  store i32 0, ptr %49, align 4, !tbaa !9
  %50 = getelementptr inbounds %class.SiftMatchGL, ptr %9, i32 0, i32 23
  %51 = getelementptr inbounds [2 x i32], ptr %50, i64 0, i64 0
  store i32 0, ptr %51, align 8, !tbaa !9
  %52 = getelementptr inbounds %class.SiftMatchGL, ptr %9, i32 0, i32 24
  %53 = getelementptr inbounds [2 x i32], ptr %52, i64 0, i64 1
  store i32 0, ptr %53, align 4, !tbaa !9
  %54 = getelementptr inbounds %class.SiftMatchGL, ptr %9, i32 0, i32 24
  %55 = getelementptr inbounds [2 x i32], ptr %54, i64 0, i64 0
  store i32 0, ptr %55, align 8, !tbaa !9
  %56 = load i32, ptr %5, align 4, !tbaa !9
  %57 = icmp sle i32 %56, 0
  br i1 %57, label %58, label %59

58:                                               ; preds = %38
  br label %64

59:                                               ; preds = %38
  %60 = load i32, ptr %5, align 4, !tbaa !9
  %61 = add nsw i32 %60, 31
  %62 = sdiv i32 %61, 32
  %63 = mul nsw i32 %62, 32
  br label %64

64:                                               ; preds = %59, %58
  %65 = phi i32 [ 4096, %58 ], [ %63, %59 ]
  %66 = getelementptr inbounds %class.SiftMatchGPU, ptr %9, i32 0, i32 4
  store i32 %65, ptr %66, align 8, !tbaa !24
  %67 = getelementptr inbounds %class.SiftMatchGL, ptr %9, i32 0, i32 28
  store i32 32, ptr %67, align 4, !tbaa !25
  %68 = getelementptr inbounds %class.SiftMatchGL, ptr %9, i32 0, i32 26
  store i32 1, ptr %68, align 4, !tbaa !26
  %69 = getelementptr inbounds %class.SiftMatchGL, ptr %9, i32 0, i32 25
  store i32 1, ptr %69, align 8, !tbaa !27
  %70 = getelementptr inbounds %class.SiftMatchGL, ptr %9, i32 0, i32 25
  %71 = load i32, ptr %70, align 8, !tbaa !27
  %72 = getelementptr inbounds %class.SiftMatchGL, ptr %9, i32 0, i32 26
  %73 = load i32, ptr %72, align 4, !tbaa !26
  %74 = mul nsw i32 %71, %73
  %75 = getelementptr inbounds %class.SiftMatchGL, ptr %9, i32 0, i32 27
  store i32 %74, ptr %75, align 8, !tbaa !28
  %76 = getelementptr inbounds %class.SiftMatchGL, ptr %9, i32 0, i32 29
  store i32 0, ptr %76, align 8, !tbaa !29
  ret void

77:                                               ; preds = %13
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %7, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %8, align 4
  %81 = icmp eq ptr %11, %14
  br i1 %81, label %86, label %82

82:                                               ; preds = %82, %77
  %83 = phi ptr [ %14, %77 ], [ %84, %82 ]
  %84 = getelementptr inbounds %class.GLTexImage, ptr %83, i64 -1
  call void @_ZN10GLTexImageD1Ev(ptr noundef nonnull align 8 dereferenceable(36) %84) #4
  %85 = icmp eq ptr %84, %11
  br i1 %85, label %86, label %82

86:                                               ; preds = %82, %77
  br label %127

87:                                               ; preds = %22
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %7, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %8, align 4
  %91 = icmp eq ptr %20, %23
  br i1 %91, label %96, label %92

92:                                               ; preds = %92, %87
  %93 = phi ptr [ %23, %87 ], [ %94, %92 ]
  %94 = getelementptr inbounds %class.GLTexImage, ptr %93, i64 -1
  call void @_ZN10GLTexImageD1Ev(ptr noundef nonnull align 8 dereferenceable(36) %94) #4
  %95 = icmp eq ptr %94, %20
  br i1 %95, label %96, label %92

96:                                               ; preds = %92, %87
  br label %119

97:                                               ; preds = %27
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %7, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %8, align 4
  br label %111

101:                                              ; preds = %33
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %7, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %8, align 4
  %105 = icmp eq ptr %31, %34
  br i1 %105, label %110, label %106

106:                                              ; preds = %106, %101
  %107 = phi ptr [ %34, %101 ], [ %108, %106 ]
  %108 = getelementptr inbounds %class.GLTexImage, ptr %107, i64 -1
  call void @_ZN10GLTexImageD1Ev(ptr noundef nonnull align 8 dereferenceable(36) %108) #4
  %109 = icmp eq ptr %108, %31
  br i1 %109, label %110, label %106

110:                                              ; preds = %106, %101
  call void @_ZN10GLTexImageD1Ev(ptr noundef nonnull align 8 dereferenceable(36) %28) #4
  br label %111

111:                                              ; preds = %110, %97
  %112 = getelementptr inbounds [2 x %class.GLTexImage], ptr %19, i32 0, i32 0
  %113 = getelementptr inbounds %class.GLTexImage, ptr %112, i64 2
  br label %114

114:                                              ; preds = %114, %111
  %115 = phi ptr [ %113, %111 ], [ %116, %114 ]
  %116 = getelementptr inbounds %class.GLTexImage, ptr %115, i64 -1
  call void @_ZN10GLTexImageD1Ev(ptr noundef nonnull align 8 dereferenceable(36) %116) #4
  %117 = icmp eq ptr %116, %112
  br i1 %117, label %118, label %114

118:                                              ; preds = %114
  br label %119

119:                                              ; preds = %118, %96
  %120 = getelementptr inbounds [2 x %class.GLTexImage], ptr %10, i32 0, i32 0
  %121 = getelementptr inbounds %class.GLTexImage, ptr %120, i64 2
  br label %122

122:                                              ; preds = %122, %119
  %123 = phi ptr [ %121, %119 ], [ %124, %122 ]
  %124 = getelementptr inbounds %class.GLTexImage, ptr %123, i64 -1
  call void @_ZN10GLTexImageD1Ev(ptr noundef nonnull align 8 dereferenceable(36) %124) #4
  %125 = icmp eq ptr %124, %120
  br i1 %125, label %126, label %122

126:                                              ; preds = %122
  br label %127

127:                                              ; preds = %126, %86
  call void @_ZN12SiftMatchGPUD2Ev(ptr noundef nonnull align 8 dereferenceable(28) %9) #4
  br label %128

128:                                              ; preds = %127
  %129 = load ptr, ptr %7, align 8
  %130 = load i32, ptr %8, align 4
  %131 = insertvalue { ptr, i32 } poison, ptr %129, 0
  %132 = insertvalue { ptr, i32 } %131, i32 %130, 1
  resume { ptr, i32 } %132
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12SiftMatchGPUC2Ei(ptr noundef nonnull align 8 dereferenceable(28), i32 noundef) unnamed_addr #0 align 2

declare void @_ZN10GLTexImageC1Ev(ptr noundef nonnull align 8 dereferenceable(36)) unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN10GLTexImageD1Ev(ptr noundef nonnull align 8 dereferenceable(36)) unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIfSaIfEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN12SiftMatchGPUD2Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #3 align 2

attributes #0 = { mustprogress 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 = { 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 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 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !6, i64 320}
!14 = !{!"_ZTS11SiftMatchGL", !15, i64 0, !7, i64 32, !7, i64 112, !16, i64 192, !7, i64 232, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !10, i64 344, !10, i64 348, !10, i64 352, !10, i64 356, !10, i64 360, !10, i64 364, !10, i64 368, !10, i64 372, !10, i64 376, !10, i64 380, !10, i64 384, !10, i64 388, !7, i64 392, !7, i64 400, !7, i64 408, !10, i64 416, !10, i64 420, !10, i64 424, !10, i64 428, !10, i64 432, !17, i64 440}
!15 = !{!"_ZTS12SiftMatchGPU", !10, i64 8, !10, i64 12, !6, i64 16, !10, i64 24}
!16 = !{!"_ZTS10GLTexImage", !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32}
!17 = !{!"_ZTSSt6vectorIfSaIfEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!14, !6, i64 336}
!22 = !{!14, !6, i64 328}
!23 = !{!14, !6, i64 312}
!24 = !{!15, !10, i64 24}
!25 = !{!14, !10, i64 428}
!26 = !{!14, !10, i64 420}
!27 = !{!14, !10, i64 416}
!28 = !{!14, !10, i64 424}
!29 = !{!14, !10, i64 432}


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

@_ZTV11SiftMatchGL = external dso_local unnamed_addr constant { [17 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11SiftMatchGLC2Eii(ptr noundef nonnull align 8 dereferenceable(464) %0, i32 noundef %1, i32 noundef %2) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  tail call void @_ZN12SiftMatchGPUC2Ei(ptr noundef nonnull align 8 dereferenceable(28) %0, i32 noundef 4096)
  store ptr getelementptr inbounds inrange(-16, 120) (i8, ptr @_ZTV11SiftMatchGL, i64 16), ptr %0, align 8, !tbaa !5
  %.ptr.ptr = getelementptr inbounds i8, ptr %0, i64 32
  invoke void @_ZN10GLTexImageC1Ev(ptr noundef nonnull align 8 dereferenceable(36) %.ptr.ptr)
          to label %5 unwind label %.thread

.thread:                                          ; preds = %3
  %4 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

5:                                                ; preds = %3
  %.ptr.ptr.1 = getelementptr inbounds i8, ptr %0, i64 72
  invoke void @_ZN10GLTexImageC1Ev(ptr noundef nonnull align 8 dereferenceable(36) %.ptr.ptr.1)
          to label %.preheader56.preheader unwind label %.preheader57.preheader

.preheader56.preheader:                           ; preds = %5
  %.ptr.ptr30 = getelementptr inbounds i8, ptr %0, i64 112
  invoke void @_ZN10GLTexImageC1Ev(ptr noundef nonnull align 8 dereferenceable(36) %.ptr.ptr30)
          to label %.preheader56.1 unwind label %.thread68

.thread68:                                        ; preds = %.preheader56.preheader
  %6 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit51

.preheader56.1:                                   ; preds = %.preheader56.preheader
  %.ptr.ptr30.1 = getelementptr inbounds i8, ptr %0, i64 152
  invoke void @_ZN10GLTexImageC1Ev(ptr noundef nonnull align 8 dereferenceable(36) %.ptr.ptr30.1)
          to label %7 unwind label %.preheader54.preheader

7:                                                ; preds = %.preheader56.1
  %8 = getelementptr inbounds i8, ptr %0, i64 192
  invoke void @_ZN10GLTexImageC1Ev(ptr noundef nonnull align 8 dereferenceable(36) %8)
          to label %.preheader53.preheader unwind label %23

.preheader53.preheader:                           ; preds = %7
  %.ptr.ptr39 = getelementptr inbounds i8, ptr %0, i64 232
  invoke void @_ZN10GLTexImageC1Ev(ptr noundef nonnull align 8 dereferenceable(36) %.ptr.ptr39)
          to label %.preheader53.1 unwind label %.thread70

.thread70:                                        ; preds = %.preheader53.preheader
  %9 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit52

.preheader53.1:                                   ; preds = %.preheader53.preheader
  %.ptr.ptr39.1 = getelementptr inbounds i8, ptr %0, i64 272
  invoke void @_ZN10GLTexImageC1Ev(ptr noundef nonnull align 8 dereferenceable(36) %.ptr.ptr39.1)
          to label %10 unwind label %.preheader.preheader

10:                                               ; preds = %.preheader53.1
  %11 = getelementptr inbounds i8, ptr %0, i64 440
  tail call void @_ZNSt6vectorIfSaIfEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  %12 = getelementptr inbounds i8, ptr %0, i64 312
  %13 = getelementptr inbounds i8, ptr %0, i64 392
  %14 = icmp slt i32 %1, 1
  %15 = add nuw nsw i32 %1, 31
  %16 = and i32 %15, 2147483616
  %17 = select i1 %14, i32 4096, i32 %16
  %18 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %12, i8 0, i64 32, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %13, i8 0, i64 24, i1 false)
  store i32 %17, ptr %18, align 8, !tbaa !8
  %19 = getelementptr inbounds i8, ptr %0, i64 416
  store <4 x i32> <i32 1, i32 1, i32 1, i32 32>, ptr %19, align 8, !tbaa !13
  %20 = getelementptr inbounds i8, ptr %0, i64 432
  store i32 0, ptr %20, align 8, !tbaa !14
  ret void

.preheader57.preheader:                           ; preds = %5
  %21 = landingpad { ptr, i32 }
          cleanup
  %.ptr21 = getelementptr inbounds i8, ptr %0, i64 32
  tail call void @_ZN10GLTexImageD1Ev(ptr noundef nonnull align 8 dereferenceable(36) %.ptr21) #5
  br label %.loopexit

.preheader54.preheader:                           ; preds = %.preheader56.1
  %22 = landingpad { ptr, i32 }
          cleanup
  %.ptr29 = getelementptr inbounds i8, ptr %0, i64 112
  tail call void @_ZN10GLTexImageD1Ev(ptr noundef nonnull align 8 dereferenceable(36) %.ptr29) #5
  br label %.loopexit51

23:                                               ; preds = %7
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit51.loopexit

.preheader.preheader:                             ; preds = %.preheader53.1
  %25 = landingpad { ptr, i32 }
          cleanup
  %.ptr38 = getelementptr inbounds i8, ptr %0, i64 232
  tail call void @_ZN10GLTexImageD1Ev(ptr noundef nonnull align 8 dereferenceable(36) %.ptr38) #5
  br label %.loopexit52

.loopexit52:                                      ; preds = %.preheader.preheader, %.thread70
  %26 = phi { ptr, i32 } [ %9, %.thread70 ], [ %25, %.preheader.preheader ]
  tail call void @_ZN10GLTexImageD1Ev(ptr noundef nonnull align 8 dereferenceable(36) %8) #5
  br label %.loopexit51.loopexit

.loopexit51.loopexit:                             ; preds = %.loopexit52, %23
  %.pn = phi { ptr, i32 } [ %26, %.loopexit52 ], [ %24, %23 ]
  tail call void @_ZN10GLTexImageD1Ev(ptr noundef nonnull align 8 dereferenceable(36) %.ptr.ptr30.1) #5
  tail call void @_ZN10GLTexImageD1Ev(ptr noundef nonnull align 8 dereferenceable(36) %.ptr.ptr30) #5
  br label %.loopexit51

.loopexit51:                                      ; preds = %.preheader54.preheader, %.thread68, %.loopexit51.loopexit
  %.pn.pn = phi { ptr, i32 } [ %.pn, %.loopexit51.loopexit ], [ %6, %.thread68 ], [ %22, %.preheader54.preheader ]
  tail call void @_ZN10GLTexImageD1Ev(ptr noundef nonnull align 8 dereferenceable(36) %.ptr.ptr.1) #5
  tail call void @_ZN10GLTexImageD1Ev(ptr noundef nonnull align 8 dereferenceable(36) %.ptr.ptr) #5
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader57.preheader, %.thread, %.loopexit51
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %.loopexit51 ], [ %4, %.thread ], [ %21, %.preheader57.preheader ]
  tail call void @_ZN12SiftMatchGPUD2Ev(ptr noundef nonnull align 8 dereferenceable(28) %0) #5
  resume { ptr, i32 } %.pn.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12SiftMatchGPUC2Ei(ptr noundef nonnull align 8 dereferenceable(28), i32 noundef) unnamed_addr #0 align 2

declare void @_ZN10GLTexImageC1Ev(ptr noundef nonnull align 8 dereferenceable(36)) unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN10GLTexImageD1Ev(ptr noundef nonnull align 8 dereferenceable(36)) unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIfSaIfEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN12SiftMatchGPUD2Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #3 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

attributes #0 = { mustprogress 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 = { 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 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 nounwind willreturn memory(argmem: write) }
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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !10, i64 24}
!9 = !{!"_ZTS12SiftMatchGPU", !10, i64 8, !10, i64 12, !12, i64 16, !10, i64 24}
!10 = !{!"int", !11, i64 0}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!"any pointer", !11, i64 0}
!13 = !{!10, !10, i64 0}
!14 = !{!15, !10, i64 432}
!15 = !{!"_ZTS11SiftMatchGL", !9, i64 0, !11, i64 32, !11, i64 112, !16, i64 192, !11, i64 232, !12, i64 312, !12, i64 320, !12, i64 328, !12, i64 336, !10, i64 344, !10, i64 348, !10, i64 352, !10, i64 356, !10, i64 360, !10, i64 364, !10, i64 368, !10, i64 372, !10, i64 376, !10, i64 380, !10, i64 384, !10, i64 388, !11, i64 392, !11, i64 400, !11, i64 408, !10, i64 416, !10, i64 420, !10, i64 424, !10, i64 428, !10, i64 432, !17, i64 440}
!16 = !{!"_ZTS10GLTexImage", !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32}
!17 = !{!"_ZTSSt6vectorIfSaIfEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,IPSCCPPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopSimplifyPass,MemCpyOptPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass