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

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

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80)) #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: mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4rintf(float noundef) #2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6Corner7getMi22Ev(ptr noundef nonnull align 4 dereferenceable(88)) #1 align 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
define dso_local void @_Z12computeAngleP12ImageContentP16CornerDescriptor(ptr noundef %0, ptr noundef %1) #6 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca float, align 4
  %22 = alloca float, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = call noundef float @_ZNK6Corner4getXEv(ptr noundef nonnull align 4 dereferenceable(88) %26)
  store float %27, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = call noundef float @_ZNK6Corner4getYEv(ptr noundef nonnull align 4 dereferenceable(88) %28)
  store float %29, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = call noundef float @_ZNK6Corner14getCornerScaleEv(ptr noundef nonnull align 4 dereferenceable(88) %30)
  store float %31, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store float 1.000000e+01, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %32 = load float, ptr %7, align 4, !tbaa !9
  %33 = fmul float 2.000000e+00, %32
  %34 = load float, ptr %8, align 4, !tbaa !9
  %35 = fdiv float %33, %34
  store float %35, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %36 = load float, ptr %8, align 4, !tbaa !9
  %37 = fmul float 3.000000e+00, %36
  %38 = call noundef float @_ZSt4rintf(float noundef %37)
  %39 = fptosi float %38 to i32
  %40 = mul nsw i32 2, %39
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %42 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 80) #9
  %43 = load i32, ptr %10, align 4, !tbaa !11
  %44 = load i32, ptr %10, align 4, !tbaa !11
  invoke void @_ZN12ImageContentC2Eii(ptr noundef nonnull align 8 dereferenceable(80) %42, i32 noundef %43, i32 noundef %44)
          to label %45 unwind label %103

45:                                               ; preds = %2
  store ptr %42, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %46 = load float, ptr %9, align 4, !tbaa !9
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = call noundef float @_ZNK6Corner7getMi11Ev(ptr noundef nonnull align 4 dereferenceable(88) %47)
  %49 = fmul float %46, %48
  store float %49, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %50 = load float, ptr %9, align 4, !tbaa !9
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = call noundef float @_ZNK6Corner7getMi12Ev(ptr noundef nonnull align 4 dereferenceable(88) %51)
  %53 = fmul float %50, %52
  store float %53, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %54 = load float, ptr %9, align 4, !tbaa !9
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = call noundef float @_ZNK6Corner7getMi22Ev(ptr noundef nonnull align 4 dereferenceable(88) %55)
  %57 = fmul float %54, %56
  store float %57, ptr %16, align 4, !tbaa !9
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = load float, ptr %5, align 4, !tbaa !9
  %61 = load float, ptr %6, align 4, !tbaa !9
  %62 = load float, ptr %14, align 4, !tbaa !9
  %63 = load float, ptr %15, align 4, !tbaa !9
  %64 = load float, ptr %15, align 4, !tbaa !9
  %65 = load float, ptr %16, align 4, !tbaa !9
  %66 = call noundef zeroext i1 @_ZN12ImageContent11interpolateEPS_ffffff(ptr noundef nonnull align 8 dereferenceable(80) %58, ptr noundef %59, float noundef %60, float noundef %61, float noundef %62, float noundef %63, float noundef %64, float noundef %65)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %67 = load ptr, ptr %11, align 8, !tbaa !5
  %68 = call noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80) %67)
  %69 = lshr i32 %68, 1
  store i32 %69, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %70 = load ptr, ptr %11, align 8, !tbaa !5
  %71 = call noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80) %70)
  %72 = lshr i32 %71, 1
  store i32 %72, ptr %18, align 4, !tbaa !11
  %73 = load ptr, ptr %11, align 8, !tbaa !5
  %74 = load i32, ptr %17, align 4, !tbaa !11
  %75 = load i32, ptr %18, align 4, !tbaa !11
  %76 = load i32, ptr %17, align 4, !tbaa !11
  %77 = sitofp i32 %76 to float
  call void @_Z9normalizeP12ImageContentiif(ptr noundef %73, i32 noundef %74, i32 noundef %75, float noundef %77)
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %78 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 80) #9
  %79 = load i32, ptr %10, align 4, !tbaa !11
  %80 = load i32, ptr %10, align 4, !tbaa !11
  invoke void @_ZN12ImageContentC2Eii(ptr noundef nonnull align 8 dereferenceable(80) %78, i32 noundef %79, i32 noundef %80)
          to label %81 unwind label %107

81:                                               ; preds = %45
  store ptr %78, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %82 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 80) #9
  %83 = load i32, ptr %10, align 4, !tbaa !11
  %84 = load i32, ptr %10, align 4, !tbaa !11
  invoke void @_ZN12ImageContentC2Eii(ptr noundef nonnull align 8 dereferenceable(80) %82, i32 noundef %83, i32 noundef %84)
          to label %85 unwind label %111

85:                                               ; preds = %81
  store ptr %82, ptr %20, align 8, !tbaa !5
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  %87 = load ptr, ptr %19, align 8, !tbaa !5
  %88 = load float, ptr %8, align 4, !tbaa !9
  %89 = fpext float %88 to double
  %90 = fdiv double %89, 1.800000e+00
  %91 = fptrunc double %90 to float
  call void @_Z2dXP12ImageContentS0_f(ptr noundef %86, ptr noundef %87, float noundef %91)
  %92 = load ptr, ptr %11, align 8, !tbaa !5
  %93 = load ptr, ptr %20, align 8, !tbaa !5
  %94 = load float, ptr %8, align 4, !tbaa !9
  %95 = fpext float %94 to double
  %96 = fdiv double %95, 1.800000e+00
  %97 = fptrunc double %96 to float
  call void @_Z2dYP12ImageContentS0_f(ptr noundef %92, ptr noundef %93, float noundef %97)
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 0, ptr %23, align 4, !tbaa !11
  br label %98

98:                                               ; preds = %161, %85
  %99 = load i32, ptr %23, align 4, !tbaa !11
  %100 = load i32, ptr %10, align 4, !tbaa !11
  %101 = icmp slt i32 %99, %100
  br i1 %101, label %115, label %102

102:                                              ; preds = %98
  store i32 2, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %164

103:                                              ; preds = %2
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %12, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %13, align 4
  call void @_ZdlPvm(ptr noundef %42, i64 noundef 80) #10
  br label %192

107:                                              ; preds = %45
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %12, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %13, align 4
  call void @_ZdlPvm(ptr noundef %78, i64 noundef 80) #10
  br label %191

111:                                              ; preds = %81
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %12, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %13, align 4
  call void @_ZdlPvm(ptr noundef %82, i64 noundef 80) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %191

115:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  store i32 0, ptr %25, align 4, !tbaa !11
  br label %116

116:                                              ; preds = %157, %115
  %117 = load i32, ptr %25, align 4, !tbaa !11
  %118 = load i32, ptr %10, align 4, !tbaa !11
  %119 = icmp slt i32 %117, %118
  br i1 %119, label %121, label %120

120:                                              ; preds = %116
  store i32 5, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %160

121:                                              ; preds = %116
  %122 = load ptr, ptr %19, align 8, !tbaa !5
  %123 = getelementptr inbounds %class.ImageContent, ptr %122, i32 0, i32 4
  %124 = load ptr, ptr %123, align 8, !tbaa !13
  %125 = load i32, ptr %23, align 4, !tbaa !11
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds ptr, ptr %124, i64 %126
  %128 = load ptr, ptr %127, align 8, !tbaa !5
  %129 = load i32, ptr %25, align 4, !tbaa !11
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds float, ptr %128, i64 %130
  %132 = load float, ptr %131, align 4, !tbaa !9
  store float %132, ptr %21, align 4, !tbaa !9
  %133 = load ptr, ptr %20, align 8, !tbaa !5
  %134 = getelementptr inbounds %class.ImageContent, ptr %133, i32 0, i32 4
  %135 = load ptr, ptr %134, align 8, !tbaa !13
  %136 = load i32, ptr %23, align 4, !tbaa !11
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds ptr, ptr %135, i64 %137
  %139 = load ptr, ptr %138, align 8, !tbaa !5
  %140 = load i32, ptr %25, align 4, !tbaa !11
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds float, ptr %139, i64 %141
  %143 = load float, ptr %142, align 4, !tbaa !9
  store float %143, ptr %22, align 4, !tbaa !9
  %144 = load float, ptr %22, align 4, !tbaa !9
  %145 = load float, ptr %21, align 4, !tbaa !9
  %146 = call noundef float @_ZSt5atan2ff(float noundef %144, float noundef %145)
  %147 = load ptr, ptr %11, align 8, !tbaa !5
  %148 = getelementptr inbounds %class.ImageContent, ptr %147, i32 0, i32 4
  %149 = load ptr, ptr %148, align 8, !tbaa !13
  %150 = load i32, ptr %23, align 4, !tbaa !11
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds ptr, ptr %149, i64 %151
  %153 = load ptr, ptr %152, align 8, !tbaa !5
  %154 = load i32, ptr %25, align 4, !tbaa !11
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds float, ptr %153, i64 %155
  store float %146, ptr %156, align 4, !tbaa !9
  br label %157

157:                                              ; preds = %121
  %158 = load i32, ptr %25, align 4, !tbaa !11
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %25, align 4, !tbaa !11
  br label %116, !llvm.loop !15

160:                                              ; preds = %120
  br label %161

161:                                              ; preds = %160
  %162 = load i32, ptr %23, align 4, !tbaa !11
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %23, align 4, !tbaa !11
  br label %98, !llvm.loop !17

164:                                              ; preds = %102
  %165 = load ptr, ptr %19, align 8, !tbaa !5
  %166 = icmp eq ptr %165, null
  br i1 %166, label %168, label %167

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

168:                                              ; preds = %167, %164
  %169 = load ptr, ptr %20, align 8, !tbaa !5
  %170 = icmp eq ptr %169, null
  br i1 %170, label %172, label %171

171:                                              ; preds = %168
  call void @_ZN12ImageContentD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %169) #8
  call void @_ZdlPvm(ptr noundef %169, i64 noundef 80) #10
  br label %172

172:                                              ; preds = %171, %168
  %173 = load ptr, ptr %4, align 8, !tbaa !5
  %174 = load i32, ptr %17, align 4, !tbaa !11
  %175 = sitofp i32 %174 to float
  %176 = load i32, ptr %18, align 4, !tbaa !11
  %177 = sitofp i32 %176 to float
  call void @_ZN6Corner6setX_YEff(ptr noundef nonnull align 4 dereferenceable(88) %173, float noundef %175, float noundef %177)
  %178 = load ptr, ptr %4, align 8, !tbaa !5
  %179 = load float, ptr %8, align 4, !tbaa !9
  call void @_ZN6Corner14setCornerScaleEf(ptr noundef nonnull align 4 dereferenceable(88) %178, float noundef %179)
  %180 = load ptr, ptr %4, align 8, !tbaa !5
  %181 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN6Corner12computeAngleEP12ImageContent(ptr noundef nonnull align 4 dereferenceable(88) %180, ptr noundef %181)
  %182 = load ptr, ptr %4, align 8, !tbaa !5
  %183 = load float, ptr %7, align 4, !tbaa !9
  call void @_ZN6Corner14setCornerScaleEf(ptr noundef nonnull align 4 dereferenceable(88) %182, float noundef %183)
  %184 = load ptr, ptr %4, align 8, !tbaa !5
  %185 = load float, ptr %5, align 4, !tbaa !9
  %186 = load float, ptr %6, align 4, !tbaa !9
  call void @_ZN6Corner6setX_YEff(ptr noundef nonnull align 4 dereferenceable(88) %184, float noundef %185, float noundef %186)
  %187 = load ptr, ptr %11, align 8, !tbaa !5
  %188 = icmp eq ptr %187, null
  br i1 %188, label %190, label %189

189:                                              ; preds = %172
  call void @_ZN12ImageContentD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %187) #8
  call void @_ZdlPvm(ptr noundef %187, i64 noundef 80) #10
  br label %190

190:                                              ; preds = %189, %172
  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 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, 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 8, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  ret void

191:                                              ; preds = %111, %107
  call void @llvm.lifetime.end.p0(i64 8, 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
  br label %192

192:                                              ; preds = %191, %103
  call void @llvm.lifetime.end.p0(i64 8, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %193

193:                                              ; preds = %192
  %194 = load ptr, ptr %12, align 8
  %195 = load i32, ptr %13, align 4
  %196 = insertvalue { ptr, i32 } poison, ptr %194, 0
  %197 = insertvalue { ptr, i32 } %196, i32 %195, 1
  resume { ptr, i32 } %197
}

; 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

declare void @_Z9normalizeP12ImageContentiif(ptr noundef, i32 noundef, i32 noundef, float noundef) #7

declare void @_Z2dXP12ImageContentS0_f(ptr noundef, ptr noundef, float noundef) #7

declare void @_Z2dYP12ImageContentS0_f(ptr noundef, ptr noundef, float noundef) #7

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

; 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

declare void @_ZN6Corner12computeAngleEP12ImageContent(ptr noundef nonnull align 4 dereferenceable(88), ptr noundef) #7

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 = { 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 #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 = !{!14, !6, i64 16}
!14 = !{!"_ZTS12ImageContent", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


; 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 i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80)) 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: mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4rintf(float noundef) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

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

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

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

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6Corner14setCornerScaleEf(ptr noundef nonnull align 4 dereferenceable(88), float noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z12computeAngleP12ImageContentP16CornerDescriptor(ptr noundef %0, ptr noundef nonnull %1) local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %3 = tail call noundef float @_ZNK6Corner4getXEv(ptr noundef nonnull align 4 dereferenceable(88) %1)
  %4 = tail call noundef float @_ZNK6Corner4getYEv(ptr noundef nonnull align 4 dereferenceable(88) %1)
  %5 = tail call noundef float @_ZNK6Corner14getCornerScaleEv(ptr noundef nonnull align 4 dereferenceable(88) %1)
  %6 = tail call noundef float @_ZSt4rintf(float noundef 3.000000e+01)
  %7 = fptosi float %6 to i32
  %8 = shl i32 %7, 1
  %9 = or disjoint i32 %8, 1
  %10 = tail call noalias noundef nonnull dereferenceable(80) ptr @_Znwm(i64 noundef 80) #8
  invoke void @_ZN12ImageContentC2Eii(ptr noundef nonnull align 8 dereferenceable(80) %10, i32 noundef %9, i32 noundef %9)
          to label %11 unwind label %34

11:                                               ; preds = %2
  %12 = fmul float %5, 2.000000e+00
  %13 = fdiv float %12, 1.000000e+01
  %14 = tail call noundef float @_ZNK6Corner7getMi11Ev(ptr noundef nonnull align 4 dereferenceable(88) %1)
  %15 = fmul float %13, %14
  %16 = tail call noundef float @_ZNK6Corner7getMi12Ev(ptr noundef nonnull align 4 dereferenceable(88) %1)
  %17 = fmul float %13, %16
  %18 = tail call noundef float @_ZNK6Corner7getMi22Ev(ptr noundef nonnull align 4 dereferenceable(88) %1)
  %19 = fmul float %13, %18
  %20 = tail call noundef zeroext i1 @_ZN12ImageContent11interpolateEPS_ffffff(ptr noundef nonnull align 8 dereferenceable(80) %10, ptr noundef %0, float noundef %3, float noundef %4, float noundef %15, float noundef %17, float noundef %17, float noundef %19)
  %21 = tail call noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80) %10)
  %22 = lshr i32 %21, 1
  %23 = tail call noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80) %10)
  %24 = lshr i32 %23, 1
  %25 = uitofp nneg i32 %22 to float
  tail call void @_Z9normalizeP12ImageContentiif(ptr noundef nonnull %10, i32 noundef %22, i32 noundef %24, float noundef %25)
  %26 = tail call noalias noundef nonnull dereferenceable(80) ptr @_Znwm(i64 noundef 80) #8
  invoke void @_ZN12ImageContentC2Eii(ptr noundef nonnull align 8 dereferenceable(80) %26, i32 noundef %9, i32 noundef %9)
          to label %27 unwind label %36

27:                                               ; preds = %11
  %28 = tail call noalias noundef nonnull dereferenceable(80) ptr @_Znwm(i64 noundef 80) #8
  invoke void @_ZN12ImageContentC2Eii(ptr noundef nonnull align 8 dereferenceable(80) %28, i32 noundef %9, i32 noundef %9)
          to label %29 unwind label %38

29:                                               ; preds = %27
  tail call void @_Z2dXP12ImageContentS0_f(ptr noundef nonnull %10, ptr noundef nonnull %26, float noundef 0x401638E380000000)
  tail call void @_Z2dYP12ImageContentS0_f(ptr noundef nonnull %10, ptr noundef nonnull %28, float noundef 0x401638E380000000)
  %.not81 = icmp slt i32 %7, 0
  br i1 %.not81, label %._crit_edge83, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %29
  %30 = getelementptr inbounds i8, ptr %26, i64 16
  %31 = getelementptr inbounds i8, ptr %28, i64 16
  %32 = getelementptr inbounds i8, ptr %10, i64 16
  %smax = tail call i32 @llvm.smax.i32(i32 %8, i32 0)
  %33 = or disjoint i32 %smax, 1
  %wide.trip.count88 = zext nneg i32 %33 to i64
  br label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %indvars.iv85 = phi i64 [ 0, %.preheader.lr.ph ], [ %indvars.iv.next86, %._crit_edge ]
  br label %40

34:                                               ; preds = %2
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %57

36:                                               ; preds = %11
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %57

38:                                               ; preds = %27
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %57

._crit_edge:                                      ; preds = %40
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %exitcond89.not = icmp eq i64 %indvars.iv.next86, %wide.trip.count88
  br i1 %exitcond89.not, label %._crit_edge83, label %.preheader, !llvm.loop !5

40:                                               ; preds = %.preheader, %40
  %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next, %40 ]
  %41 = load ptr, ptr %30, align 8, !tbaa !7
  %42 = getelementptr inbounds ptr, ptr %41, i64 %indvars.iv85
  %43 = load ptr, ptr %42, align 8, !tbaa !13
  %44 = getelementptr inbounds float, ptr %43, i64 %indvars.iv
  %45 = load float, ptr %44, align 4, !tbaa !14
  %46 = load ptr, ptr %31, align 8, !tbaa !7
  %47 = getelementptr inbounds ptr, ptr %46, i64 %indvars.iv85
  %48 = load ptr, ptr %47, align 8, !tbaa !13
  %49 = getelementptr inbounds float, ptr %48, i64 %indvars.iv
  %50 = load float, ptr %49, align 4, !tbaa !14
  %51 = tail call noundef float @_ZSt5atan2ff(float noundef %50, float noundef %45)
  %52 = load ptr, ptr %32, align 8, !tbaa !7
  %53 = getelementptr inbounds ptr, ptr %52, i64 %indvars.iv85
  %54 = load ptr, ptr %53, align 8, !tbaa !13
  %55 = getelementptr inbounds float, ptr %54, i64 %indvars.iv
  store float %51, ptr %55, align 4, !tbaa !14
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count88
  br i1 %exitcond.not, label %._crit_edge, label %40, !llvm.loop !16

._crit_edge83:                                    ; preds = %._crit_edge, %29
  tail call void @_ZN12ImageContentD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %26) #9
  tail call void @_ZdlPvm(ptr noundef nonnull %26, i64 noundef 80) #10
  tail call void @_ZN12ImageContentD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %28) #9
  tail call void @_ZdlPvm(ptr noundef nonnull %28, i64 noundef 80) #10
  %56 = uitofp nneg i32 %24 to float
  tail call void @_ZN6Corner6setX_YEff(ptr noundef nonnull align 4 dereferenceable(88) %1, float noundef %25, float noundef %56)
  tail call void @_ZN6Corner14setCornerScaleEf(ptr noundef nonnull align 4 dereferenceable(88) %1, float noundef 1.000000e+01)
  tail call void @_ZN6Corner12computeAngleEP12ImageContent(ptr noundef nonnull align 4 dereferenceable(88) %1, ptr noundef nonnull %10)
  tail call void @_ZN6Corner14setCornerScaleEf(ptr noundef nonnull align 4 dereferenceable(88) %1, float noundef %5)
  tail call void @_ZN6Corner6setX_YEff(ptr noundef nonnull align 4 dereferenceable(88) %1, float noundef %3, float noundef %4)
  tail call void @_ZN12ImageContentD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %10) #9
  tail call void @_ZdlPvm(ptr noundef nonnull %10, i64 noundef 80) #10
  ret void

57:                                               ; preds = %36, %38, %34
  %.sink = phi ptr [ %26, %36 ], [ %28, %38 ], [ %10, %34 ]
  %.pn.pn = phi { ptr, i32 } [ %37, %36 ], [ %39, %38 ], [ %35, %34 ]
  tail call void @_ZdlPvm(ptr noundef nonnull %.sink, i64 noundef 80) #10
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12ImageContentC2Eii(ptr noundef nonnull align 8 dereferenceable(80), i32 noundef, i32 noundef) unnamed_addr #5 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 #6

declare void @_Z9normalizeP12ImageContentiif(ptr noundef, i32 noundef, i32 noundef, float noundef) local_unnamed_addr #6

declare void @_Z2dXP12ImageContentS0_f(ptr noundef, ptr noundef, float noundef) local_unnamed_addr #6

declare void @_Z2dYP12ImageContentS0_f(ptr noundef, ptr noundef, float noundef) local_unnamed_addr #6

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

; 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

declare void @_ZN6Corner12computeAngleEP12ImageContent(ptr noundef nonnull align 4 dereferenceable(88), ptr noundef) local_unnamed_addr #6

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

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 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 = { 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 = { 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 = { 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 #6 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { nounwind }
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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !12, i64 16}
!8 = !{!"_ZTS12ImageContent", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"any pointer", !10, i64 0}
!13 = !{!12, !12, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !10, i64 0}
!16 = distinct !{!16, !6}


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