; LLVM IR from ox-vgg/vise :: src/search_engine/relja_retrival/external/KMCode_relja/descriptor/AffineRegion._cc799c10 (Z15findScaleRegionP12ImageContentP16CornerDescriptor)

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6Corner4getXEv(ptr noundef nonnull align 4 dereferenceable(88)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6Corner4getYEv(ptr noundef nonnull align 4 dereferenceable(88)) #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6Corner14getCornerScaleEv(ptr noundef nonnull align 4 dereferenceable(88)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4sqrtf(float noundef) #1

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #3

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6Corner14setCornerScaleEf(ptr noundef nonnull align 4 dereferenceable(88), float noundef) #1 align 2

; Function Attrs: nounwind
declare void @_ZN12ImageContentD1Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12ImageContentC2Eii(ptr noundef nonnull align 8 dereferenceable(80), i32 noundef, i32 noundef) unnamed_addr #6 align 2

declare noundef zeroext i1 @_ZN12ImageContent11interpolateEPS_ffffff(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef) #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6Corner6setX_YEff(ptr noundef nonnull align 4 dereferenceable(88), float noundef, float noundef) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK16CornerDescriptor7getTypeEv(ptr noundef nonnull align 8 dereferenceable(116)) #1 align 2

declare void @_ZN6MatrixC1Eiid(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, double noundef) unnamed_addr #7

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_Z14searchDerScaleP12ImageContentP16CornerDescriptor(ptr noundef, ptr noundef) #6

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z15findScaleRegionP12ImageContentP16CornerDescriptor(ptr noundef %0, ptr noundef %1) #6 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca float, align 4
  %7 = alloca i32, align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca float, align 4
  %23 = alloca float, align 4
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca ptr, align 8
  %31 = alloca float, align 4
  %32 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = call noundef float @_ZNK6Corner14getCornerScaleEv(ptr noundef nonnull align 4 dereferenceable(88) %33)
  store float %34, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = call noundef float @_ZNK6Corner4getXEv(ptr noundef nonnull align 4 dereferenceable(88) %35)
  store float %36, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = call noundef float @_ZNK6Corner4getYEv(ptr noundef nonnull align 4 dereferenceable(88) %37)
  store float %38, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 1, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store float 0.000000e+00, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store float 0.000000e+00, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store float 1.000000e+00, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store float 1.000000e+00, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store float 1.000000e+02, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store float 1.000000e+02, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store i32 0, ptr %20, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  store float 5.000000e-01, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store float 0x3FA99999A0000000, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %39 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 24) #9
  invoke void @_ZN6MatrixC1Eiid(ptr noundef nonnull align 8 dereferenceable(24) %39, i32 noundef 2, i32 noundef 2, double noundef 0.000000e+00)
          to label %40 unwind label %70

40:                                               ; preds = %2
  store ptr %39, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  store i32 0, ptr %27, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  store i32 41, ptr %28, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %41 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 80) #9
  %42 = load i32, ptr %28, align 4, !tbaa !11
  %43 = load i32, ptr %28, align 4, !tbaa !11
  invoke void @_ZN12ImageContentC2Eii(ptr noundef nonnull align 8 dereferenceable(80) %41, i32 noundef %42, i32 noundef %43)
          to label %44 unwind label %74

44:                                               ; preds = %40
  store ptr %41, ptr %30, align 8, !tbaa !5
  %45 = load i32, ptr %28, align 4, !tbaa !11
  %46 = sub nsw i32 %45, 1
  %47 = sitofp i32 %46 to double
  %48 = fdiv double %47, 9.000000e+00
  %49 = fptosi double %48 to i32
  store i32 %49, ptr %29, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  store i32 0, ptr %11, align 4, !tbaa !11
  br label %50

50:                                               ; preds = %158, %44
  %51 = load i32, ptr %11, align 4, !tbaa !11
  %52 = icmp slt i32 %51, 50
  br i1 %52, label %53, label %56

53:                                               ; preds = %50
  %54 = load i32, ptr %10, align 4, !tbaa !11
  %55 = icmp ne i32 %54, 0
  br label %56

56:                                               ; preds = %53, %50
  %57 = phi i1 [ false, %50 ], [ %55, %53 ]
  br i1 %57, label %58, label %161

58:                                               ; preds = %56
  %59 = load float, ptr %16, align 4, !tbaa !9
  store float %59, ptr %15, align 4, !tbaa !9
  %60 = load float, ptr %6, align 4, !tbaa !9
  store float %60, ptr %19, align 4, !tbaa !9
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = call noundef float @_Z14searchDerScaleP12ImageContentP16CornerDescriptor(ptr noundef %61, ptr noundef %62)
  %64 = fpext float %63 to double
  %65 = fmul double 1.000000e+00, %64
  %66 = fptrunc double %65 to float
  store float %66, ptr %6, align 4, !tbaa !9
  %67 = load float, ptr %6, align 4, !tbaa !9
  %68 = fcmp olt float %67, 1.000000e+00
  br i1 %68, label %69, label %78

69:                                               ; preds = %58
  store i32 0, ptr %3, align 4
  store i32 1, ptr %32, align 4
  br label %172

70:                                               ; preds = %2
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %25, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %26, align 4
  call void @_ZdlPvm(ptr noundef %39, i64 noundef 24) #10
  br label %174

74:                                               ; preds = %40
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %25, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %26, align 4
  call void @_ZdlPvm(ptr noundef %41, i64 noundef 80) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  br label %174

78:                                               ; preds = %58
  %79 = load float, ptr %19, align 4, !tbaa !9
  %80 = load float, ptr %6, align 4, !tbaa !9
  %81 = fdiv float %79, %80
  %82 = fpext float %81 to double
  %83 = fsub double 1.000000e+00, %82
  %84 = call double @llvm.fabs.f64(double %83)
  %85 = fptrunc double %84 to float
  store float %85, ptr %16, align 4, !tbaa !9
  %86 = load float, ptr %6, align 4, !tbaa !9
  %87 = fpext float %86 to double
  %88 = fmul double 4.500000e+00, %87
  %89 = call double @llvm.rint.f64(double %88)
  %90 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %89, double 1.000000e+00)
  %91 = fptosi double %90 to i32
  store i32 %91, ptr %7, align 4, !tbaa !11
  %92 = load i32, ptr %7, align 4, !tbaa !11
  %93 = sitofp i32 %92 to float
  %94 = load i32, ptr %28, align 4, !tbaa !11
  %95 = sitofp i32 %94 to float
  %96 = fdiv float %93, %95
  store float %96, ptr %31, align 4, !tbaa !9
  %97 = load ptr, ptr %30, align 8, !tbaa !5
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = load float, ptr %8, align 4, !tbaa !9
  %100 = load float, ptr %9, align 4, !tbaa !9
  %101 = load float, ptr %31, align 4, !tbaa !9
  %102 = load float, ptr %31, align 4, !tbaa !9
  %103 = call noundef zeroext i1 @_ZN12ImageContent11interpolateEPS_ffffff(ptr noundef nonnull align 8 dereferenceable(80) %97, ptr noundef %98, float noundef %99, float noundef %100, float noundef %101, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef %102)
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = call noundef i32 @_ZNK16CornerDescriptor7getTypeEv(ptr noundef nonnull align 8 dereferenceable(116) %104)
  %106 = icmp eq i32 %105, 1
  br i1 %106, label %107, label %108

107:                                              ; preds = %78
  br label %115

108:                                              ; preds = %78
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = call noundef i32 @_ZNK16CornerDescriptor7getTypeEv(ptr noundef nonnull align 8 dereferenceable(116) %109)
  %111 = icmp eq i32 %110, 2
  br i1 %111, label %112, label %113

112:                                              ; preds = %108
  br label %114

113:                                              ; preds = %108
  store i32 0, ptr %3, align 4
  store i32 1, ptr %32, align 4
  br label %172

114:                                              ; preds = %112
  br label %115

115:                                              ; preds = %114, %107
  %116 = load float, ptr %17, align 4, !tbaa !9
  store float %116, ptr %18, align 4, !tbaa !9
  %117 = load i32, ptr %20, align 4, !tbaa !11
  %118 = sitofp i32 %117 to float
  %119 = load float, ptr %31, align 4, !tbaa !9
  %120 = fdiv float %118, %119
  %121 = load float, ptr %8, align 4, !tbaa !9
  %122 = fadd float %121, %120
  store float %122, ptr %8, align 4, !tbaa !9
  %123 = load i32, ptr %21, align 4, !tbaa !11
  %124 = sitofp i32 %123 to float
  %125 = load float, ptr %31, align 4, !tbaa !9
  %126 = fdiv float %124, %125
  %127 = load float, ptr %9, align 4, !tbaa !9
  %128 = fadd float %127, %126
  store float %128, ptr %9, align 4, !tbaa !9
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = load float, ptr %8, align 4, !tbaa !9
  %131 = load float, ptr %9, align 4, !tbaa !9
  call void @_ZN6Corner6setX_YEff(ptr noundef nonnull align 4 dereferenceable(88) %129, float noundef %130, float noundef %131)
  %132 = load i32, ptr %20, align 4, !tbaa !11
  %133 = sitofp i32 %132 to float
  %134 = load i32, ptr %20, align 4, !tbaa !11
  %135 = sitofp i32 %134 to float
  %136 = load i32, ptr %21, align 4, !tbaa !11
  %137 = load i32, ptr %21, align 4, !tbaa !11
  %138 = mul nsw i32 %136, %137
  %139 = sitofp i32 %138 to float
  %140 = call float @llvm.fmuladd.f32(float %133, float %135, float %139)
  %141 = call noundef float @_ZSt4sqrtf(float noundef %140)
  store float %141, ptr %17, align 4, !tbaa !9
  %142 = load i32, ptr %11, align 4, !tbaa !11
  %143 = icmp sgt i32 %142, 10
  br i1 %143, label %147, label %144

144:                                              ; preds = %115
  %145 = load i32, ptr %12, align 4, !tbaa !11
  %146 = icmp eq i32 %145, 0
  br i1 %146, label %147, label %148

147:                                              ; preds = %144, %115
  store i32 0, ptr %3, align 4
  store i32 1, ptr %32, align 4
  br label %172

148:                                              ; preds = %144
  %149 = load float, ptr %17, align 4, !tbaa !9
  %150 = load float, ptr %22, align 4, !tbaa !9
  %151 = fcmp olt float %149, %150
  br i1 %151, label %152, label %157

152:                                              ; preds = %148
  %153 = load float, ptr %16, align 4, !tbaa !9
  %154 = load float, ptr %23, align 4, !tbaa !9
  %155 = fcmp olt float %153, %154
  br i1 %155, label %156, label %157

156:                                              ; preds = %152
  store i32 0, ptr %10, align 4, !tbaa !11
  br label %157

157:                                              ; preds = %156, %152, %148
  br label %158

158:                                              ; preds = %157
  %159 = load i32, ptr %11, align 4, !tbaa !11
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %11, align 4, !tbaa !11
  br label %50, !llvm.loop !13

161:                                              ; preds = %56
  %162 = load ptr, ptr %30, align 8, !tbaa !5
  %163 = icmp eq ptr %162, null
  br i1 %163, label %165, label %164

164:                                              ; preds = %161
  call void @_ZN12ImageContentD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %162) #8
  call void @_ZdlPvm(ptr noundef %162, i64 noundef 80) #10
  br label %165

165:                                              ; preds = %164, %161
  %166 = load ptr, ptr %5, align 8, !tbaa !5
  %167 = load float, ptr %8, align 4, !tbaa !9
  %168 = load float, ptr %9, align 4, !tbaa !9
  call void @_ZN6Corner6setX_YEff(ptr noundef nonnull align 4 dereferenceable(88) %166, float noundef %167, float noundef %168)
  %169 = load ptr, ptr %5, align 8, !tbaa !5
  %170 = load float, ptr %6, align 4, !tbaa !9
  call void @_ZN6Corner14setCornerScaleEf(ptr noundef nonnull align 4 dereferenceable(88) %169, float noundef %170)
  %171 = load i32, ptr %11, align 4, !tbaa !11
  store i32 %171, ptr %3, align 4
  store i32 1, ptr %32, align 4
  br label %172

172:                                              ; preds = %165, %147, %113, %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  %173 = load i32, ptr %3, align 4
  ret i32 %173

174:                                              ; preds = %74, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %175

175:                                              ; preds = %174
  %176 = load ptr, ptr %25, align 8
  %177 = load i32, ptr %26, align 4
  %178 = insertvalue { ptr, i32 } poison, ptr %176, 0
  %179 = insertvalue { ptr, i32 } %178, i32 %177, 1
  resume { ptr, i32 } %179
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nobuiltin allocsize(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 = { nobuiltin 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 #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 = { 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 #7 = { "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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin 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 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6Corner4getXEv(ptr noundef nonnull align 4 dereferenceable(88)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6Corner4getYEv(ptr noundef nonnull align 4 dereferenceable(88)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6Corner14getCornerScaleEv(ptr noundef nonnull align 4 dereferenceable(88)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4sqrtf(float noundef) local_unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12ImageContentC2Eii(ptr noundef nonnull align 8 dereferenceable(80), i32 noundef, i32 noundef) unnamed_addr #4 align 2

declare noundef zeroext i1 @_ZN12ImageContent11interpolateEPS_ffffff(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6Corner6setX_YEff(ptr noundef nonnull align 4 dereferenceable(88), float noundef, float noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK16CornerDescriptor7getTypeEv(ptr noundef nonnull align 8 dereferenceable(116)) local_unnamed_addr #0 align 2

declare void @_ZN6MatrixC1Eiid(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, double noundef) unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_Z14searchDerScaleP12ImageContentP16CornerDescriptor(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z15findScaleRegionP12ImageContentP16CornerDescriptor(ptr noundef %0, ptr noundef nonnull %1) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %3 = tail call noundef float @_ZNK6Corner14getCornerScaleEv(ptr noundef nonnull align 4 dereferenceable(88) %1)
  %4 = tail call noundef float @_ZNK6Corner4getXEv(ptr noundef nonnull align 4 dereferenceable(88) %1)
  %5 = tail call noundef float @_ZNK6Corner4getYEv(ptr noundef nonnull align 4 dereferenceable(88) %1)
  %6 = tail call noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #6
  invoke void @_ZN6MatrixC1Eiid(ptr noundef nonnull align 8 dereferenceable(24) %6, i32 noundef 2, i32 noundef 2, double noundef 0.000000e+00)
          to label %7 unwind label %12

7:                                                ; preds = %2
  %8 = tail call noalias noundef nonnull dereferenceable(80) ptr @_Znwm(i64 noundef 80) #6
  invoke void @_ZN12ImageContentC2Eii(ptr noundef nonnull align 8 dereferenceable(80) %8, i32 noundef 41, i32 noundef 41)
          to label %9 unwind label %14

9:                                                ; preds = %7
  %10 = tail call noundef float @_Z14searchDerScaleP12ImageContentP16CornerDescriptor(ptr noundef %0, ptr noundef nonnull %1)
  %11 = fcmp olt float %10, 1.000000e+00
  br i1 %11, label %35, label %16

12:                                               ; preds = %2
  %13 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %6, i64 noundef 24) #7
  br label %36

14:                                               ; preds = %7
  %15 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %8, i64 noundef 80) #7
  br label %36

16:                                               ; preds = %9
  %17 = fpext float %10 to double
  %18 = fmul double %17, 4.500000e+00
  %19 = tail call double @llvm.rint.f64(double %18)
  %20 = tail call double @llvm.fmuladd.f64(double %19, double 2.000000e+00, double 1.000000e+00)
  %21 = fptosi double %20 to i32
  %22 = sitofp i32 %21 to float
  %23 = fdiv float %22, 4.100000e+01
  %24 = tail call noundef zeroext i1 @_ZN12ImageContent11interpolateEPS_ffffff(ptr noundef nonnull align 8 dereferenceable(80) %8, ptr noundef %0, float noundef %4, float noundef %5, float noundef %23, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef %23)
  %25 = tail call noundef i32 @_ZNK16CornerDescriptor7getTypeEv(ptr noundef nonnull align 8 dereferenceable(116) %1)
  %26 = icmp eq i32 %25, 1
  br i1 %26, label %30, label %27

27:                                               ; preds = %16
  %28 = tail call noundef i32 @_ZNK16CornerDescriptor7getTypeEv(ptr noundef nonnull align 8 dereferenceable(116) %1)
  %29 = icmp eq i32 %28, 2
  br i1 %29, label %30, label %35

30:                                               ; preds = %27, %16
  %31 = fdiv float 0.000000e+00, %23
  %32 = fadd float %4, %31
  %33 = fadd float %5, %31
  tail call void @_ZN6Corner6setX_YEff(ptr noundef nonnull align 4 dereferenceable(88) %1, float noundef %32, float noundef %33)
  %34 = tail call noundef float @_ZSt4sqrtf(float noundef 0.000000e+00)
  br label %35

35:                                               ; preds = %27, %9, %30
  ret i32 0

36:                                               ; preds = %14, %12
  %.pn = phi { ptr, i32 } [ %15, %14 ], [ %13, %12 ]
  resume { ptr, i32 } %.pn
}

attributes #0 = { inlinehint 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 #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nobuiltin allocsize(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 = { nobuiltin 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 #4 = { 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 #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 = { builtin allocsize(0) }
attributes #7 = { builtin 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)"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass