; LLVM IR from Lut1n/ImpGears :: src/ImpGears/Graphics (FloatImage)

; 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.imp::Vec4" = type { %"class.imp::Vec.6" }
%"class.imp::Vec.6" = type { %"class.imp::Object", [4 x float] }
%"class.imp::Object" = type { ptr, %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }

declare i32 @__gxx_personality_v0(...)

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

; 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 @_ZN3imp10FloatImage4copyERKSt10shared_ptrIS0_ERKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.imp::Vec4", align 8
  %12 = alloca %"class.imp::Vec4", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %16 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  %18 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #3
  %19 = trunc i64 %18 to i32
  store i32 %19, ptr %7, align 4, !tbaa !9
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp10FloatImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %20) #3
  %22 = call noundef i32 @_ZNK3imp10FloatImage5widthEv(ptr noundef nonnull align 8 dereferenceable(88) %21)
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp10FloatImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %23) #3
  %25 = call noundef i32 @_ZNK3imp10FloatImage6heightEv(ptr noundef nonnull align 8 dereferenceable(88) %24)
  %26 = load i32, ptr %7, align 4, !tbaa !9
  call void @_ZN3imp10FloatImage6resizeEiii(ptr noundef nonnull align 8 dereferenceable(88) %16, i32 noundef %22, i32 noundef %25, i32 noundef %26)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %27

27:                                               ; preds = %86, %3
  %28 = load i32, ptr %8, align 4, !tbaa !9
  %29 = call noundef i32 @_ZNK3imp10FloatImage5widthEv(ptr noundef nonnull align 8 dereferenceable(88) %16)
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %27
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %89

32:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %76, %32
  %34 = load i32, ptr %10, align 4, !tbaa !9
  %35 = call noundef i32 @_ZNK3imp10FloatImage6heightEv(ptr noundef nonnull align 8 dereferenceable(88) %16)
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %33
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %85

38:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 40, ptr %11) #3
  call void @_ZN3imp4Vec4C2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11)
  call void @llvm.lifetime.start.p0(i64 40, ptr %12) #3
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp10FloatImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %39) #3
  %41 = load i32, ptr %8, align 4, !tbaa !9
  %42 = load i32, ptr %10, align 4, !tbaa !9
  invoke void @_ZNK3imp10FloatImage8getPixelEii(ptr dead_on_unwind writable sret(%"class.imp::Vec4") align 8 %12, ptr noundef nonnull align 8 dereferenceable(88) %40, i32 noundef %41, i32 noundef %42)
          to label %43 unwind label %49

43:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %65, %43
  %45 = load i32, ptr %15, align 4, !tbaa !9
  %46 = load i32, ptr %7, align 4, !tbaa !9
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %53, label %48

48:                                               ; preds = %44
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  br label %72

49:                                               ; preds = %38
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %13, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %14, align 4
  br label %84

53:                                               ; preds = %44
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = load i32, ptr %15, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef %56) #3
  %58 = load i32, ptr %57, align 4, !tbaa !9
  %59 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40) %12, i32 noundef %58)
          to label %60 unwind label %68

60:                                               ; preds = %53
  %61 = load float, ptr %59, align 4, !tbaa !11
  %62 = load i32, ptr %15, align 4, !tbaa !9
  %63 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40) %11, i32 noundef %62)
          to label %64 unwind label %68

64:                                               ; preds = %60
  store float %61, ptr %63, align 4, !tbaa !11
  br label %65

65:                                               ; preds = %64
  %66 = load i32, ptr %15, align 4, !tbaa !9
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %15, align 4, !tbaa !9
  br label %44, !llvm.loop !13

68:                                               ; preds = %60, %53
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %13, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  br label %83

72:                                               ; preds = %48
  %73 = load i32, ptr %8, align 4, !tbaa !9
  %74 = load i32, ptr %10, align 4, !tbaa !9
  invoke void @_ZN3imp10FloatImage8setPixelEiiRKNS_4Vec4E(ptr noundef nonnull align 8 dereferenceable(88) %16, i32 noundef %73, i32 noundef %74, ptr noundef nonnull align 8 dereferenceable(40) %11)
          to label %75 unwind label %79

75:                                               ; preds = %72
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %12) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %12) #3
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #3
  br label %76

76:                                               ; preds = %75
  %77 = load i32, ptr %10, align 4, !tbaa !9
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %10, align 4, !tbaa !9
  br label %33, !llvm.loop !15

79:                                               ; preds = %72
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %13, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %14, align 4
  br label %83

83:                                               ; preds = %79, %68
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %12) #3
  br label %84

84:                                               ; preds = %83, %49
  call void @llvm.lifetime.end.p0(i64 40, ptr %12) #3
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %90

85:                                               ; preds = %37
  br label %86

86:                                               ; preds = %85
  %87 = load i32, ptr %8, align 4, !tbaa !9
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %8, align 4, !tbaa !9
  br label %27, !llvm.loop !16

89:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  ret void

90:                                               ; preds = %84
  %91 = load ptr, ptr %13, align 8
  %92 = load i32, ptr %14, align 4
  %93 = insertvalue { ptr, i32 } poison, ptr %91, 0
  %94 = insertvalue { ptr, i32 } %93, i32 %92, 1
  resume { ptr, i32 } %94
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp10FloatImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3imp10FloatImage5widthEv(ptr noundef nonnull align 8 dereferenceable(88)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3imp10FloatImage6heightEv(ptr noundef nonnull align 8 dereferenceable(88)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp4Vec4C2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3imp10FloatImage8getPixelEii(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec4") align 8, ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, i32 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp10FloatImage8setPixelEiiRKNS_4Vec4E(ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(40)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


; 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.imp::Vec4" = type { %"class.imp::Vec.6" }
%"class.imp::Vec.6" = type { %"class.imp::Object", [4 x float] }
%"class.imp::Object" = type { ptr, %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp10FloatImage6resizeEiii(ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress 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 @_ZN3imp10FloatImage4copyERKSt10shared_ptrIS0_ERKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.imp::Vec4", align 8
  %5 = alloca %"class.imp::Vec4", align 8
  %6 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  %7 = trunc i64 %6 to i32
  %8 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp10FloatImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #3
  %9 = tail call noundef i32 @_ZNK3imp10FloatImage5widthEv(ptr noundef nonnull align 8 dereferenceable(88) %8)
  %10 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp10FloatImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #3
  %11 = tail call noundef i32 @_ZNK3imp10FloatImage6heightEv(ptr noundef nonnull align 8 dereferenceable(88) %10)
  tail call void @_ZN3imp10FloatImage6resizeEiii(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef %9, i32 noundef %11, i32 noundef %7)
  %12 = tail call noundef i32 @_ZNK3imp10FloatImage5widthEv(ptr noundef nonnull align 8 dereferenceable(88) %0)
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.preheader26.lr.ph, label %._crit_edge

.preheader26.lr.ph:                               ; preds = %3
  %14 = icmp sgt i32 %7, 0
  br i1 %14, label %.preheader26.us.preheader, label %.preheader26

.preheader26.us.preheader:                        ; preds = %.preheader26.lr.ph
  %wide.trip.count = and i64 %6, 2147483647
  br label %.preheader26.us

.preheader26.us:                                  ; preds = %.preheader26.us.preheader, %._crit_edge30.split.us.us
  %.02434.us = phi i32 [ %17, %._crit_edge30.split.us.us ], [ 0, %.preheader26.us.preheader ]
  %15 = call noundef i32 @_ZNK3imp10FloatImage6heightEv(ptr noundef nonnull align 8 dereferenceable(88) %0)
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %.lr.ph29.us, label %._crit_edge30.split.us.us

._crit_edge30.split.us.us:                        ; preds = %21, %.preheader26.us
  %17 = add nuw nsw i32 %.02434.us, 1
  %18 = call noundef i32 @_ZNK3imp10FloatImage5widthEv(ptr noundef nonnull align 8 dereferenceable(88) %0)
  %19 = icmp slt i32 %17, %18
  br i1 %19, label %.preheader26.us, label %._crit_edge, !llvm.loop !5

.lr.ph29.us:                                      ; preds = %.preheader26.us, %21
  %.02328.us.us = phi i32 [ %22, %21 ], [ 0, %.preheader26.us ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #3
  call void @_ZN3imp4Vec4C2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #3
  %20 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp10FloatImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #3
  invoke void @_ZNK3imp10FloatImage8getPixelEii(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec4") align 8 %5, ptr noundef nonnull align 8 dereferenceable(88) %20, i32 noundef %.02434.us, i32 noundef %.02328.us.us)
          to label %.preheader.us.us unwind label %.split.us.split.us

21:                                               ; preds = %._crit_edge.us.us
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #3
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #3
  %22 = add nuw nsw i32 %.02328.us.us, 1
  %23 = call noundef i32 @_ZNK3imp10FloatImage6heightEv(ptr noundef nonnull align 8 dereferenceable(88) %0)
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %.lr.ph29.us, label %._crit_edge30.split.us.us, !llvm.loop !7

.preheader.us.us:                                 ; preds = %.lr.ph29.us, %.preheader.us.us
  %indvars.iv = phi i64 [ %indvars.iv.next, %.preheader.us.us ], [ 0, %.lr.ph29.us ]
  %25 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv) #3
  %26 = load i32, ptr %25, align 4, !tbaa !8
  %27 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40) %5, i32 noundef %26)
  %28 = load float, ptr %27, align 4, !tbaa !12
  %29 = trunc nuw nsw i64 %indvars.iv to i32
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40) %4, i32 noundef %29)
  store float %28, ptr %30, 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.us, label %.preheader.us.us, !llvm.loop !14

._crit_edge.us.us:                                ; preds = %.preheader.us.us
  invoke void @_ZN3imp10FloatImage8setPixelEiiRKNS_4Vec4E(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef %.02434.us, i32 noundef %.02328.us.us, ptr noundef nonnull align 8 dereferenceable(40) %4)
          to label %21 unwind label %.split32.us.split.us

.split.us.split.us:                               ; preds = %.lr.ph29.us
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %46

.split32.us.split.us:                             ; preds = %._crit_edge.us.us
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %45

.preheader26:                                     ; preds = %.preheader26.lr.ph, %._crit_edge30.split
  %.02434 = phi i32 [ %35, %._crit_edge30.split ], [ 0, %.preheader26.lr.ph ]
  %33 = call noundef i32 @_ZNK3imp10FloatImage6heightEv(ptr noundef nonnull align 8 dereferenceable(88) %0)
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %.lr.ph29, label %._crit_edge30.split

._crit_edge:                                      ; preds = %._crit_edge30.split, %._crit_edge30.split.us.us, %3
  ret void

._crit_edge30.split:                              ; preds = %40, %.preheader26
  %35 = add nuw nsw i32 %.02434, 1
  %36 = call noundef i32 @_ZNK3imp10FloatImage5widthEv(ptr noundef nonnull align 8 dereferenceable(88) %0)
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %.preheader26, label %._crit_edge, !llvm.loop !5

.lr.ph29:                                         ; preds = %.preheader26, %40
  %.02328 = phi i32 [ %41, %40 ], [ 0, %.preheader26 ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #3
  call void @_ZN3imp4Vec4C2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #3
  %38 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp10FloatImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #3
  invoke void @_ZNK3imp10FloatImage8getPixelEii(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec4") align 8 %5, ptr noundef nonnull align 8 dereferenceable(88) %38, i32 noundef %.02434, i32 noundef %.02328)
          to label %.preheader unwind label %.split

.preheader:                                       ; preds = %.lr.ph29
  invoke void @_ZN3imp10FloatImage8setPixelEiiRKNS_4Vec4E(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef %.02434, i32 noundef %.02328, ptr noundef nonnull align 8 dereferenceable(40) %4)
          to label %40 unwind label %.split32

.split:                                           ; preds = %.lr.ph29
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %46

40:                                               ; preds = %.preheader
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #3
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #3
  %41 = add nuw nsw i32 %.02328, 1
  %42 = call noundef i32 @_ZNK3imp10FloatImage6heightEv(ptr noundef nonnull align 8 dereferenceable(88) %0)
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %.lr.ph29, label %._crit_edge30.split, !llvm.loop !7

.split32:                                         ; preds = %.preheader
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %45

45:                                               ; preds = %.split32.us.split.us, %.split32
  %.us-phi33 = phi { ptr, i32 } [ %44, %.split32 ], [ %32, %.split32.us.split.us ]
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #3
  br label %46

46:                                               ; preds = %.split, %.split.us.split.us, %45
  %.pn = phi { ptr, i32 } [ %.us-phi33, %45 ], [ %39, %.split ], [ %31, %.split.us.split.us ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #3
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #3
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp10FloatImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3imp10FloatImage5widthEv(ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3imp10FloatImage6heightEv(ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp4Vec4C2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3imp10FloatImage8getPixelEii(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec4") align 8, ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp10FloatImage8setPixelEiiRKNS_4Vec4E(ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !10, i64 0}
!14 = distinct !{!14, !6}


; Effective O3 passes: GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass