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

; 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.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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

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

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

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

; 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 void @_Z2dXP12ImageContentS0_f(ptr noundef, ptr noundef, float noundef) #6

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5getMiP12ImageContentP6Matrixiiff(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, float noundef %4, float noundef %5) #5 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca float, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !9
  store i32 %3, ptr %10, align 4, !tbaa !9
  store float %4, ptr %11, align 4, !tbaa !11
  store float %5, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = call noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80) %26)
  store i32 %27, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = call noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80) %28)
  store i32 %29, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %30 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 80) #8
  %31 = load i32, ptr %13, align 4, !tbaa !9
  %32 = load i32, ptr %14, align 4, !tbaa !9
  invoke void @_ZN12ImageContentC2Eii(ptr noundef nonnull align 8 dereferenceable(80) %30, i32 noundef %31, i32 noundef %32)
          to label %33 unwind label %54

33:                                               ; preds = %6
  store ptr %30, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %34 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 80) #8
  %35 = load i32, ptr %13, align 4, !tbaa !9
  %36 = load i32, ptr %14, align 4, !tbaa !9
  invoke void @_ZN12ImageContentC2Eii(ptr noundef nonnull align 8 dereferenceable(80) %34, i32 noundef %35, i32 noundef %36)
          to label %37 unwind label %58

37:                                               ; preds = %33
  store ptr %34, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %38 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 80) #8
  %39 = load i32, ptr %13, align 4, !tbaa !9
  %40 = load i32, ptr %14, align 4, !tbaa !9
  invoke void @_ZN12ImageContentC2Eii(ptr noundef nonnull align 8 dereferenceable(80) %38, i32 noundef %39, i32 noundef %40)
          to label %41 unwind label %62

41:                                               ; preds = %37
  store ptr %38, ptr %21, align 8, !tbaa !5
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = load ptr, ptr %17, align 8, !tbaa !5
  %44 = load float, ptr %12, align 4, !tbaa !11
  call void @_Z2dXP12ImageContentS0_f(ptr noundef %42, ptr noundef %43, float noundef %44)
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = load ptr, ptr %20, align 8, !tbaa !5
  %47 = load float, ptr %12, align 4, !tbaa !11
  call void @_Z2dYP12ImageContentS0_f(ptr noundef %45, ptr noundef %46, float noundef %47)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %48 = load float, ptr %12, align 4, !tbaa !11
  store float %48, ptr %22, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %49

49:                                               ; preds = %142, %41
  %50 = load i32, ptr %23, align 4, !tbaa !9
  %51 = load i32, ptr %13, align 4, !tbaa !9
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %66, label %53

53:                                               ; preds = %49
  store i32 2, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %145

54:                                               ; preds = %6
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %18, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %19, align 4
  call void @_ZdlPvm(ptr noundef %30, i64 noundef 80) #9
  br label %201

58:                                               ; preds = %33
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %18, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %19, align 4
  call void @_ZdlPvm(ptr noundef %34, i64 noundef 80) #9
  br label %200

62:                                               ; preds = %37
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %18, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %19, align 4
  call void @_ZdlPvm(ptr noundef %38, i64 noundef 80) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %200

66:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %67

67:                                               ; preds = %138, %66
  %68 = load i32, ptr %25, align 4, !tbaa !9
  %69 = load i32, ptr %14, align 4, !tbaa !9
  %70 = icmp slt i32 %68, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %67
  store i32 5, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %141

72:                                               ; preds = %67
  %73 = load float, ptr %22, align 4, !tbaa !11
  %74 = load ptr, ptr %17, align 8, !tbaa !5
  %75 = getelementptr inbounds %class.ImageContent, ptr %74, i32 0, i32 4
  %76 = load ptr, ptr %75, align 8, !tbaa !13
  %77 = load i32, ptr %23, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds ptr, ptr %76, i64 %78
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = load i32, ptr %25, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds float, ptr %80, i64 %82
  %84 = load float, ptr %83, align 4, !tbaa !11
  %85 = fmul float %73, %84
  store float %85, ptr %15, align 4, !tbaa !11
  %86 = load float, ptr %22, align 4, !tbaa !11
  %87 = load ptr, ptr %20, align 8, !tbaa !5
  %88 = getelementptr inbounds %class.ImageContent, ptr %87, i32 0, i32 4
  %89 = load ptr, ptr %88, align 8, !tbaa !13
  %90 = load i32, ptr %23, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds ptr, ptr %89, i64 %91
  %93 = load ptr, ptr %92, align 8, !tbaa !5
  %94 = load i32, ptr %25, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds float, ptr %93, i64 %95
  %97 = load float, ptr %96, align 4, !tbaa !11
  %98 = fmul float %86, %97
  store float %98, ptr %16, align 4, !tbaa !11
  %99 = load float, ptr %15, align 4, !tbaa !11
  %100 = load float, ptr %15, align 4, !tbaa !11
  %101 = fmul float %99, %100
  %102 = load ptr, ptr %17, align 8, !tbaa !5
  %103 = getelementptr inbounds %class.ImageContent, ptr %102, i32 0, i32 4
  %104 = load ptr, ptr %103, align 8, !tbaa !13
  %105 = load i32, ptr %23, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds ptr, ptr %104, i64 %106
  %108 = load ptr, ptr %107, align 8, !tbaa !5
  %109 = load i32, ptr %25, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds float, ptr %108, i64 %110
  store float %101, ptr %111, align 4, !tbaa !11
  %112 = load float, ptr %16, align 4, !tbaa !11
  %113 = load float, ptr %16, align 4, !tbaa !11
  %114 = fmul float %112, %113
  %115 = load ptr, ptr %20, align 8, !tbaa !5
  %116 = getelementptr inbounds %class.ImageContent, ptr %115, i32 0, i32 4
  %117 = load ptr, ptr %116, align 8, !tbaa !13
  %118 = load i32, ptr %23, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds ptr, ptr %117, i64 %119
  %121 = load ptr, ptr %120, align 8, !tbaa !5
  %122 = load i32, ptr %25, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds float, ptr %121, i64 %123
  store float %114, ptr %124, align 4, !tbaa !11
  %125 = load float, ptr %15, align 4, !tbaa !11
  %126 = load float, ptr %16, align 4, !tbaa !11
  %127 = fmul float %125, %126
  %128 = load ptr, ptr %21, align 8, !tbaa !5
  %129 = getelementptr inbounds %class.ImageContent, ptr %128, i32 0, i32 4
  %130 = load ptr, ptr %129, align 8, !tbaa !13
  %131 = load i32, ptr %23, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds ptr, ptr %130, i64 %132
  %134 = load ptr, ptr %133, align 8, !tbaa !5
  %135 = load i32, ptr %25, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds float, ptr %134, i64 %136
  store float %127, ptr %137, align 4, !tbaa !11
  br label %138

138:                                              ; preds = %72
  %139 = load i32, ptr %25, align 4, !tbaa !9
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %25, align 4, !tbaa !9
  br label %67, !llvm.loop !15

141:                                              ; preds = %71
  br label %142

142:                                              ; preds = %141
  %143 = load i32, ptr %23, align 4, !tbaa !9
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %23, align 4, !tbaa !9
  br label %49, !llvm.loop !17

145:                                              ; preds = %53
  %146 = load i32, ptr %9, align 4, !tbaa !9
  %147 = load i32, ptr %10, align 4, !tbaa !9
  %148 = load ptr, ptr %17, align 8, !tbaa !5
  %149 = load float, ptr %11, align 4, !tbaa !11
  %150 = call noundef float @_Z7smoothfiiP12ImageContentf(i32 noundef %146, i32 noundef %147, ptr noundef %148, float noundef %149)
  %151 = fpext float %150 to double
  %152 = load ptr, ptr %8, align 8, !tbaa !5
  %153 = getelementptr inbounds %class.Matrix, ptr %152, i32 0, i32 1
  %154 = load ptr, ptr %153, align 8, !tbaa !18
  %155 = getelementptr inbounds ptr, ptr %154, i64 1
  %156 = load ptr, ptr %155, align 8, !tbaa !5
  %157 = getelementptr inbounds double, ptr %156, i64 1
  store double %151, ptr %157, align 8, !tbaa !20
  %158 = load i32, ptr %9, align 4, !tbaa !9
  %159 = load i32, ptr %10, align 4, !tbaa !9
  %160 = load ptr, ptr %20, align 8, !tbaa !5
  %161 = load float, ptr %11, align 4, !tbaa !11
  %162 = call noundef float @_Z7smoothfiiP12ImageContentf(i32 noundef %158, i32 noundef %159, ptr noundef %160, float noundef %161)
  %163 = fpext float %162 to double
  %164 = load ptr, ptr %8, align 8, !tbaa !5
  %165 = getelementptr inbounds %class.Matrix, ptr %164, i32 0, i32 1
  %166 = load ptr, ptr %165, align 8, !tbaa !18
  %167 = getelementptr inbounds ptr, ptr %166, i64 2
  %168 = load ptr, ptr %167, align 8, !tbaa !5
  %169 = getelementptr inbounds double, ptr %168, i64 2
  store double %163, ptr %169, align 8, !tbaa !20
  %170 = load i32, ptr %9, align 4, !tbaa !9
  %171 = load i32, ptr %10, align 4, !tbaa !9
  %172 = load ptr, ptr %21, align 8, !tbaa !5
  %173 = load float, ptr %11, align 4, !tbaa !11
  %174 = call noundef float @_Z7smoothfiiP12ImageContentf(i32 noundef %170, i32 noundef %171, ptr noundef %172, float noundef %173)
  %175 = fpext float %174 to double
  %176 = load ptr, ptr %8, align 8, !tbaa !5
  %177 = getelementptr inbounds %class.Matrix, ptr %176, i32 0, i32 1
  %178 = load ptr, ptr %177, align 8, !tbaa !18
  %179 = getelementptr inbounds ptr, ptr %178, i64 1
  %180 = load ptr, ptr %179, align 8, !tbaa !5
  %181 = getelementptr inbounds double, ptr %180, i64 2
  store double %175, ptr %181, align 8, !tbaa !20
  %182 = load ptr, ptr %8, align 8, !tbaa !5
  %183 = getelementptr inbounds %class.Matrix, ptr %182, i32 0, i32 1
  %184 = load ptr, ptr %183, align 8, !tbaa !18
  %185 = getelementptr inbounds ptr, ptr %184, i64 2
  %186 = load ptr, ptr %185, align 8, !tbaa !5
  %187 = getelementptr inbounds double, ptr %186, i64 1
  store double %175, ptr %187, align 8, !tbaa !20
  %188 = load ptr, ptr %17, align 8, !tbaa !5
  %189 = icmp eq ptr %188, null
  br i1 %189, label %191, label %190

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

191:                                              ; preds = %190, %145
  %192 = load ptr, ptr %20, align 8, !tbaa !5
  %193 = icmp eq ptr %192, null
  br i1 %193, label %195, label %194

194:                                              ; preds = %191
  call void @_ZN12ImageContentD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %192) #7
  call void @_ZdlPvm(ptr noundef %192, i64 noundef 80) #9
  br label %195

195:                                              ; preds = %194, %191
  %196 = load ptr, ptr %21, align 8, !tbaa !5
  %197 = icmp eq ptr %196, null
  br i1 %197, label %199, label %198

198:                                              ; preds = %195
  call void @_ZN12ImageContentD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %196) #7
  call void @_ZdlPvm(ptr noundef %196, i64 noundef 80) #9
  br label %199

199:                                              ; preds = %198, %195
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, 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 @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  ret void

200:                                              ; preds = %62, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %201

201:                                              ; preds = %200, %54
  call void @llvm.lifetime.end.p0(i64 8, 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 @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %202

202:                                              ; preds = %201
  %203 = load ptr, ptr %18, align 8
  %204 = load i32, ptr %19, align 4
  %205 = insertvalue { ptr, i32 } poison, ptr %203, 0
  %206 = insertvalue { ptr, i32 } %205, i32 %204, 1
  resume { ptr, i32 } %206
}

declare noundef float @_Z7smoothfiiP12ImageContentf(i32 noundef, i32 noundef, ptr noundef, float noundef) #6

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 = { 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 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !6, i64 16}
!14 = !{!"_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}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{!19, !6, i64 8}
!19 = !{!"_ZTS6Matrix", !6, i64 8, !10, i64 16, !10, i64 20}
!20 = !{!21, !21, i64 0}
!21 = !{!"double", !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 i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; 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 #4 align 2

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

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

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

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

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

14:                                               ; preds = %12
  tail call void @_Z2dXP12ImageContentS0_f(ptr noundef nonnull %0, ptr noundef nonnull %9, float noundef %5)
  tail call void @_Z2dYP12ImageContentS0_f(ptr noundef nonnull %0, ptr noundef nonnull %11, float noundef %5)
  %15 = icmp sgt i32 %7, 0
  %16 = icmp sgt i32 %8, 0
  %or.cond = and i1 %15, %16
  br i1 %or.cond, label %.preheader.lr.ph.split.us, label %._crit_edge72

.preheader.lr.ph.split.us:                        ; preds = %14
  %17 = getelementptr inbounds i8, ptr %13, i64 16
  %18 = getelementptr inbounds i8, ptr %11, i64 16
  %19 = getelementptr inbounds i8, ptr %9, i64 16
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  %21 = load ptr, ptr %18, align 8, !tbaa !5
  %22 = load ptr, ptr %17, align 8, !tbaa !5
  %wide.trip.count78 = zext nneg i32 %7 to i64
  %wide.trip.count = zext nneg i32 %8 to i64
  %23 = shl nuw nsw i64 %wide.trip.count, 2
  %min.iters.check = icmp ult i32 %8, 4
  %n.vec = and i64 %wide.trip.count, 2147483644
  %broadcast.splatinsert = insertelement <4 x float> poison, float %5, i64 0
  %broadcast.splat = shufflevector <4 x float> %broadcast.splatinsert, <4 x float> poison, <4 x i32> zeroinitializer
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br label %.preheader.us

.preheader.us:                                    ; preds = %._crit_edge.us, %.preheader.lr.ph.split.us
  %indvars.iv75 = phi i64 [ %indvars.iv.next76, %._crit_edge.us ], [ 0, %.preheader.lr.ph.split.us ]
  %24 = getelementptr inbounds ptr, ptr %20, i64 %indvars.iv75
  %25 = load ptr, ptr %24, align 8, !tbaa !11
  %26 = getelementptr inbounds ptr, ptr %21, i64 %indvars.iv75
  %27 = load ptr, ptr %26, align 8, !tbaa !11
  %28 = getelementptr inbounds ptr, ptr %22, i64 %indvars.iv75
  %29 = load ptr, ptr %28, align 8, !tbaa !11
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %.preheader.us
  %scevgep = getelementptr i8, ptr %25, i64 %23
  %scevgep80 = getelementptr i8, ptr %27, i64 %23
  %scevgep81 = getelementptr i8, ptr %29, i64 %23
  %bound0 = icmp ult ptr %25, %scevgep80
  %bound1 = icmp ult ptr %27, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  %bound082 = icmp ult ptr %25, %scevgep81
  %bound183 = icmp ult ptr %29, %scevgep
  %found.conflict84 = and i1 %bound082, %bound183
  %conflict.rdx = or i1 %found.conflict, %found.conflict84
  %bound085 = icmp ult ptr %27, %scevgep81
  %bound186 = icmp ult ptr %29, %scevgep80
  %found.conflict87 = and i1 %bound085, %bound186
  %conflict.rdx88 = or i1 %conflict.rdx, %found.conflict87
  br i1 %conflict.rdx88, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %vector.memcheck, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.memcheck ]
  %30 = getelementptr inbounds float, ptr %25, i64 %index
  %wide.load = load <4 x float>, ptr %30, align 4, !tbaa !12, !alias.scope !14, !noalias !17
  %31 = fmul <4 x float> %wide.load, %broadcast.splat
  %32 = getelementptr inbounds float, ptr %27, i64 %index
  %wide.load89 = load <4 x float>, ptr %32, align 4, !tbaa !12, !alias.scope !20, !noalias !21
  %33 = fmul <4 x float> %wide.load89, %broadcast.splat
  %34 = fmul <4 x float> %31, %31
  store <4 x float> %34, ptr %30, align 4, !tbaa !12, !alias.scope !14, !noalias !17
  %35 = fmul <4 x float> %33, %33
  store <4 x float> %35, ptr %32, align 4, !tbaa !12, !alias.scope !20, !noalias !21
  %36 = fmul <4 x float> %31, %33
  %37 = getelementptr inbounds float, ptr %29, i64 %index
  store <4 x float> %36, ptr %37, align 4, !tbaa !12, !alias.scope !21
  %index.next = add nuw i64 %index, 4
  %38 = icmp eq i64 %index.next, %n.vec
  br i1 %38, label %middle.block, label %vector.body, !llvm.loop !22

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.preheader.us
  %indvars.iv.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.preheader.us ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %39 = getelementptr inbounds float, ptr %25, i64 %indvars.iv
  %40 = load float, ptr %39, align 4, !tbaa !12
  %41 = fmul float %40, %5
  %42 = getelementptr inbounds float, ptr %27, i64 %indvars.iv
  %43 = load float, ptr %42, align 4, !tbaa !12
  %44 = fmul float %43, %5
  %45 = fmul float %41, %41
  store float %45, ptr %39, align 4, !tbaa !12
  %46 = fmul float %44, %44
  store float %46, ptr %42, align 4, !tbaa !12
  %47 = fmul float %41, %44
  %48 = getelementptr inbounds float, ptr %29, i64 %indvars.iv
  store float %47, ptr %48, align 4, !tbaa !12
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.us, label %scalar.ph, !llvm.loop !26

._crit_edge.us:                                   ; preds = %scalar.ph, %middle.block
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %exitcond79.not = icmp eq i64 %indvars.iv.next76, %wide.trip.count78
  br i1 %exitcond79.not, label %._crit_edge72, label %.preheader.us, !llvm.loop !27

._crit_edge72:                                    ; preds = %._crit_edge.us, %14
  %49 = tail call noundef float @_Z7smoothfiiP12ImageContentf(i32 noundef %2, i32 noundef %3, ptr noundef nonnull %9, float noundef %4)
  %50 = fpext float %49 to double
  %51 = getelementptr inbounds i8, ptr %1, i64 8
  %52 = load ptr, ptr %51, align 8, !tbaa !28
  %53 = getelementptr inbounds i8, ptr %52, i64 8
  %54 = load ptr, ptr %53, align 8, !tbaa !11
  %55 = getelementptr inbounds i8, ptr %54, i64 8
  store double %50, ptr %55, align 8, !tbaa !30
  %56 = tail call noundef float @_Z7smoothfiiP12ImageContentf(i32 noundef %2, i32 noundef %3, ptr noundef nonnull %11, float noundef %4)
  %57 = fpext float %56 to double
  %58 = load ptr, ptr %51, align 8, !tbaa !28
  %59 = getelementptr inbounds i8, ptr %58, i64 16
  %60 = load ptr, ptr %59, align 8, !tbaa !11
  %61 = getelementptr inbounds i8, ptr %60, i64 16
  store double %57, ptr %61, align 8, !tbaa !30
  %62 = tail call noundef float @_Z7smoothfiiP12ImageContentf(i32 noundef %2, i32 noundef %3, ptr noundef nonnull %13, float noundef %4)
  %63 = fpext float %62 to double
  %64 = load ptr, ptr %51, align 8, !tbaa !28
  %65 = getelementptr inbounds i8, ptr %64, i64 8
  %66 = load ptr, ptr %65, align 8, !tbaa !11
  %67 = getelementptr inbounds i8, ptr %66, i64 16
  store double %63, ptr %67, align 8, !tbaa !30
  %68 = getelementptr inbounds i8, ptr %64, i64 16
  %69 = load ptr, ptr %68, align 8, !tbaa !11
  %70 = getelementptr inbounds i8, ptr %69, i64 8
  store double %63, ptr %70, align 8, !tbaa !30
  tail call void @_ZN12ImageContentD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %9) #7
  tail call void @_ZdlPvm(ptr noundef nonnull %9, i64 noundef 80) #8
  tail call void @_ZN12ImageContentD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %11) #7
  tail call void @_ZdlPvm(ptr noundef nonnull %11, i64 noundef 80) #8
  tail call void @_ZN12ImageContentD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %13) #7
  tail call void @_ZdlPvm(ptr noundef nonnull %13, i64 noundef 80) #8
  ret void

71:                                               ; preds = %6
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %77

73:                                               ; preds = %10
  %74 = landingpad { ptr, i32 }
          cleanup
  br label %77

75:                                               ; preds = %12
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %77

77:                                               ; preds = %73, %75, %71
  %.sink = phi ptr [ %11, %73 ], [ %13, %75 ], [ %9, %71 ]
  %.pn.pn = phi { ptr, i32 } [ %74, %73 ], [ %76, %75 ], [ %72, %71 ]
  tail call void @_ZdlPvm(ptr noundef nonnull %.sink, i64 noundef 80) #8
  resume { ptr, i32 } %.pn.pn
}

declare noundef float @_Z7smoothfiiP12ImageContentf(i32 noundef, i32 noundef, ptr noundef, float noundef) local_unnamed_addr #5

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 = { 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 #2 = { 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 #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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { builtin allocsize(0) }
attributes #7 = { nounwind }
attributes #8 = { 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, !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 = !{!15}
!15 = distinct !{!15, !16}
!16 = distinct !{!16, !"LVerDomain"}
!17 = !{!18, !19}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}
!20 = !{!18}
!21 = !{!19}
!22 = distinct !{!22, !23, !24, !25}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!"llvm.loop.isvectorized", i32 1}
!25 = !{!"llvm.loop.unroll.runtime.disable"}
!26 = distinct !{!26, !23, !24}
!27 = distinct !{!27, !23}
!28 = !{!29, !10, i64 8}
!29 = !{!"_ZTS6Matrix", !10, i64 8, !7, i64 16, !7, i64 20}
!30 = !{!31, !31, i64 0}
!31 = !{!"double", !8, i64 0}


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