; LLVM IR from ox-vgg/vise :: src/search_engine/relja_retrival/external/KMCode_relja/homography (homography)

; 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: 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 @_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 speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #2

; 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 @_ZNK6Corner8getAngleEv(ptr noundef nonnull align 4 dereferenceable(88)) #1 align 2

; 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 @_ZNK6Corner7getMi21Ev(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: 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3sinf(float noundef) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z12getNormPointP12ImageContentP16CornerDescriptorS0_f(ptr noundef %0, ptr noundef %1, ptr noundef %2, float noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, 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
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store float %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = call noundef float @_ZNK6Corner8getAngleEv(ptr noundef nonnull align 4 dereferenceable(88) %19)
  store float %20, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %21 = load float, ptr %9, align 4, !tbaa !9
  %22 = fneg float %21
  %23 = call noundef float @_ZSt3cosf(float noundef %22)
  store float %23, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %24 = load float, ptr %9, align 4, !tbaa !9
  %25 = fneg float %24
  %26 = call noundef float @_ZSt3sinf(float noundef %25)
  store float %26, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = call noundef float @_ZNK6Corner14getCornerScaleEv(ptr noundef nonnull align 4 dereferenceable(88) %27)
  %29 = load float, ptr %8, align 4, !tbaa !9
  %30 = fdiv float %28, %29
  store float %30, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %31 = load float, ptr %12, align 4, !tbaa !9
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = call noundef float @_ZNK6Corner7getMi11Ev(ptr noundef nonnull align 4 dereferenceable(88) %32)
  %34 = load float, ptr %10, align 4, !tbaa !9
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = call noundef float @_ZNK6Corner7getMi12Ev(ptr noundef nonnull align 4 dereferenceable(88) %35)
  %37 = load float, ptr %11, align 4, !tbaa !9
  %38 = fmul float %36, %37
  %39 = fneg float %38
  %40 = call float @llvm.fmuladd.f32(float %33, float %34, float %39)
  %41 = fmul float %31, %40
  store float %41, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %42 = load float, ptr %12, align 4, !tbaa !9
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = call noundef float @_ZNK6Corner7getMi11Ev(ptr noundef nonnull align 4 dereferenceable(88) %43)
  %45 = load float, ptr %11, align 4, !tbaa !9
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = call noundef float @_ZNK6Corner7getMi12Ev(ptr noundef nonnull align 4 dereferenceable(88) %46)
  %48 = load float, ptr %10, align 4, !tbaa !9
  %49 = fmul float %47, %48
  %50 = call float @llvm.fmuladd.f32(float %44, float %45, float %49)
  %51 = fmul float %42, %50
  store float %51, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %52 = load float, ptr %12, align 4, !tbaa !9
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = call noundef float @_ZNK6Corner7getMi21Ev(ptr noundef nonnull align 4 dereferenceable(88) %53)
  %55 = load float, ptr %10, align 4, !tbaa !9
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = call noundef float @_ZNK6Corner7getMi22Ev(ptr noundef nonnull align 4 dereferenceable(88) %56)
  %58 = load float, ptr %11, align 4, !tbaa !9
  %59 = fmul float %57, %58
  %60 = fneg float %59
  %61 = call float @llvm.fmuladd.f32(float %54, float %55, float %60)
  %62 = fmul float %52, %61
  store float %62, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %63 = load float, ptr %12, align 4, !tbaa !9
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = call noundef float @_ZNK6Corner7getMi21Ev(ptr noundef nonnull align 4 dereferenceable(88) %64)
  %66 = load float, ptr %11, align 4, !tbaa !9
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = call noundef float @_ZNK6Corner7getMi22Ev(ptr noundef nonnull align 4 dereferenceable(88) %67)
  %69 = load float, ptr %10, align 4, !tbaa !9
  %70 = fmul float %68, %69
  %71 = call float @llvm.fmuladd.f32(float %65, float %66, float %70)
  %72 = fmul float %63, %71
  store float %72, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = call noundef float @_ZNK6Corner4getXEv(ptr noundef nonnull align 4 dereferenceable(88) %73)
  store float %74, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = call noundef float @_ZNK6Corner4getYEv(ptr noundef nonnull align 4 dereferenceable(88) %75)
  store float %76, ptr %18, align 4, !tbaa !9
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = load float, ptr %17, align 4, !tbaa !9
  %80 = load float, ptr %18, align 4, !tbaa !9
  %81 = load float, ptr %13, align 4, !tbaa !9
  %82 = load float, ptr %14, align 4, !tbaa !9
  %83 = load float, ptr %15, align 4, !tbaa !9
  %84 = load float, ptr %16, align 4, !tbaa !9
  %85 = call noundef zeroext i1 @_ZN12ImageContent11interpolateEPS_ffffff(ptr noundef nonnull align 8 dereferenceable(80) %77, ptr noundef %78, float noundef %79, float noundef %80, float noundef %81, float noundef %82, float noundef %83, float noundef %84)
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = call noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80) %86)
  %88 = lshr i32 %87, 1
  %89 = uitofp i32 %88 to float
  store float %89, ptr %17, align 4, !tbaa !9
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = call noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80) %90)
  %92 = lshr i32 %91, 1
  %93 = uitofp i32 %92 to float
  store float %93, ptr %18, align 4, !tbaa !9
  %94 = load ptr, ptr %7, align 8, !tbaa !5
  %95 = load float, ptr %17, align 4, !tbaa !9
  %96 = fptosi float %95 to i32
  %97 = load float, ptr %18, align 4, !tbaa !9
  %98 = fptosi float %97 to i32
  %99 = load float, ptr %17, align 4, !tbaa !9
  call void @_Z9normalizeP12ImageContentiif(ptr noundef %94, i32 noundef %96, i32 noundef %98, float noundef %99)
  call void @llvm.lifetime.end.p0(i64 4, 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 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  ret void
}

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) #4

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

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 = { 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 #4 = { "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 }

!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}


; 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: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #1

; 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 @_ZNK6Corner8getAngleEv(ptr noundef nonnull align 4 dereferenceable(88)) local_unnamed_addr #0 align 2

; 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 @_ZNK6Corner7getMi21Ev(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: 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 @_ZSt3sinf(float noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z12getNormPointP12ImageContentP16CornerDescriptorS0_f(ptr noundef %0, ptr noundef nonnull %1, ptr noundef %2, float noundef %3) local_unnamed_addr #2 {
  %5 = tail call noundef float @_ZNK6Corner8getAngleEv(ptr noundef nonnull align 4 dereferenceable(88) %1)
  %6 = fneg float %5
  %7 = tail call noundef float @_ZSt3cosf(float noundef %6)
  %8 = tail call noundef float @_ZSt3sinf(float noundef %6)
  %9 = tail call noundef float @_ZNK6Corner14getCornerScaleEv(ptr noundef nonnull align 4 dereferenceable(88) %1)
  %10 = fdiv float %9, %3
  %11 = tail call noundef float @_ZNK6Corner7getMi11Ev(ptr noundef nonnull align 4 dereferenceable(88) %1)
  %12 = tail call noundef float @_ZNK6Corner7getMi12Ev(ptr noundef nonnull align 4 dereferenceable(88) %1)
  %13 = fneg float %12
  %14 = fmul float %8, %13
  %15 = tail call float @llvm.fmuladd.f32(float %11, float %7, float %14)
  %16 = fmul float %10, %15
  %17 = tail call noundef float @_ZNK6Corner7getMi11Ev(ptr noundef nonnull align 4 dereferenceable(88) %1)
  %18 = tail call noundef float @_ZNK6Corner7getMi12Ev(ptr noundef nonnull align 4 dereferenceable(88) %1)
  %19 = fmul float %7, %18
  %20 = tail call float @llvm.fmuladd.f32(float %17, float %8, float %19)
  %21 = fmul float %10, %20
  %22 = tail call noundef float @_ZNK6Corner7getMi21Ev(ptr noundef nonnull align 4 dereferenceable(88) %1)
  %23 = tail call noundef float @_ZNK6Corner7getMi22Ev(ptr noundef nonnull align 4 dereferenceable(88) %1)
  %24 = fneg float %23
  %25 = fmul float %8, %24
  %26 = tail call float @llvm.fmuladd.f32(float %22, float %7, float %25)
  %27 = fmul float %10, %26
  %28 = tail call noundef float @_ZNK6Corner7getMi21Ev(ptr noundef nonnull align 4 dereferenceable(88) %1)
  %29 = tail call noundef float @_ZNK6Corner7getMi22Ev(ptr noundef nonnull align 4 dereferenceable(88) %1)
  %30 = fmul float %7, %29
  %31 = tail call float @llvm.fmuladd.f32(float %28, float %8, float %30)
  %32 = fmul float %10, %31
  %33 = tail call noundef float @_ZNK6Corner4getXEv(ptr noundef nonnull align 4 dereferenceable(88) %1)
  %34 = tail call noundef float @_ZNK6Corner4getYEv(ptr noundef nonnull align 4 dereferenceable(88) %1)
  %35 = tail call noundef zeroext i1 @_ZN12ImageContent11interpolateEPS_ffffff(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef %0, float noundef %33, float noundef %34, float noundef %16, float noundef %21, float noundef %27, float noundef %32)
  %36 = tail call noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  %37 = lshr i32 %36, 1
  %38 = uitofp nneg i32 %37 to float
  %39 = tail call noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  %40 = lshr i32 %39, 1
  %41 = uitofp nneg i32 %40 to float
  %42 = fptosi float %38 to i32
  %43 = fptosi float %41 to i32
  tail call void @_Z9normalizeP12ImageContentiif(ptr noundef nonnull %2, i32 noundef %42, i32 noundef %43, float noundef %38)
  ret void
}

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 #3

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

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 = { 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 #3 = { "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" }

!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: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,TailCallElimPass