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

; 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 }
%class.CornerDescriptor = type <{ %class.Corner, ptr, i32, float, i64, i32, [4 x i8] }>
%class.Corner = type { i32, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, i32, i32, float, i32, i32 }

@_ZL4avgs = external hidden global [3042 x float], align 16
@_ZL4eigs = external hidden global [36 x [3042 x float]], align 16

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7NormvecPfj(ptr noundef, i32 noundef) #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13PcaDescriptor17computeComponentsEP12ImageContent(ptr noundef nonnull align 8 dereferenceable(116) %0, ptr noundef %1) #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %16 = load ptr, ptr %3, align 8
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %20

19:                                               ; preds = %2
  br label %186

20:                                               ; preds = %2
  call void @_ZN16CornerDescriptor8allocVecEi(ptr noundef nonnull align 8 dereferenceable(116) %16, i32 noundef 36)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %21 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 80) #9
  invoke void @_ZN12ImageContentC2Eii(ptr noundef nonnull align 8 dereferenceable(80) %21, i32 noundef 41, i32 noundef 41)
          to label %22 unwind label %42

22:                                               ; preds = %20
  store ptr %21, ptr %5, align 8, !tbaa !5
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = call noundef zeroext i1 @_ZN6Corner15normalizeAffineEP12ImageContentS1_(ptr noundef nonnull align 4 dereferenceable(88) %16, ptr noundef %23, ptr noundef %24)
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = call noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80) %27)
  %29 = lshr i32 %28, 1
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = call noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80) %30)
  %32 = lshr i32 %31, 1
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = call noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80) %33)
  %35 = lshr i32 %34, 1
  %36 = uitofp i32 %35 to float
  call void @_Z9normalizeP12ImageContentiif(ptr noundef %26, i32 noundef %29, i32 noundef %32, float noundef %36)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %37 = call noalias noundef nonnull ptr @_Znam(i64 noundef 12168) #9
  store ptr %37, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, 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 !9
  br label %38

38:                                               ; preds = %116, %22
  %39 = load i32, ptr %10, align 4, !tbaa !9
  %40 = icmp slt i32 %39, 40
  br i1 %40, label %46, label %41

41:                                               ; preds = %38
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %119

42:                                               ; preds = %20
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %6, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %7, align 4
  call void @_ZdlPvm(ptr noundef %21, i64 noundef 80) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %187

46:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 1, ptr %12, align 4, !tbaa !9
  br label %47

47:                                               ; preds = %112, %46
  %48 = load i32, ptr %12, align 4, !tbaa !9
  %49 = icmp slt i32 %48, 40
  br i1 %49, label %51, label %50

50:                                               ; preds = %47
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %115

51:                                               ; preds = %47
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = getelementptr inbounds %class.ImageContent, ptr %52, i32 0, i32 4
  %54 = load ptr, ptr %53, align 8, !tbaa !11
  %55 = load i32, ptr %10, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds ptr, ptr %54, i64 %56
  %58 = load ptr, ptr %57, align 8, !tbaa !5
  %59 = load i32, ptr %12, align 4, !tbaa !9
  %60 = add nsw i32 %59, 1
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds float, ptr %58, i64 %61
  %63 = load float, ptr %62, align 4, !tbaa !13
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = getelementptr inbounds %class.ImageContent, ptr %64, i32 0, i32 4
  %66 = load ptr, ptr %65, align 8, !tbaa !11
  %67 = load i32, ptr %10, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds ptr, ptr %66, i64 %68
  %70 = load ptr, ptr %69, align 8, !tbaa !5
  %71 = load i32, ptr %12, align 4, !tbaa !9
  %72 = sub nsw i32 %71, 1
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds float, ptr %70, i64 %73
  %75 = load float, ptr %74, align 4, !tbaa !13
  %76 = fsub float %63, %75
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = load i32, ptr %9, align 4, !tbaa !9
  %79 = add i32 %78, 1
  store i32 %79, ptr %9, align 4, !tbaa !9
  %80 = zext i32 %78 to i64
  %81 = getelementptr inbounds float, ptr %77, i64 %80
  store float %76, ptr %81, align 4, !tbaa !13
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds %class.ImageContent, ptr %82, i32 0, i32 4
  %84 = load ptr, ptr %83, align 8, !tbaa !11
  %85 = load i32, ptr %10, align 4, !tbaa !9
  %86 = add nsw i32 %85, 1
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds ptr, ptr %84, i64 %87
  %89 = load ptr, ptr %88, align 8, !tbaa !5
  %90 = load i32, ptr %12, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds float, ptr %89, i64 %91
  %93 = load float, ptr %92, align 4, !tbaa !13
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = getelementptr inbounds %class.ImageContent, ptr %94, i32 0, i32 4
  %96 = load ptr, ptr %95, align 8, !tbaa !11
  %97 = load i32, ptr %10, align 4, !tbaa !9
  %98 = sub nsw i32 %97, 1
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds ptr, ptr %96, i64 %99
  %101 = load ptr, ptr %100, align 8, !tbaa !5
  %102 = load i32, ptr %12, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds float, ptr %101, i64 %103
  %105 = load float, ptr %104, align 4, !tbaa !13
  %106 = fsub float %93, %105
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  %108 = load i32, ptr %9, align 4, !tbaa !9
  %109 = add i32 %108, 1
  store i32 %109, ptr %9, align 4, !tbaa !9
  %110 = zext i32 %108 to i64
  %111 = getelementptr inbounds float, ptr %107, i64 %110
  store float %106, ptr %111, align 4, !tbaa !13
  br label %112

112:                                              ; preds = %51
  %113 = load i32, ptr %12, align 4, !tbaa !9
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %12, align 4, !tbaa !9
  br label %47, !llvm.loop !15

115:                                              ; preds = %50
  br label %116

116:                                              ; preds = %115
  %117 = load i32, ptr %10, align 4, !tbaa !9
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %10, align 4, !tbaa !9
  br label %38, !llvm.loop !17

119:                                              ; preds = %41
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_Z7NormvecPfj(ptr noundef %120, i32 noundef 3042)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %121

121:                                              ; preds = %136, %119
  %122 = load i32, ptr %13, align 4, !tbaa !9
  %123 = icmp ult i32 %122, 3042
  br i1 %123, label %125, label %124

124:                                              ; preds = %121
  store i32 8, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %139

125:                                              ; preds = %121
  %126 = load i32, ptr %13, align 4, !tbaa !9
  %127 = zext i32 %126 to i64
  %128 = getelementptr inbounds [3042 x float], ptr @_ZL4avgs, i64 0, i64 %127
  %129 = load float, ptr %128, align 4, !tbaa !13
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  %131 = load i32, ptr %13, align 4, !tbaa !9
  %132 = zext i32 %131 to i64
  %133 = getelementptr inbounds float, ptr %130, i64 %132
  %134 = load float, ptr %133, align 4, !tbaa !13
  %135 = fsub float %134, %129
  store float %135, ptr %133, align 4, !tbaa !13
  br label %136

136:                                              ; preds = %125
  %137 = load i32, ptr %13, align 4, !tbaa !9
  %138 = add i32 %137, 1
  store i32 %138, ptr %13, align 4, !tbaa !9
  br label %121, !llvm.loop !18

139:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %140

140:                                              ; preds = %173, %139
  %141 = load i32, ptr %14, align 4, !tbaa !9
  %142 = icmp slt i32 %141, 36
  br i1 %142, label %144, label %143

143:                                              ; preds = %140
  store i32 11, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %176

144:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %145

145:                                              ; preds = %169, %144
  %146 = load i32, ptr %15, align 4, !tbaa !9
  %147 = icmp slt i32 %146, 3042
  br i1 %147, label %149, label %148

148:                                              ; preds = %145
  store i32 14, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %172

149:                                              ; preds = %145
  %150 = load i32, ptr %14, align 4, !tbaa !9
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [36 x [3042 x float]], ptr @_ZL4eigs, i64 0, i64 %151
  %153 = load i32, ptr %15, align 4, !tbaa !9
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [3042 x float], ptr %152, i64 0, i64 %154
  %156 = load float, ptr %155, align 4, !tbaa !13
  %157 = load ptr, ptr %8, align 8, !tbaa !5
  %158 = load i32, ptr %15, align 4, !tbaa !9
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds float, ptr %157, i64 %159
  %161 = load float, ptr %160, align 4, !tbaa !13
  %162 = getelementptr inbounds %class.CornerDescriptor, ptr %16, i32 0, i32 1
  %163 = load ptr, ptr %162, align 8, !tbaa !19
  %164 = load i32, ptr %14, align 4, !tbaa !9
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds float, ptr %163, i64 %165
  %167 = load float, ptr %166, align 4, !tbaa !13
  %168 = call float @llvm.fmuladd.f32(float %156, float %161, float %167)
  store float %168, ptr %166, align 4, !tbaa !13
  br label %169

169:                                              ; preds = %149
  %170 = load i32, ptr %15, align 4, !tbaa !9
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %15, align 4, !tbaa !9
  br label %145, !llvm.loop !23

172:                                              ; preds = %148
  br label %173

173:                                              ; preds = %172
  %174 = load i32, ptr %14, align 4, !tbaa !9
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %14, align 4, !tbaa !9
  br label %140, !llvm.loop !24

176:                                              ; preds = %143
  %177 = load ptr, ptr %5, align 8, !tbaa !5
  %178 = icmp eq ptr %177, null
  br i1 %178, label %180, label %179

179:                                              ; preds = %176
  call void @_ZN12ImageContentD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %177) #8
  call void @_ZdlPvm(ptr noundef %177, i64 noundef 80) #10
  br label %180

180:                                              ; preds = %179, %176
  %181 = load ptr, ptr %8, align 8, !tbaa !5
  %182 = icmp eq ptr %181, null
  br i1 %182, label %184, label %183

183:                                              ; preds = %180
  call void @_ZdaPv(ptr noundef %181) #10
  br label %184

184:                                              ; preds = %183, %180
  %185 = getelementptr inbounds %class.Corner, ptr %16, i32 0, i32 20
  store i32 1, ptr %185, align 8, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %186

186:                                              ; preds = %184, %19
  ret void

187:                                              ; preds = %42
  %188 = load ptr, ptr %6, align 8
  %189 = load i32, ptr %7, align 4
  %190 = insertvalue { ptr, i32 } poison, ptr %188, 0
  %191 = insertvalue { ptr, i32 } %190, i32 %189, 1
  resume { ptr, i32 } %191
}

declare void @_ZN16CornerDescriptor8allocVecEi(ptr noundef nonnull align 8 dereferenceable(116), i32 noundef) #2

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

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

declare i32 @__gxx_personality_v0(...)

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

declare noundef zeroext i1 @_ZN6Corner15normalizeAffineEP12ImageContentS1_(ptr noundef nonnull align 4 dereferenceable(88), ptr noundef, ptr noundef) #2

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

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

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

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

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #4

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 #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 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 16}
!12 = !{!"_ZTS12ImageContent", !10, i64 0, !10, i64 4, !10, i64 8, !10, 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}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = !{!20, !6, i64 88}
!20 = !{!"_ZTS16CornerDescriptor", !21, i64 0, !6, i64 88, !10, i64 96, !14, i64 100, !22, i64 104, !10, i64 112}
!21 = !{!"_ZTS6Corner", !10, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !14, i64 40, !14, i64 44, !14, i64 48, !14, i64 52, !14, i64 56, !14, i64 60, !14, i64 64, !10, i64 68, !10, i64 72, !14, i64 76, !10, i64 80, !10, i64 84}
!22 = !{!"long", !7, i64 0}
!23 = distinct !{!23, !16}
!24 = distinct !{!24, !16}
!25 = !{!21, !10, i64 80}


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

@_ZL4avgs = external hidden local_unnamed_addr global [3042 x float], align 16
@_ZL4eigs = external hidden local_unnamed_addr global [36 x [3042 x float]], align 16

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7NormvecPfj(ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13PcaDescriptor17computeComponentsEP12ImageContent(ptr noundef nonnull align 8 dereferenceable(116) %0, ptr noundef %1) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = icmp eq ptr %1, null
  br i1 %3, label %103, label %4

4:                                                ; preds = %2
  tail call void @_ZN16CornerDescriptor8allocVecEi(ptr noundef nonnull align 8 dereferenceable(116) %0, i32 noundef 36)
  %5 = tail call noalias noundef nonnull dereferenceable(80) ptr @_Znwm(i64 noundef 80) #7
  invoke void @_ZN12ImageContentC2Eii(ptr noundef nonnull align 8 dereferenceable(80) %5, i32 noundef 41, i32 noundef 41)
          to label %6 unwind label %37

6:                                                ; preds = %4
  %7 = tail call noundef zeroext i1 @_ZN6Corner15normalizeAffineEP12ImageContentS1_(ptr noundef nonnull align 4 dereferenceable(88) %0, ptr noundef nonnull %1, ptr noundef nonnull %5)
  %8 = tail call noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  %9 = lshr i32 %8, 1
  %10 = tail call noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  %11 = lshr i32 %10, 1
  %12 = tail call noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  %13 = lshr i32 %12, 1
  %14 = uitofp nneg i32 %13 to float
  tail call void @_Z9normalizeP12ImageContentiif(ptr noundef nonnull %5, i32 noundef %9, i32 noundef %11, float noundef %14)
  %15 = tail call noalias noundef nonnull dereferenceable(12168) ptr @_Znam(i64 noundef 12168) #7
  %16 = getelementptr inbounds i8, ptr %5, i64 16
  %17 = load ptr, ptr %16, align 8, !tbaa !5
  br label %.preheader53

.preheader53:                                     ; preds = %6, %39
  %indvars.iv62 = phi i64 [ 1, %6 ], [ %indvars.iv.next63, %39 ]
  %.05056 = phi i32 [ 0, %6 ], [ %53, %39 ]
  %18 = getelementptr inbounds ptr, ptr %17, i64 %indvars.iv62
  %19 = load ptr, ptr %18, align 8, !tbaa !11
  %invariant.gep = getelementptr i8, ptr %19, i64 -4
  %20 = getelementptr inbounds i8, ptr %18, i64 8
  %21 = load ptr, ptr %20, align 8, !tbaa !11
  %22 = getelementptr i8, ptr %18, i64 -8
  %23 = load ptr, ptr %22, align 8, !tbaa !11
  br label %40

vector.ph:                                        ; preds = %39
  tail call void @_Z7NormvecPfj(ptr noundef nonnull %15, i32 noundef 3042)
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next.1, %vector.body ]
  %24 = getelementptr inbounds [3042 x float], ptr @_ZL4avgs, i64 0, i64 %index
  %25 = getelementptr inbounds i8, ptr %24, i64 16
  %wide.load = load <4 x float>, ptr %24, align 16, !tbaa !12
  %wide.load78 = load <4 x float>, ptr %25, align 16, !tbaa !12
  %26 = getelementptr inbounds float, ptr %15, i64 %index
  %27 = getelementptr inbounds i8, ptr %26, i64 16
  %wide.load79 = load <4 x float>, ptr %26, align 4, !tbaa !12
  %wide.load80 = load <4 x float>, ptr %27, align 4, !tbaa !12
  %28 = fsub <4 x float> %wide.load79, %wide.load
  %29 = fsub <4 x float> %wide.load80, %wide.load78
  store <4 x float> %28, ptr %26, align 4, !tbaa !12
  store <4 x float> %29, ptr %27, align 4, !tbaa !12
  %index.next = or disjoint i64 %index, 8
  %30 = getelementptr inbounds [3042 x float], ptr @_ZL4avgs, i64 0, i64 %index.next
  %31 = getelementptr inbounds i8, ptr %30, i64 16
  %wide.load.1 = load <4 x float>, ptr %30, align 16, !tbaa !12
  %wide.load78.1 = load <4 x float>, ptr %31, align 16, !tbaa !12
  %32 = getelementptr inbounds float, ptr %15, i64 %index.next
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  %wide.load79.1 = load <4 x float>, ptr %32, align 4, !tbaa !12
  %wide.load80.1 = load <4 x float>, ptr %33, align 4, !tbaa !12
  %34 = fsub <4 x float> %wide.load79.1, %wide.load.1
  %35 = fsub <4 x float> %wide.load80.1, %wide.load78.1
  store <4 x float> %34, ptr %32, align 4, !tbaa !12
  store <4 x float> %35, ptr %33, align 4, !tbaa !12
  %index.next.1 = add nuw nsw i64 %index, 16
  %36 = icmp eq i64 %index.next.1, 3040
  br i1 %36, label %scalar.ph, label %vector.body, !llvm.loop !14

37:                                               ; preds = %4
  %38 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %5, i64 noundef 80) #8
  resume { ptr, i32 } %38

39:                                               ; preds = %40
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %exitcond65.not = icmp eq i64 %indvars.iv.next63, 40
  br i1 %exitcond65.not, label %vector.ph, label %.preheader53, !llvm.loop !18

40:                                               ; preds = %56, %.preheader53
  %indvars.iv = phi i64 [ 1, %.preheader53 ], [ %indvars.iv.next.1, %56 ]
  %.154 = phi i32 [ %.05056, %.preheader53 ], [ %69, %56 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %41 = getelementptr inbounds float, ptr %19, i64 %indvars.iv.next
  %42 = load float, ptr %41, align 4, !tbaa !12
  %gep = getelementptr float, ptr %invariant.gep, i64 %indvars.iv
  %43 = load float, ptr %gep, align 4, !tbaa !12
  %44 = fsub float %42, %43
  %45 = add i32 %.154, 1
  %46 = zext i32 %.154 to i64
  %47 = getelementptr inbounds float, ptr %15, i64 %46
  store float %44, ptr %47, align 4, !tbaa !12
  %48 = getelementptr inbounds float, ptr %21, i64 %indvars.iv
  %49 = load float, ptr %48, align 4, !tbaa !12
  %50 = getelementptr inbounds float, ptr %23, i64 %indvars.iv
  %51 = load float, ptr %50, align 4, !tbaa !12
  %52 = fsub float %49, %51
  %53 = add i32 %.154, 2
  %54 = zext i32 %45 to i64
  %55 = getelementptr inbounds float, ptr %15, i64 %54
  store float %52, ptr %55, align 4, !tbaa !12
  %exitcond.not = icmp eq i64 %indvars.iv.next, 40
  br i1 %exitcond.not, label %39, label %56, !llvm.loop !19

56:                                               ; preds = %40
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %57 = getelementptr inbounds float, ptr %19, i64 %indvars.iv.next.1
  %58 = load float, ptr %57, align 4, !tbaa !12
  %gep.1 = getelementptr float, ptr %19, i64 %indvars.iv
  %59 = load float, ptr %gep.1, align 4, !tbaa !12
  %60 = fsub float %58, %59
  %61 = add i32 %.154, 3
  %62 = zext i32 %53 to i64
  %63 = getelementptr inbounds float, ptr %15, i64 %62
  store float %60, ptr %63, align 4, !tbaa !12
  %64 = getelementptr inbounds float, ptr %21, i64 %indvars.iv.next
  %65 = load float, ptr %64, align 4, !tbaa !12
  %66 = getelementptr inbounds float, ptr %23, i64 %indvars.iv.next
  %67 = load float, ptr %66, align 4, !tbaa !12
  %68 = fsub float %65, %67
  %69 = add i32 %.154, 4
  %70 = zext i32 %61 to i64
  %71 = getelementptr inbounds float, ptr %15, i64 %70
  store float %68, ptr %71, align 4, !tbaa !12
  br label %40

scalar.ph:                                        ; preds = %vector.body
  %72 = load float, ptr getelementptr inbounds (i8, ptr @_ZL4avgs, i64 12160), align 16, !tbaa !12
  %73 = getelementptr inbounds i8, ptr %15, i64 12160
  %74 = load float, ptr %73, align 4, !tbaa !12
  %75 = fsub float %74, %72
  store float %75, ptr %73, align 4, !tbaa !12
  %76 = load float, ptr getelementptr inbounds (i8, ptr @_ZL4avgs, i64 12164), align 4, !tbaa !12
  %77 = getelementptr inbounds i8, ptr %15, i64 12164
  %78 = load float, ptr %77, align 4, !tbaa !12
  %79 = fsub float %78, %76
  store float %79, ptr %77, align 4, !tbaa !12
  %80 = getelementptr inbounds i8, ptr %0, i64 88
  %81 = load ptr, ptr %80, align 8, !tbaa !20
  br label %.preheader

.preheader:                                       ; preds = %scalar.ph, %83
  %indvars.iv74 = phi i64 [ 0, %scalar.ph ], [ %indvars.iv.next75, %83 ]
  %82 = getelementptr inbounds float, ptr %81, i64 %indvars.iv74
  %.promoted = load float, ptr %82, align 4, !tbaa !12
  br label %84

83:                                               ; preds = %84
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %exitcond77.not = icmp eq i64 %indvars.iv.next75, 36
  br i1 %exitcond77.not, label %101, label %.preheader, !llvm.loop !24

84:                                               ; preds = %84, %.preheader
  %indvars.iv70 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next71.2, %84 ]
  %85 = phi float [ %.promoted, %.preheader ], [ %100, %84 ]
  %86 = getelementptr inbounds [36 x [3042 x float]], ptr @_ZL4eigs, i64 0, i64 %indvars.iv74, i64 %indvars.iv70
  %87 = load float, ptr %86, align 4, !tbaa !12
  %88 = getelementptr inbounds float, ptr %15, i64 %indvars.iv70
  %89 = load float, ptr %88, align 4, !tbaa !12
  %90 = tail call float @llvm.fmuladd.f32(float %87, float %89, float %85)
  store float %90, ptr %82, align 4, !tbaa !12
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %91 = getelementptr inbounds [36 x [3042 x float]], ptr @_ZL4eigs, i64 0, i64 %indvars.iv74, i64 %indvars.iv.next71
  %92 = load float, ptr %91, align 4, !tbaa !12
  %93 = getelementptr inbounds float, ptr %15, i64 %indvars.iv.next71
  %94 = load float, ptr %93, align 4, !tbaa !12
  %95 = tail call float @llvm.fmuladd.f32(float %92, float %94, float %90)
  store float %95, ptr %82, align 4, !tbaa !12
  %indvars.iv.next71.1 = add nuw nsw i64 %indvars.iv70, 2
  %96 = getelementptr inbounds [36 x [3042 x float]], ptr @_ZL4eigs, i64 0, i64 %indvars.iv74, i64 %indvars.iv.next71.1
  %97 = load float, ptr %96, align 4, !tbaa !12
  %98 = getelementptr inbounds float, ptr %15, i64 %indvars.iv.next71.1
  %99 = load float, ptr %98, align 4, !tbaa !12
  %100 = tail call float @llvm.fmuladd.f32(float %97, float %99, float %95)
  store float %100, ptr %82, align 4, !tbaa !12
  %indvars.iv.next71.2 = add nuw nsw i64 %indvars.iv70, 3
  %exitcond73.not.2 = icmp eq i64 %indvars.iv.next71.2, 3042
  br i1 %exitcond73.not.2, label %83, label %84, !llvm.loop !25

101:                                              ; preds = %83
  tail call void @_ZN12ImageContentD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #9
  tail call void @_ZdlPvm(ptr noundef nonnull %5, i64 noundef 80) #8
  tail call void @_ZdaPv(ptr noundef nonnull %15) #8
  %102 = getelementptr inbounds i8, ptr %0, i64 80
  store i32 1, ptr %102, align 8, !tbaa !26
  br label %103

103:                                              ; preds = %2, %101
  ret void
}

declare void @_ZN16CornerDescriptor8allocVecEi(ptr noundef nonnull align 8 dereferenceable(116), i32 noundef) local_unnamed_addr #1

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

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

declare i32 @__gxx_personality_v0(...)

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

declare noundef zeroext i1 @_ZN6Corner15normalizeAffineEP12ImageContentS1_(ptr noundef nonnull align 4 dereferenceable(88), ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

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

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

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

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

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

attributes #0 = { 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 #1 = { "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 = { 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 #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 #7 = { builtin allocsize(0) }
attributes #8 = { builtin nounwind }
attributes #9 = { 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, !10, i64 16}
!6 = !{!"_ZTS12ImageContent", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!10, !10, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !8, i64 0}
!14 = distinct !{!14, !15, !16, !17}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}
!20 = !{!21, !10, i64 88}
!21 = !{!"_ZTS16CornerDescriptor", !22, i64 0, !10, i64 88, !7, i64 96, !13, i64 100, !23, i64 104, !7, i64 112}
!22 = !{!"_ZTS6Corner", !7, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52, !13, i64 56, !13, i64 60, !13, i64 64, !7, i64 68, !7, i64 72, !13, i64 76, !7, i64 80, !7, i64 84}
!23 = !{!"long", !8, i64 0}
!24 = distinct !{!24, !15}
!25 = distinct !{!25, !15}
!26 = !{!22, !7, i64 80}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass,TailCallElimPass