; LLVM IR from QiaoLiuHit/LSOTB-TIR :: vlfeat-0.9.19/vl (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._VlSiftFilt = type { double, double, double, double, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, i32, i32, ptr, double, i64, ptr, i32, i32, double, double, double, double, double, ptr, i32 }

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

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #1

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @vl_sift_get_octave(ptr noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @copy_and_downsample(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) #3

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

; Function Attrs: nounwind uwtable
declare hidden void @_vl_sift_smooth(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef, double noundef) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @vl_sift_process_next_octave(ptr noundef %0) #3 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %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 double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca i32, align 4
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct._VlSiftFilt, ptr %24, i32 0, i32 12
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  store ptr %26, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct._VlSiftFilt, ptr %27, i32 0, i32 6
  %29 = load i32, ptr %28, align 8, !tbaa !14
  store i32 %29, ptr %13, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct._VlSiftFilt, ptr %30, i32 0, i32 7
  %32 = load i32, ptr %31, align 4, !tbaa !16
  store i32 %32, ptr %14, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct._VlSiftFilt, ptr %33, i32 0, i32 8
  %35 = load i32, ptr %34, align 8, !tbaa !17
  store i32 %35, ptr %15, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct._VlSiftFilt, ptr %36, i32 0, i32 9
  %38 = load i32, ptr %37, align 4, !tbaa !18
  store i32 %38, ptr %16, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct._VlSiftFilt, ptr %39, i32 0, i32 10
  %41 = load i32, ptr %40, align 8, !tbaa !19
  store i32 %41, ptr %17, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct._VlSiftFilt, ptr %42, i32 0, i32 1
  %44 = load double, ptr %43, align 8, !tbaa !20
  store double %44, ptr %18, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct._VlSiftFilt, ptr %45, i32 0, i32 2
  %47 = load double, ptr %46, align 8, !tbaa !22
  store double %47, ptr %19, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct._VlSiftFilt, ptr %48, i32 0, i32 3
  %50 = load double, ptr %49, align 8, !tbaa !23
  store double %50, ptr %20, align 8, !tbaa !21
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct._VlSiftFilt, ptr %51, i32 0, i32 11
  %53 = load i32, ptr %52, align 4, !tbaa !24
  %54 = load i32, ptr %15, align 4, !tbaa !15
  %55 = load i32, ptr %13, align 4, !tbaa !15
  %56 = add nsw i32 %54, %55
  %57 = sub nsw i32 %56, 1
  %58 = icmp eq i32 %53, %57
  br i1 %58, label %59, label %60

59:                                               ; preds = %1
  store i32 5, ptr %2, align 4
  store i32 1, ptr %21, align 4
  br label %221

60:                                               ; preds = %1
  %61 = load i32, ptr %16, align 4, !tbaa !15
  %62 = load i32, ptr %14, align 4, !tbaa !15
  %63 = add nsw i32 %61, %62
  %64 = load i32, ptr %17, align 4, !tbaa !15
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %66, label %70

66:                                               ; preds = %60
  %67 = load i32, ptr %16, align 4, !tbaa !15
  %68 = load i32, ptr %14, align 4, !tbaa !15
  %69 = add nsw i32 %67, %68
  br label %72

70:                                               ; preds = %60
  %71 = load i32, ptr %17, align 4, !tbaa !15
  br label %72

72:                                               ; preds = %70, %66
  %73 = phi i32 [ %69, %66 ], [ %71, %70 ]
  store i32 %73, ptr %7, align 4, !tbaa !15
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = call i32 @vl_sift_get_octave_width(ptr noundef %74)
  store i32 %75, ptr %6, align 4, !tbaa !15
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = call i32 @vl_sift_get_octave_height(ptr noundef %76)
  store i32 %77, ptr %5, align 4, !tbaa !15
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = load i32, ptr %7, align 4, !tbaa !15
  %80 = call ptr @vl_sift_get_octave(ptr noundef %78, i32 noundef %79)
  store ptr %80, ptr %11, align 8, !tbaa !5
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = load i32, ptr %16, align 4, !tbaa !15
  %83 = call ptr @vl_sift_get_octave(ptr noundef %81, i32 noundef %82)
  store ptr %83, ptr %10, align 8, !tbaa !5
  %84 = load ptr, ptr %10, align 8, !tbaa !5
  %85 = load ptr, ptr %11, align 8, !tbaa !5
  %86 = load i32, ptr %6, align 4, !tbaa !15
  %87 = load i32, ptr %5, align 4, !tbaa !15
  call void @copy_and_downsample(ptr noundef %84, ptr noundef %85, i32 noundef %86, i32 noundef %87, i32 noundef 1)
  %88 = load ptr, ptr %3, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct._VlSiftFilt, ptr %88, i32 0, i32 11
  %90 = load i32, ptr %89, align 4, !tbaa !24
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %89, align 4, !tbaa !24
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct._VlSiftFilt, ptr %92, i32 0, i32 21
  store i32 0, ptr %93, align 8, !tbaa !25
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct._VlSiftFilt, ptr %94, i32 0, i32 11
  %96 = load i32, ptr %95, align 4, !tbaa !24
  %97 = sub nsw i32 0, %96
  %98 = icmp sge i32 %97, 0
  br i1 %98, label %99, label %108

99:                                               ; preds = %72
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct._VlSiftFilt, ptr %100, i32 0, i32 4
  %102 = load i32, ptr %101, align 8, !tbaa !26
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct._VlSiftFilt, ptr %103, i32 0, i32 11
  %105 = load i32, ptr %104, align 4, !tbaa !24
  %106 = sub nsw i32 0, %105
  %107 = shl i32 %102, %106
  br label %118

108:                                              ; preds = %72
  %109 = load ptr, ptr %3, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct._VlSiftFilt, ptr %109, i32 0, i32 4
  %111 = load i32, ptr %110, align 8, !tbaa !26
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct._VlSiftFilt, ptr %112, i32 0, i32 11
  %114 = load i32, ptr %113, align 4, !tbaa !24
  %115 = sub nsw i32 0, %114
  %116 = sub nsw i32 0, %115
  %117 = ashr i32 %111, %116
  br label %118

118:                                              ; preds = %108, %99
  %119 = phi i32 [ %107, %99 ], [ %117, %108 ]
  %120 = load ptr, ptr %3, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct._VlSiftFilt, ptr %120, i32 0, i32 15
  store i32 %119, ptr %121, align 8, !tbaa !27
  store i32 %119, ptr %6, align 4, !tbaa !15
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct._VlSiftFilt, ptr %122, i32 0, i32 11
  %124 = load i32, ptr %123, align 4, !tbaa !24
  %125 = sub nsw i32 0, %124
  %126 = icmp sge i32 %125, 0
  br i1 %126, label %127, label %136

127:                                              ; preds = %118
  %128 = load ptr, ptr %3, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct._VlSiftFilt, ptr %128, i32 0, i32 5
  %130 = load i32, ptr %129, align 4, !tbaa !28
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct._VlSiftFilt, ptr %131, i32 0, i32 11
  %133 = load i32, ptr %132, align 4, !tbaa !24
  %134 = sub nsw i32 0, %133
  %135 = shl i32 %130, %134
  br label %146

136:                                              ; preds = %118
  %137 = load ptr, ptr %3, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct._VlSiftFilt, ptr %137, i32 0, i32 5
  %139 = load i32, ptr %138, align 4, !tbaa !28
  %140 = load ptr, ptr %3, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct._VlSiftFilt, ptr %140, i32 0, i32 11
  %142 = load i32, ptr %141, align 4, !tbaa !24
  %143 = sub nsw i32 0, %142
  %144 = sub nsw i32 0, %143
  %145 = ashr i32 %139, %144
  br label %146

146:                                              ; preds = %136, %127
  %147 = phi i32 [ %135, %127 ], [ %145, %136 ]
  %148 = load ptr, ptr %3, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct._VlSiftFilt, ptr %148, i32 0, i32 16
  store i32 %147, ptr %149, align 4, !tbaa !29
  store i32 %147, ptr %5, align 4, !tbaa !15
  %150 = load double, ptr %18, align 8, !tbaa !21
  %151 = load double, ptr %19, align 8, !tbaa !21
  %152 = fptrunc double %151 to float
  %153 = load i32, ptr %16, align 4, !tbaa !15
  %154 = sitofp i32 %153 to float
  %155 = call float @powf(float noundef %152, float noundef %154) #5
  %156 = fpext float %155 to double
  %157 = fmul double %150, %156
  store double %157, ptr %8, align 8, !tbaa !21
  %158 = load double, ptr %18, align 8, !tbaa !21
  %159 = load double, ptr %19, align 8, !tbaa !21
  %160 = fptrunc double %159 to float
  %161 = load i32, ptr %7, align 4, !tbaa !15
  %162 = load i32, ptr %14, align 4, !tbaa !15
  %163 = sub nsw i32 %161, %162
  %164 = sitofp i32 %163 to float
  %165 = call float @powf(float noundef %160, float noundef %164) #5
  %166 = fpext float %165 to double
  %167 = fmul double %158, %166
  store double %167, ptr %9, align 8, !tbaa !21
  %168 = load double, ptr %8, align 8, !tbaa !21
  %169 = load double, ptr %9, align 8, !tbaa !21
  %170 = fcmp ogt double %168, %169
  br i1 %170, label %171, label %189

171:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %172 = load double, ptr %8, align 8, !tbaa !21
  %173 = load double, ptr %8, align 8, !tbaa !21
  %174 = load double, ptr %9, align 8, !tbaa !21
  %175 = load double, ptr %9, align 8, !tbaa !21
  %176 = fmul double %174, %175
  %177 = fneg double %176
  %178 = call double @llvm.fmuladd.f64(double %172, double %173, double %177)
  %179 = call double @sqrt(double noundef %178) #5
  store double %179, ptr %22, align 8, !tbaa !21
  %180 = load ptr, ptr %3, align 8, !tbaa !5
  %181 = load ptr, ptr %10, align 8, !tbaa !5
  %182 = load ptr, ptr %12, align 8, !tbaa !5
  %183 = load ptr, ptr %10, align 8, !tbaa !5
  %184 = load i32, ptr %6, align 4, !tbaa !15
  %185 = sext i32 %184 to i64
  %186 = load i32, ptr %5, align 4, !tbaa !15
  %187 = sext i32 %186 to i64
  %188 = load double, ptr %22, align 8, !tbaa !21
  call void @_vl_sift_smooth(ptr noundef %180, ptr noundef %181, ptr noundef %182, ptr noundef %183, i64 noundef %185, i64 noundef %187, double noundef %188)
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br label %189

189:                                              ; preds = %171, %146
  %190 = load i32, ptr %16, align 4, !tbaa !15
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %4, align 4, !tbaa !15
  br label %192

192:                                              ; preds = %217, %189
  %193 = load i32, ptr %4, align 4, !tbaa !15
  %194 = load i32, ptr %17, align 4, !tbaa !15
  %195 = icmp sle i32 %193, %194
  br i1 %195, label %196, label %220

196:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %197 = load double, ptr %20, align 8, !tbaa !21
  %198 = load double, ptr %19, align 8, !tbaa !21
  %199 = load i32, ptr %4, align 4, !tbaa !15
  %200 = sitofp i32 %199 to double
  %201 = call double @pow(double noundef %198, double noundef %200) #5
  %202 = fmul double %197, %201
  store double %202, ptr %23, align 8, !tbaa !21
  %203 = load ptr, ptr %3, align 8, !tbaa !5
  %204 = load ptr, ptr %3, align 8, !tbaa !5
  %205 = load i32, ptr %4, align 4, !tbaa !15
  %206 = call ptr @vl_sift_get_octave(ptr noundef %204, i32 noundef %205)
  %207 = load ptr, ptr %12, align 8, !tbaa !5
  %208 = load ptr, ptr %3, align 8, !tbaa !5
  %209 = load i32, ptr %4, align 4, !tbaa !15
  %210 = sub nsw i32 %209, 1
  %211 = call ptr @vl_sift_get_octave(ptr noundef %208, i32 noundef %210)
  %212 = load i32, ptr %6, align 4, !tbaa !15
  %213 = sext i32 %212 to i64
  %214 = load i32, ptr %5, align 4, !tbaa !15
  %215 = sext i32 %214 to i64
  %216 = load double, ptr %23, align 8, !tbaa !21
  call void @_vl_sift_smooth(ptr noundef %203, ptr noundef %206, ptr noundef %207, ptr noundef %211, i64 noundef %213, i64 noundef %215, double noundef %216)
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %217

217:                                              ; preds = %196
  %218 = load i32, ptr %4, align 4, !tbaa !15
  %219 = add nsw i32 %218, 1
  store i32 %219, ptr %4, align 4, !tbaa !15
  br label %192, !llvm.loop !30

220:                                              ; preds = %192
  store i32 0, ptr %2, align 4
  store i32 1, ptr %21, align 4
  br label %221

221:                                              ; preds = %220, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  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 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  %222 = load i32, ptr %2, align 4
  ret i32 %222
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @vl_sift_get_octave_width(ptr noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @vl_sift_get_octave_height(ptr noundef) #2

; Function Attrs: nounwind
declare float @powf(float noundef, float noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { inlinehint 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 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, !6, i64 64}
!10 = !{!"_VlSiftFilt", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48, !12, i64 52, !12, i64 56, !12, i64 60, !6, i64 64, !6, i64 72, !6, i64 80, !12, i64 88, !12, i64 92, !6, i64 96, !11, i64 104, !13, i64 112, !6, i64 120, !12, i64 128, !12, i64 132, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !6, i64 176, !12, i64 184}
!11 = !{!"double", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = !{!10, !12, i64 40}
!15 = !{!12, !12, i64 0}
!16 = !{!10, !12, i64 44}
!17 = !{!10, !12, i64 48}
!18 = !{!10, !12, i64 52}
!19 = !{!10, !12, i64 56}
!20 = !{!10, !11, i64 8}
!21 = !{!11, !11, i64 0}
!22 = !{!10, !11, i64 16}
!23 = !{!10, !11, i64 24}
!24 = !{!10, !12, i64 60}
!25 = !{!10, !12, i64 128}
!26 = !{!10, !12, i64 32}
!27 = !{!10, !12, i64 88}
!28 = !{!10, !12, i64 36}
!29 = !{!10, !12, i64 92}
!30 = distinct !{!30, !31}
!31 = !{!"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"

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @pow(double noundef, double noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @vl_sift_get_octave(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @copy_and_downsample(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

; Function Attrs: nounwind uwtable
declare hidden void @_vl_sift_smooth(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef, double noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 6) i32 @vl_sift_process_next_octave(ptr noundef %0) local_unnamed_addr #2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 64
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 40
  %5 = load i32, ptr %4, align 8, !tbaa !13
  %6 = getelementptr inbounds i8, ptr %0, i64 44
  %7 = load i32, ptr %6, align 4, !tbaa !14
  %8 = getelementptr inbounds i8, ptr %0, i64 48
  %9 = load i32, ptr %8, align 8, !tbaa !15
  %10 = getelementptr inbounds i8, ptr %0, i64 52
  %11 = load i32, ptr %10, align 4, !tbaa !16
  %12 = getelementptr inbounds i8, ptr %0, i64 56
  %13 = load i32, ptr %12, align 8, !tbaa !17
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  %15 = load double, ptr %14, align 8, !tbaa !18
  %16 = getelementptr inbounds i8, ptr %0, i64 16
  %17 = load double, ptr %16, align 8, !tbaa !19
  %18 = getelementptr inbounds i8, ptr %0, i64 24
  %19 = load double, ptr %18, align 8, !tbaa !20
  %20 = getelementptr inbounds i8, ptr %0, i64 60
  %21 = load i32, ptr %20, align 4, !tbaa !21
  %22 = add i32 %5, -1
  %23 = add i32 %22, %9
  %24 = icmp eq i32 %21, %23
  br i1 %24, label %.loopexit, label %25

25:                                               ; preds = %1
  %26 = add nsw i32 %11, %7
  %27 = tail call i32 @llvm.smin.i32(i32 %26, i32 %13)
  %28 = tail call i32 @vl_sift_get_octave_width(ptr noundef nonnull %0)
  %29 = tail call i32 @vl_sift_get_octave_height(ptr noundef nonnull %0)
  %30 = tail call ptr @vl_sift_get_octave(ptr noundef nonnull %0, i32 noundef %27)
  %31 = tail call ptr @vl_sift_get_octave(ptr noundef nonnull %0, i32 noundef %11)
  tail call void @copy_and_downsample(ptr noundef %31, ptr noundef %30, i32 noundef %28, i32 noundef %29, i32 noundef 1)
  %32 = load i32, ptr %20, align 4, !tbaa !21
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %20, align 4, !tbaa !21
  %34 = getelementptr inbounds i8, ptr %0, i64 128
  store i32 0, ptr %34, align 8, !tbaa !22
  %35 = icmp slt i32 %32, 0
  br i1 %35, label %36, label %44

36:                                               ; preds = %25
  %37 = xor i32 %32, -1
  %38 = getelementptr inbounds i8, ptr %0, i64 32
  %39 = load i32, ptr %38, align 8, !tbaa !23
  %40 = shl i32 %39, %37
  %41 = getelementptr inbounds i8, ptr %0, i64 36
  %42 = load i32, ptr %41, align 4, !tbaa !24
  %43 = shl i32 %42, %37
  br label %51

44:                                               ; preds = %25
  %45 = getelementptr inbounds i8, ptr %0, i64 32
  %46 = load i32, ptr %45, align 8, !tbaa !23
  %47 = ashr i32 %46, %33
  %48 = getelementptr inbounds i8, ptr %0, i64 36
  %49 = load i32, ptr %48, align 4, !tbaa !24
  %50 = ashr i32 %49, %33
  br label %51

51:                                               ; preds = %44, %36
  %.sink = phi i32 [ %40, %36 ], [ %47, %44 ]
  %52 = phi i32 [ %43, %36 ], [ %50, %44 ]
  %53 = getelementptr inbounds i8, ptr %0, i64 88
  store i32 %.sink, ptr %53, align 8
  %54 = getelementptr inbounds i8, ptr %0, i64 92
  store i32 %52, ptr %54, align 4, !tbaa !25
  %55 = fptrunc double %17 to float
  %56 = sitofp i32 %11 to float
  %57 = tail call float @powf(float noundef %55, float noundef %56) #5
  %58 = fpext float %57 to double
  %59 = fmul double %15, %58
  %60 = sub nsw i32 %27, %7
  %61 = sitofp i32 %60 to float
  %62 = tail call float @powf(float noundef %55, float noundef %61) #5
  %63 = fpext float %62 to double
  %64 = fmul double %15, %63
  %65 = fcmp ogt double %59, %64
  br i1 %65, label %66, label %73

66:                                               ; preds = %51
  %67 = fneg double %64
  %68 = fmul double %64, %67
  %69 = tail call double @llvm.fmuladd.f64(double %59, double %59, double %68)
  %70 = tail call double @sqrt(double noundef %69) #5
  %71 = sext i32 %.sink to i64
  %72 = sext i32 %52 to i64
  tail call void @_vl_sift_smooth(ptr noundef nonnull %0, ptr noundef %31, ptr noundef %3, ptr noundef %31, i64 noundef %71, i64 noundef %72, double noundef %70)
  br label %73

73:                                               ; preds = %66, %51
  %.not.not83 = icmp slt i32 %11, %13
  br i1 %.not.not83, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %73
  %74 = sext i32 %.sink to i64
  %75 = sext i32 %52 to i64
  br label %76

76:                                               ; preds = %.lr.ph, %76
  %.078.in84 = phi i32 [ %11, %.lr.ph ], [ %.078, %76 ]
  %.078 = add nsw i32 %.078.in84, 1
  %77 = sitofp i32 %.078 to double
  %78 = tail call double @pow(double noundef %17, double noundef %77) #5
  %79 = fmul double %19, %78
  %80 = tail call ptr @vl_sift_get_octave(ptr noundef %0, i32 noundef %.078)
  %81 = tail call ptr @vl_sift_get_octave(ptr noundef %0, i32 noundef %.078.in84)
  tail call void @_vl_sift_smooth(ptr noundef %0, ptr noundef %80, ptr noundef %3, ptr noundef %81, i64 noundef %74, i64 noundef %75, double noundef %79)
  %exitcond.not = icmp eq i32 %.078, %13
  br i1 %exitcond.not, label %.loopexit, label %76, !llvm.loop !26

.loopexit:                                        ; preds = %76, %73, %1
  %.0 = phi i32 [ 5, %1 ], [ 0, %73 ], [ 0, %76 ]
  ret i32 %.0
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @vl_sift_get_octave_width(ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @vl_sift_get_octave_height(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @powf(float noundef, float noundef) local_unnamed_addr #0

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

attributes #0 = { mustprogress nofree nounwind willreturn memory(write) "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 = { inlinehint 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 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !11, i64 64}
!6 = !{!"_VlSiftFilt", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !11, i64 64, !11, i64 72, !11, i64 80, !10, i64 88, !10, i64 92, !11, i64 96, !7, i64 104, !12, i64 112, !11, i64 120, !10, i64 128, !10, i64 132, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !11, i64 176, !10, i64 184}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"long long", !8, i64 0}
!13 = !{!6, !10, i64 40}
!14 = !{!6, !10, i64 44}
!15 = !{!6, !10, i64 48}
!16 = !{!6, !10, i64 52}
!17 = !{!6, !10, i64 56}
!18 = !{!6, !7, i64 8}
!19 = !{!6, !7, i64 16}
!20 = !{!6, !7, i64 24}
!21 = !{!6, !10, i64 60}
!22 = !{!6, !10, i64 128}
!23 = !{!6, !10, i64 32}
!24 = !{!6, !10, i64 36}
!25 = !{!6, !10, i64 92}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


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