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

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

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

declare void @_ZN6MatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) unnamed_addr #1 align 2

; Function Attrs: nounwind
declare void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

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

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

; Function Attrs: nounwind
declare void @_ZN12ImageContentD1Ev(ptr noundef nonnull align 8 dereferenceable(80)) 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 #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5eigen6MatrixRfS0_(ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #6

declare void @_ZN6MatrixC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z13getAnisotropyP12ImageContentS0_S0_S0_ffR6Matrix(ptr noundef, ptr noundef, ptr noundef, ptr noundef, float noundef, float noundef, ptr noundef nonnull align 8 dereferenceable(24)) #6

; Function Attrs: mustprogress uwtable
define dso_local noundef float @_Z16searchDerivScaleP12ImageContentfP6Matrix(ptr noundef %0, float noundef %1, ptr noundef %2) #6 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca float, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %class.Matrix, align 8
  %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 float, align 4
  %21 = alloca float, align 4
  %22 = alloca float, align 4
  %23 = alloca %class.Matrix, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store float %1, ptr %5, align 4, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = call noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80) %24)
  store i32 %25, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = call noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80) %26)
  store i32 %27, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %28 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 80) #8
  %29 = load i32, ptr %7, align 4, !tbaa !11
  %30 = load i32, ptr %8, align 4, !tbaa !11
  invoke void @_ZN12ImageContentC2Eii(ptr noundef nonnull align 8 dereferenceable(80) %28, i32 noundef %29, i32 noundef %30)
          to label %31 unwind label %54

31:                                               ; preds = %3
  store ptr %28, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %32 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 80) #8
  %33 = load i32, ptr %7, align 4, !tbaa !11
  %34 = load i32, ptr %8, align 4, !tbaa !11
  invoke void @_ZN12ImageContentC2Eii(ptr noundef nonnull align 8 dereferenceable(80) %32, i32 noundef %33, i32 noundef %34)
          to label %35 unwind label %58

35:                                               ; preds = %31
  store ptr %32, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %36 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 80) #8
  %37 = load i32, ptr %7, align 4, !tbaa !11
  %38 = load i32, ptr %8, align 4, !tbaa !11
  invoke void @_ZN12ImageContentC2Eii(ptr noundef nonnull align 8 dereferenceable(80) %36, i32 noundef %37, i32 noundef %38)
          to label %39 unwind label %62

39:                                               ; preds = %35
  store ptr %36, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #7
  call void @_ZN6MatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef 2, i32 noundef 2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store float 0.000000e+00, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store float 0.000000e+00, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %40 = load float, ptr %5, align 4, !tbaa !9
  %41 = fpext float %40 to double
  %42 = fdiv double %41, 2.100000e+00
  %43 = fptrunc double %42 to float
  store float %43, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %44 = load float, ptr %5, align 4, !tbaa !9
  %45 = fpext float %44 to double
  %46 = fdiv double %45, 1.500000e+00
  %47 = fptrunc double %46 to float
  store float %47, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %48 = load float, ptr %19, align 4, !tbaa !9
  store float %48, ptr %22, align 4, !tbaa !9
  br label %49

49:                                               ; preds = %130, %39
  %50 = load float, ptr %22, align 4, !tbaa !9
  %51 = load float, ptr %18, align 4, !tbaa !9
  %52 = fcmp ogt float %50, %51
  br i1 %52, label %66, label %53

53:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %136

54:                                               ; preds = %3
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %10, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %11, align 4
  call void @_ZdlPvm(ptr noundef %28, i64 noundef 80) #9
  br label %152

58:                                               ; preds = %31
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %10, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %11, align 4
  call void @_ZdlPvm(ptr noundef %32, i64 noundef 80) #9
  br label %151

62:                                               ; preds = %35
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %10, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %11, align 4
  call void @_ZdlPvm(ptr noundef %36, i64 noundef 80) #9
  br label %150

66:                                               ; preds = %49
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = load ptr, ptr %12, align 8, !tbaa !5
  %70 = load ptr, ptr %13, align 8, !tbaa !5
  %71 = load float, ptr %22, align 4, !tbaa !9
  %72 = load float, ptr %5, align 4, !tbaa !9
  invoke void @_Z13getAnisotropyP12ImageContentS0_S0_S0_ffR6Matrix(ptr noundef %67, ptr noundef %68, ptr noundef %69, ptr noundef %70, float noundef %71, float noundef %72, ptr noundef nonnull align 8 dereferenceable(24) %14)
          to label %73 unwind label %121

73:                                               ; preds = %66
  invoke void @_ZN6MatrixC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(24) %14)
          to label %74 unwind label %121

74:                                               ; preds = %73
  invoke void @_Z5eigen6MatrixRfS0_(ptr noundef %23, ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %75 unwind label %125

75:                                               ; preds = %74
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #7
  %76 = load float, ptr %21, align 4, !tbaa !9
  %77 = load float, ptr %20, align 4, !tbaa !9
  %78 = fdiv float %76, %77
  store float %78, ptr %15, align 4, !tbaa !9
  %79 = load float, ptr %15, align 4, !tbaa !9
  %80 = load float, ptr %16, align 4, !tbaa !9
  %81 = fcmp ogt float %79, %80
  br i1 %81, label %82, label %129

82:                                               ; preds = %75
  %83 = load float, ptr %15, align 4, !tbaa !9
  store float %83, ptr %16, align 4, !tbaa !9
  %84 = load float, ptr %22, align 4, !tbaa !9
  store float %84, ptr %17, align 4, !tbaa !9
  %85 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef 1, i32 noundef 1)
          to label %86 unwind label %121

86:                                               ; preds = %82
  %87 = load double, ptr %85, align 8, !tbaa !13
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds %class.Matrix, ptr %88, i32 0, i32 1
  %90 = load ptr, ptr %89, align 8, !tbaa !15
  %91 = getelementptr inbounds ptr, ptr %90, i64 1
  %92 = load ptr, ptr %91, align 8, !tbaa !5
  %93 = getelementptr inbounds double, ptr %92, i64 1
  store double %87, ptr %93, align 8, !tbaa !13
  %94 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef 2, i32 noundef 2)
          to label %95 unwind label %121

95:                                               ; preds = %86
  %96 = load double, ptr %94, align 8, !tbaa !13
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = getelementptr inbounds %class.Matrix, ptr %97, i32 0, i32 1
  %99 = load ptr, ptr %98, align 8, !tbaa !15
  %100 = getelementptr inbounds ptr, ptr %99, i64 2
  %101 = load ptr, ptr %100, align 8, !tbaa !5
  %102 = getelementptr inbounds double, ptr %101, i64 2
  store double %96, ptr %102, align 8, !tbaa !13
  %103 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef 2, i32 noundef 1)
          to label %104 unwind label %121

104:                                              ; preds = %95
  %105 = load double, ptr %103, align 8, !tbaa !13
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  %107 = getelementptr inbounds %class.Matrix, ptr %106, i32 0, i32 1
  %108 = load ptr, ptr %107, align 8, !tbaa !15
  %109 = getelementptr inbounds ptr, ptr %108, i64 2
  %110 = load ptr, ptr %109, align 8, !tbaa !5
  %111 = getelementptr inbounds double, ptr %110, i64 1
  store double %105, ptr %111, align 8, !tbaa !13
  %112 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef 1, i32 noundef 2)
          to label %113 unwind label %121

113:                                              ; preds = %104
  %114 = load double, ptr %112, align 8, !tbaa !13
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = getelementptr inbounds %class.Matrix, ptr %115, i32 0, i32 1
  %117 = load ptr, ptr %116, align 8, !tbaa !15
  %118 = getelementptr inbounds ptr, ptr %117, i64 1
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  %120 = getelementptr inbounds double, ptr %119, i64 2
  store double %114, ptr %120, align 8, !tbaa !13
  br label %129

121:                                              ; preds = %104, %95, %86, %82, %73, %66
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %10, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %11, align 4
  br label %135

125:                                              ; preds = %74
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %10, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %11, align 4
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #7
  br label %135

129:                                              ; preds = %113, %75
  br label %130

130:                                              ; preds = %129
  %131 = load float, ptr %22, align 4, !tbaa !9
  %132 = fpext float %131 to double
  %133 = fdiv double %132, 1.100000e+00
  %134 = fptrunc double %133 to float
  store float %134, ptr %22, align 4, !tbaa !9
  br label %49, !llvm.loop !17

135:                                              ; preds = %125, %121
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  br label %150

136:                                              ; preds = %53
  %137 = load ptr, ptr %9, align 8, !tbaa !5
  %138 = icmp eq ptr %137, null
  br i1 %138, label %140, label %139

139:                                              ; preds = %136
  call void @_ZN12ImageContentD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %137) #7
  call void @_ZdlPvm(ptr noundef %137, i64 noundef 80) #9
  br label %140

140:                                              ; preds = %139, %136
  %141 = load ptr, ptr %12, align 8, !tbaa !5
  %142 = icmp eq ptr %141, null
  br i1 %142, label %144, label %143

143:                                              ; preds = %140
  call void @_ZN12ImageContentD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %141) #7
  call void @_ZdlPvm(ptr noundef %141, i64 noundef 80) #9
  br label %144

144:                                              ; preds = %143, %140
  %145 = load ptr, ptr %13, align 8, !tbaa !5
  %146 = icmp eq ptr %145, null
  br i1 %146, label %148, label %147

147:                                              ; preds = %144
  call void @_ZN12ImageContentD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %145) #7
  call void @_ZdlPvm(ptr noundef %145, i64 noundef 80) #9
  br label %148

148:                                              ; preds = %147, %144
  %149 = load float, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  ret float %149

150:                                              ; preds = %135, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %151

151:                                              ; preds = %150, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %152

152:                                              ; preds = %151, %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %153

153:                                              ; preds = %152
  %154 = load ptr, ptr %10, align 8
  %155 = load i32, ptr %11, align 4
  %156 = insertvalue { ptr, i32 } poison, ptr %154, 0
  %157 = insertvalue { ptr, i32 } %156, i32 %155, 1
  resume { ptr, i32 } %157
}

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 = { "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 "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 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 #5 = { 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 #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 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { 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, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!16, !6, i64 8}
!16 = !{!"_ZTS6Matrix", !6, i64 8, !12, i64 16, !12, i64 20}
!17 = distinct !{!17, !18}
!18 = !{!"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"

%class.Matrix = type { ptr, ptr, i32, i32 }

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

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

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

declare void @_ZN6MatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) unnamed_addr #1 align 2

; Function Attrs: nounwind
declare void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

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

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

; Function Attrs: nounwind
declare void @_ZN12ImageContentD1Ev(ptr noundef nonnull align 8 dereferenceable(80)) 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 #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5eigen6MatrixRfS0_(ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

declare void @_ZN6MatrixC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z13getAnisotropyP12ImageContentS0_S0_S0_ffR6Matrix(ptr noundef, ptr noundef, ptr noundef, ptr noundef, float noundef, float noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
define dso_local noundef float @_Z16searchDerivScaleP12ImageContentfP6Matrix(ptr noundef nonnull %0, float noundef %1, ptr nocapture noundef readonly %2) local_unnamed_addr #6 personality ptr @__gxx_personality_v0 {
  %4 = alloca %class.Matrix, align 8
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca %class.Matrix, align 8
  %8 = tail call noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  %9 = tail call noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  %10 = tail call noalias noundef nonnull dereferenceable(80) ptr @_Znwm(i64 noundef 80) #7
  invoke void @_ZN12ImageContentC2Eii(ptr noundef nonnull align 8 dereferenceable(80) %10, i32 noundef %8, i32 noundef %9)
          to label %11 unwind label %22

11:                                               ; preds = %3
  %12 = tail call noalias noundef nonnull dereferenceable(80) ptr @_Znwm(i64 noundef 80) #7
  invoke void @_ZN12ImageContentC2Eii(ptr noundef nonnull align 8 dereferenceable(80) %12, i32 noundef %8, i32 noundef %9)
          to label %13 unwind label %24

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

15:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #8
  call void @_ZN6MatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef 2, i32 noundef 2)
  %16 = fpext float %1 to double
  %17 = fdiv double %16, 2.100000e+00
  %18 = fptrunc double %17 to float
  %19 = fdiv float %1, 1.500000e+00
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  %20 = fcmp ogt float %19, %18
  br i1 %20, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %15
  %21 = getelementptr inbounds i8, ptr %2, i64 8
  br label %28

22:                                               ; preds = %3
  %23 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %10, i64 noundef 80) #9
  br label %71

24:                                               ; preds = %11
  %25 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %12, i64 noundef 80) #9
  br label %71

26:                                               ; preds = %13
  %27 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %14, i64 noundef 80) #9
  br label %71

28:                                               ; preds = %.lr.ph, %65
  %.051 = phi float [ %19, %.lr.ph ], [ %68, %65 ]
  %.03850 = phi float [ 0.000000e+00, %.lr.ph ], [ %.139, %65 ]
  %.04049 = phi float [ 0.000000e+00, %.lr.ph ], [ %.141, %65 ]
  invoke void @_Z13getAnisotropyP12ImageContentS0_S0_S0_ffR6Matrix(ptr noundef nonnull %0, ptr noundef nonnull %10, ptr noundef nonnull %12, ptr noundef nonnull %14, float noundef %.051, float noundef %1, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %29 unwind label %61

29:                                               ; preds = %28
  invoke void @_ZN6MatrixC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %30 unwind label %61

30:                                               ; preds = %29
  invoke void @_Z5eigen6MatrixRfS0_(ptr noundef nonnull %7, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %31 unwind label %63

31:                                               ; preds = %30
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  %32 = load float, ptr %6, align 4, !tbaa !5
  %33 = load float, ptr %5, align 4, !tbaa !5
  %34 = fdiv float %32, %33
  %35 = fcmp ogt float %34, %.04049
  br i1 %35, label %36, label %65

36:                                               ; preds = %31
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef 1, i32 noundef 1)
  %38 = load double, ptr %37, align 8, !tbaa !9
  %39 = load ptr, ptr %21, align 8, !tbaa !11
  %40 = getelementptr inbounds i8, ptr %39, i64 8
  %41 = load ptr, ptr %40, align 8, !tbaa !15
  %42 = getelementptr inbounds i8, ptr %41, i64 8
  store double %38, ptr %42, align 8, !tbaa !9
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef 2, i32 noundef 2)
  %44 = load double, ptr %43, align 8, !tbaa !9
  %45 = load ptr, ptr %21, align 8, !tbaa !11
  %46 = getelementptr inbounds i8, ptr %45, i64 16
  %47 = load ptr, ptr %46, align 8, !tbaa !15
  %48 = getelementptr inbounds i8, ptr %47, i64 16
  store double %44, ptr %48, align 8, !tbaa !9
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef 2, i32 noundef 1)
  %50 = load double, ptr %49, align 8, !tbaa !9
  %51 = load ptr, ptr %21, align 8, !tbaa !11
  %52 = getelementptr inbounds i8, ptr %51, i64 16
  %53 = load ptr, ptr %52, align 8, !tbaa !15
  %54 = getelementptr inbounds i8, ptr %53, i64 8
  store double %50, ptr %54, align 8, !tbaa !9
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef 1, i32 noundef 2)
  %56 = load double, ptr %55, align 8, !tbaa !9
  %57 = load ptr, ptr %21, align 8, !tbaa !11
  %58 = getelementptr inbounds i8, ptr %57, i64 8
  %59 = load ptr, ptr %58, align 8, !tbaa !15
  %60 = getelementptr inbounds i8, ptr %59, i64 16
  store double %56, ptr %60, align 8, !tbaa !9
  br label %65

61:                                               ; preds = %29, %28
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %70

63:                                               ; preds = %30
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  br label %70

65:                                               ; preds = %31, %36
  %.141 = phi float [ %34, %36 ], [ %.04049, %31 ]
  %.139 = phi float [ %.051, %36 ], [ %.03850, %31 ]
  %66 = fpext float %.051 to double
  %67 = fdiv double %66, 1.100000e+00
  %68 = fptrunc double %67 to float
  %69 = fcmp ogt float %68, %18
  br i1 %69, label %28, label %._crit_edge, !llvm.loop !16

70:                                               ; preds = %63, %61
  %.pn = phi { ptr, i32 } [ %64, %63 ], [ %62, %61 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  br label %71

._crit_edge:                                      ; preds = %65, %15
  %.038.lcssa = phi float [ 0.000000e+00, %15 ], [ %.139, %65 ]
  call void @_ZN12ImageContentD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %10) #8
  call void @_ZdlPvm(ptr noundef nonnull %10, i64 noundef 80) #9
  call void @_ZN12ImageContentD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %12) #8
  call void @_ZdlPvm(ptr noundef nonnull %12, i64 noundef 80) #9
  call void @_ZN12ImageContentD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %14) #8
  call void @_ZdlPvm(ptr noundef nonnull %14, i64 noundef 80) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  ret float %.038.lcssa

71:                                               ; preds = %24, %70, %26, %22
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %23, %22 ], [ %25, %24 ], [ %.pn, %70 ], [ %27, %26 ]
  resume { ptr, i32 } %.pn.pn.pn.pn
}

attributes #0 = { mustprogress 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 = { "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 "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 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 #5 = { 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 #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 = { builtin allocsize(0) }
attributes #8 = { nounwind }
attributes #9 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"_ZTS6Matrix", !13, i64 8, !14, i64 16, !14, i64 20}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!13, !13, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


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