; LLVM IR from Razakhel/RaZ :: src/RaZ/Data/MeshDistanceField.ll (ZNK3Raz17MeshDistanceField13recoverSlicesEv)

; 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.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<Raz::Image, std::allocator<Raz::Image>>::_Vector_impl" }
%"struct.std::_Vector_base<Raz::Image, std::allocator<Raz::Image>>::_Vector_impl" = type { %"struct.std::_Vector_base<Raz::Image, std::allocator<Raz::Image>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Raz::Image, std::allocator<Raz::Image>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Raz::MeshDistanceField" = type { %"class.Raz::AABB", i32, i32, i32, %"class.std::vector", ptr }
%"class.Raz::AABB" = type { %"class.Raz::Shape", %"class.Raz::Vector", %"class.Raz::Vector" }
%"class.Raz::Shape" = type { ptr }
%"class.Raz::Vector" = type { %"struct.std::array" }
%"struct.std::array" = type { [3 x float] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3Raz17MeshDistanceField11getDistanceEmmm(ptr noundef nonnull align 8 dereferenceable(80), i64 noundef, i64 noundef, i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3Raz17MeshDistanceField13recoverSlicesEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.0") align 8 %0, ptr noundef nonnull align 8 dereferenceable(80) %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca float, align 4
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %16 = load ptr, ptr %4, align 8
  store i1 false, ptr %5, align 1
  call void @_ZNSt6vectorIN3Raz5ImageESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  %17 = getelementptr inbounds %"class.Raz::MeshDistanceField", ptr %16, i32 0, i32 3
  %18 = load i32, ptr %17, align 8, !tbaa !9
  %19 = zext i32 %18 to i64
  invoke void @_ZNSt6vectorIN3Raz5ImageESaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %19)
          to label %20 unwind label %28

20:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  store i64 0, ptr %8, align 8, !tbaa !20
  br label %21

21:                                               ; preds = %78, %20
  %22 = load i64, ptr %8, align 8, !tbaa !20
  %23 = getelementptr inbounds %"class.Raz::MeshDistanceField", ptr %16, i32 0, i32 3
  %24 = load i32, ptr %23, align 8, !tbaa !9
  %25 = zext i32 %24 to i64
  %26 = icmp ult i64 %22, %25
  br i1 %26, label %32, label %27

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

28:                                               ; preds = %2
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %6, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %7, align 4
  br label %86

32:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %33 = getelementptr inbounds %"class.Raz::MeshDistanceField", ptr %16, i32 0, i32 1
  %34 = getelementptr inbounds %"class.Raz::MeshDistanceField", ptr %16, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 0, ptr %11, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store i32 1, ptr %12, align 4, !tbaa !24
  %35 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN3Raz5ImageESaIS1_EE12emplace_backIJRKjS6_NS0_15ImageColorspaceENS0_13ImageDataTypeEEEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %33, ptr noundef nonnull align 4 dereferenceable(4) %34, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %36 unwind label %44

36:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  store ptr %35, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  store i64 0, ptr %13, align 8, !tbaa !20
  br label %37

37:                                               ; preds = %74, %36
  %38 = load i64, ptr %13, align 8, !tbaa !20
  %39 = getelementptr inbounds %"class.Raz::MeshDistanceField", ptr %16, i32 0, i32 2
  %40 = load i32, ptr %39, align 4, !tbaa !26
  %41 = zext i32 %40 to i64
  %42 = icmp ult i64 %38, %41
  br i1 %42, label %48, label %43

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

44:                                               ; preds = %32
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %6, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %81

48:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  store i64 0, ptr %14, align 8, !tbaa !20
  br label %49

49:                                               ; preds = %66, %48
  %50 = load i64, ptr %14, align 8, !tbaa !20
  %51 = getelementptr inbounds %"class.Raz::MeshDistanceField", ptr %16, i32 0, i32 1
  %52 = load i32, ptr %51, align 8, !tbaa !27
  %53 = zext i32 %52 to i64
  %54 = icmp ult i64 %50, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %49
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  br label %73

56:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  %57 = load i64, ptr %14, align 8, !tbaa !20
  %58 = load i64, ptr %13, align 8, !tbaa !20
  %59 = load i64, ptr %8, align 8, !tbaa !20
  %60 = call noundef float @_ZNK3Raz17MeshDistanceField11getDistanceEmmm(ptr noundef nonnull align 8 dereferenceable(80) %16, i64 noundef %57, i64 noundef %58, i64 noundef %59)
  store float %60, ptr %15, align 4, !tbaa !28
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = load i64, ptr %14, align 8, !tbaa !20
  %63 = load i64, ptr %13, align 8, !tbaa !20
  %64 = load float, ptr %15, align 4, !tbaa !28
  invoke void @_ZN3Raz5Image8setPixelIfEEvmmT_(ptr noundef nonnull align 8 dereferenceable(32) %61, i64 noundef %62, i64 noundef %63, float noundef %64)
          to label %65 unwind label %69

65:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  br label %66

66:                                               ; preds = %65
  %67 = load i64, ptr %14, align 8, !tbaa !20
  %68 = add i64 %67, 1
  store i64 %68, ptr %14, align 8, !tbaa !20
  br label %49, !llvm.loop !30

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

73:                                               ; preds = %55
  br label %74

74:                                               ; preds = %73
  %75 = load i64, ptr %13, align 8, !tbaa !20
  %76 = add i64 %75, 1
  store i64 %76, ptr %13, align 8, !tbaa !20
  br label %37, !llvm.loop !32

77:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br label %78

78:                                               ; preds = %77
  %79 = load i64, ptr %8, align 8, !tbaa !20
  %80 = add i64 %79, 1
  store i64 %80, ptr %8, align 8, !tbaa !20
  br label %21, !llvm.loop !33

81:                                               ; preds = %69, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  br label %86

82:                                               ; preds = %27
  store i1 true, ptr %5, align 1
  store i32 1, ptr %9, align 4
  %83 = load i1, ptr %5, align 1
  br i1 %83, label %85, label %84

84:                                               ; preds = %82
  call void @_ZNSt6vectorIN3Raz5ImageESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  br label %85

85:                                               ; preds = %84, %82
  ret void

86:                                               ; preds = %81, %28
  call void @_ZNSt6vectorIN3Raz5ImageESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  br label %87

87:                                               ; preds = %86
  %88 = load ptr, ptr %6, align 8
  %89 = load i32, ptr %7, align 4
  %90 = insertvalue { ptr, i32 } poison, ptr %88, 0
  %91 = insertvalue { ptr, i32 } %90, i32 %89, 1
  resume { ptr, i32 } %91
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Raz5Image8setPixelIfEEvmmT_(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i64 noundef, float noundef) #2 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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, !15, i64 40}
!10 = !{!"_ZTSN3Raz17MeshDistanceFieldE", !11, i64 0, !15, i64 32, !15, i64 36, !15, i64 40, !16, i64 48, !6, i64 72}
!11 = !{!"_ZTSN3Raz4AABBE", !12, i64 0, !13, i64 8, !13, i64 20}
!12 = !{!"_ZTSN3Raz5ShapeE"}
!13 = !{!"_ZTSN3Raz6VectorIfLm3EEE", !14, i64 0}
!14 = !{!"_ZTSSt5arrayIfLm3EE", !7, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSSt6vectorIfSaIfEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!21, !21, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"_ZTSN3Raz15ImageColorspaceE", !7, i64 0}
!24 = !{!25, !25, i64 0}
!25 = !{!"_ZTSN3Raz13ImageDataTypeE", !7, i64 0}
!26 = !{!10, !15, i64 36}
!27 = !{!10, !15, i64 32}
!28 = !{!29, !29, i64 0}
!29 = !{!"float", !7, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}
!33 = distinct !{!33, !31}


; 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.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<Raz::Image, std::allocator<Raz::Image>>::_Vector_impl" }
%"struct.std::_Vector_base<Raz::Image, std::allocator<Raz::Image>>::_Vector_impl" = type { %"struct.std::_Vector_base<Raz::Image, std::allocator<Raz::Image>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Raz::Image, std::allocator<Raz::Image>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3Raz17MeshDistanceField11getDistanceEmmm(ptr noundef nonnull align 8 dereferenceable(80), i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3Raz17MeshDistanceField13recoverSlicesEv(ptr dead_on_unwind noalias nonnull writable sret(%"class.std::vector.0") align 8 %0, ptr noundef nonnull align 8 dereferenceable(80) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  tail call void @_ZNSt6vectorIN3Raz5ImageESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  %5 = getelementptr inbounds i8, ptr %1, i64 40
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = zext i32 %6 to i64
  invoke void @_ZNSt6vectorIN3Raz5ImageESaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %7)
          to label %.preheader23 unwind label %11

.preheader23:                                     ; preds = %2
  %8 = load i32, ptr %5, align 8, !tbaa !5
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %._crit_edge29, label %.lr.ph28

.lr.ph28:                                         ; preds = %.preheader23
  %9 = getelementptr inbounds i8, ptr %1, i64 32
  %10 = getelementptr inbounds i8, ptr %1, i64 36
  br label %13

11:                                               ; preds = %2
  %12 = landingpad { ptr, i32 }
          cleanup
  br label %38

13:                                               ; preds = %.lr.ph28, %._crit_edge26
  %.01827 = phi i64 [ 0, %.lr.ph28 ], [ %19, %._crit_edge26 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  store i32 0, ptr %3, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  store i32 1, ptr %4, align 4, !tbaa !21
  %14 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN3Raz5ImageESaIS1_EE12emplace_backIJRKjS6_NS0_15ImageColorspaceENS0_13ImageDataTypeEEEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %15 unwind label %23

15:                                               ; preds = %13
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  %16 = load i32, ptr %10, align 4, !tbaa !23
  %.not30 = icmp eq i32 %16, 0
  br i1 %.not30, label %._crit_edge26, label %.preheader.preheader

.preheader.preheader:                             ; preds = %15
  %.pre = load i32, ptr %9, align 8, !tbaa !24
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge
  %17 = phi i32 [ %25, %._crit_edge ], [ %16, %.preheader.preheader ]
  %18 = phi i32 [ %26, %._crit_edge ], [ %.pre, %.preheader.preheader ]
  %.01625 = phi i64 [ %27, %._crit_edge ], [ 0, %.preheader.preheader ]
  %.not31 = icmp eq i32 %18, 0
  br i1 %.not31, label %._crit_edge, label %.lr.ph

._crit_edge26:                                    ; preds = %._crit_edge, %15
  %19 = add nuw nsw i64 %.01827, 1
  %20 = load i32, ptr %5, align 8, !tbaa !5
  %21 = zext i32 %20 to i64
  %22 = icmp ult i64 %19, %21
  br i1 %22, label %13, label %._crit_edge29, !llvm.loop !25

23:                                               ; preds = %13
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %38

._crit_edge.loopexit:                             ; preds = %31
  %.pre32 = load i32, ptr %10, align 4, !tbaa !23
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %25 = phi i32 [ %.pre32, %._crit_edge.loopexit ], [ %17, %.preheader ]
  %26 = phi i32 [ %33, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %27 = add nuw nsw i64 %.01625, 1
  %28 = zext i32 %25 to i64
  %29 = icmp ult i64 %27, %28
  br i1 %29, label %.preheader, label %._crit_edge26, !llvm.loop !27

.lr.ph:                                           ; preds = %.preheader, %31
  %.024 = phi i64 [ %32, %31 ], [ 0, %.preheader ]
  %30 = call noundef float @_ZNK3Raz17MeshDistanceField11getDistanceEmmm(ptr noundef nonnull align 8 dereferenceable(80) %1, i64 noundef %.024, i64 noundef %.01625, i64 noundef %.01827)
  invoke void @_ZN3Raz5Image8setPixelIfEEvmmT_(ptr noundef nonnull align 8 dereferenceable(32) %14, i64 noundef %.024, i64 noundef %.01625, float noundef %30)
          to label %31 unwind label %36

31:                                               ; preds = %.lr.ph
  %32 = add nuw nsw i64 %.024, 1
  %33 = load i32, ptr %9, align 8, !tbaa !24
  %34 = zext i32 %33 to i64
  %35 = icmp ult i64 %32, %34
  br i1 %35, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !28

36:                                               ; preds = %.lr.ph
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %38

._crit_edge29:                                    ; preds = %._crit_edge26, %.preheader23
  ret void

38:                                               ; preds = %23, %36, %11
  %.pn.pn = phi { ptr, i32 } [ %12, %11 ], [ %37, %36 ], [ %24, %23 ]
  call void @_ZNSt6vectorIN3Raz5ImageESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  resume { ptr, i32 } %.pn.pn
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Raz5Image8setPixelIfEEvmmT_(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i64 noundef, float noundef) local_unnamed_addr #2 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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, !13, i64 40}
!6 = !{!"_ZTSN3Raz17MeshDistanceFieldE", !7, i64 0, !13, i64 32, !13, i64 36, !13, i64 40, !14, i64 48, !18, i64 72}
!7 = !{!"_ZTSN3Raz4AABBE", !8, i64 0, !9, i64 8, !9, i64 20}
!8 = !{!"_ZTSN3Raz5ShapeE"}
!9 = !{!"_ZTSN3Raz6VectorIfLm3EEE", !10, i64 0}
!10 = !{!"_ZTSSt5arrayIfLm3EE", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"int", !11, i64 0}
!14 = !{!"_ZTSSt6vectorIfSaIfEE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!18 = !{!"any pointer", !11, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"_ZTSN3Raz15ImageColorspaceE", !11, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"_ZTSN3Raz13ImageDataTypeE", !11, i64 0}
!23 = !{!6, !13, i64 36}
!24 = !{!6, !13, i64 32}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}
!28 = distinct !{!28, !26}


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