; LLVM IR from vectozavr/3dzavr :: engine/io/Image.ll (ZN5ImageC2ERKSt6vectorIjSaIjEEtt)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%class.Image = type { i16, i16, ptr, i8, %class.FilePath }
%class.FilePath = type { %"class.std::filesystem::__cxx11::path" }
%"class.std::filesystem::__cxx11::path" = type { %"class.std::__cxx11::basic_string", %"struct.std::filesystem::__cxx11::path::_List" }
%"struct.std::filesystem::__cxx11::path::_List" = type { %"class.std::unique_ptr" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.2" }
%"struct.std::_Head_base.2" = type { ptr }

@.str.17 = external hidden unnamed_addr constant [1 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

; 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

declare void @_ZN8FilePathC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8FilePathD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5ImageC2ERKSt6vectorIjSaIjEEtt(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i16 noundef zeroext %2, i16 noundef zeroext %3) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i16, align 2
  %8 = alloca i16, align 2
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i8, align 1
  %19 = alloca i8, align 1
  %20 = alloca i8, align 1
  %21 = alloca i8, align 1
  %22 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i16 %2, ptr %7, align 2, !tbaa !9
  store i16 %3, ptr %8, align 2, !tbaa !9
  %23 = load ptr, ptr %5, align 8
  %24 = getelementptr inbounds %class.Image, ptr %23, i32 0, i32 0
  %25 = load i16, ptr %7, align 2, !tbaa !9
  store i16 %25, ptr %24, align 8, !tbaa !11
  %26 = getelementptr inbounds %class.Image, ptr %23, i32 0, i32 1
  %27 = load i16, ptr %8, align 2, !tbaa !9
  store i16 %27, ptr %26, align 2, !tbaa !26
  %28 = getelementptr inbounds %class.Image, ptr %23, i32 0, i32 2
  store ptr null, ptr %28, align 8, !tbaa !27
  %29 = getelementptr inbounds %class.Image, ptr %23, i32 0, i32 3
  store i8 0, ptr %29, align 8, !tbaa !28
  %30 = getelementptr inbounds %class.Image, ptr %23, i32 0, i32 4
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef @.str.17, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %31 unwind label %51

31:                                               ; preds = %4
  invoke void @_ZN8FilePathC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %30, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %32 unwind label %55

32:                                               ; preds = %31
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  %33 = getelementptr inbounds %class.Image, ptr %23, i32 0, i32 1
  %34 = load i16, ptr %33, align 2, !tbaa !26
  %35 = zext i16 %34 to i32
  %36 = getelementptr inbounds %class.Image, ptr %23, i32 0, i32 0
  %37 = load i16, ptr %36, align 8, !tbaa !11
  %38 = zext i16 %37 to i32
  %39 = mul nsw i32 %35, %38
  %40 = mul nsw i32 %39, 4
  %41 = sext i32 %40 to i64
  %42 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %41) #7
          to label %43 unwind label %60

43:                                               ; preds = %32
  %44 = getelementptr inbounds %class.Image, ptr %23, i32 0, i32 2
  store ptr %42, ptr %44, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !29
  br label %45

45:                                               ; preds = %132, %43
  %46 = load i32, ptr %13, align 4, !tbaa !29
  %47 = load i16, ptr %8, align 2, !tbaa !9
  %48 = zext i16 %47 to i32
  %49 = icmp slt i32 %46, %48
  br i1 %49, label %64, label %50

50:                                               ; preds = %45
  store i32 2, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %135

51:                                               ; preds = %4
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %11, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %12, align 4
  br label %59

55:                                               ; preds = %31
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %11, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  br label %59

59:                                               ; preds = %55, %51
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  br label %137

60:                                               ; preds = %32
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %11, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %12, align 4
  call void @_ZN8FilePathD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %30) #6
  br label %137

64:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !29
  br label %65

65:                                               ; preds = %128, %64
  %66 = load i32, ptr %15, align 4, !tbaa !29
  %67 = load i16, ptr %7, align 2, !tbaa !9
  %68 = zext i16 %67 to i32
  %69 = icmp slt i32 %66, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %65
  store i32 5, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %131

71:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %72 = load i32, ptr %15, align 4, !tbaa !29
  %73 = load i32, ptr %13, align 4, !tbaa !29
  %74 = load i16, ptr %7, align 2, !tbaa !9
  %75 = zext i16 %74 to i32
  %76 = mul nsw i32 %73, %75
  %77 = add nsw i32 %72, %76
  store i32 %77, ptr %16, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = load i32, ptr %16, align 4, !tbaa !29
  %80 = sext i32 %79 to i64
  %81 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %78, i64 noundef %80) #6
  %82 = load i32, ptr %81, align 4, !tbaa !29
  store i32 %82, ptr %17, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #6
  %83 = load i32, ptr %17, align 4, !tbaa !29
  %84 = lshr i32 %83, 24
  %85 = and i32 %84, 255
  %86 = trunc i32 %85 to i8
  store i8 %86, ptr %18, align 1, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #6
  %87 = load i32, ptr %17, align 4, !tbaa !29
  %88 = lshr i32 %87, 16
  %89 = and i32 %88, 255
  %90 = trunc i32 %89 to i8
  store i8 %90, ptr %19, align 1, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #6
  %91 = load i32, ptr %17, align 4, !tbaa !29
  %92 = lshr i32 %91, 8
  %93 = and i32 %92, 255
  %94 = trunc i32 %93 to i8
  store i8 %94, ptr %20, align 1, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #6
  %95 = load i32, ptr %17, align 4, !tbaa !29
  %96 = and i32 %95, 255
  %97 = trunc i32 %96 to i8
  store i8 %97, ptr %21, align 1, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %98 = load i32, ptr %16, align 4, !tbaa !29
  %99 = mul nsw i32 %98, 4
  store i32 %99, ptr %22, align 4, !tbaa !29
  %100 = load i8, ptr %18, align 1, !tbaa !31
  %101 = getelementptr inbounds %class.Image, ptr %23, i32 0, i32 2
  %102 = load ptr, ptr %101, align 8, !tbaa !27
  %103 = load i32, ptr %22, align 4, !tbaa !29
  %104 = add nsw i32 %103, 0
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds i8, ptr %102, i64 %105
  store i8 %100, ptr %106, align 1, !tbaa !31
  %107 = load i8, ptr %19, align 1, !tbaa !31
  %108 = getelementptr inbounds %class.Image, ptr %23, i32 0, i32 2
  %109 = load ptr, ptr %108, align 8, !tbaa !27
  %110 = load i32, ptr %22, align 4, !tbaa !29
  %111 = add nsw i32 %110, 1
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds i8, ptr %109, i64 %112
  store i8 %107, ptr %113, align 1, !tbaa !31
  %114 = load i8, ptr %20, align 1, !tbaa !31
  %115 = getelementptr inbounds %class.Image, ptr %23, i32 0, i32 2
  %116 = load ptr, ptr %115, align 8, !tbaa !27
  %117 = load i32, ptr %22, align 4, !tbaa !29
  %118 = add nsw i32 %117, 2
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds i8, ptr %116, i64 %119
  store i8 %114, ptr %120, align 1, !tbaa !31
  %121 = load i8, ptr %21, align 1, !tbaa !31
  %122 = getelementptr inbounds %class.Image, ptr %23, i32 0, i32 2
  %123 = load ptr, ptr %122, align 8, !tbaa !27
  %124 = load i32, ptr %22, align 4, !tbaa !29
  %125 = add nsw i32 %124, 3
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds i8, ptr %123, i64 %126
  store i8 %121, ptr %127, align 1, !tbaa !31
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %128

128:                                              ; preds = %71
  %129 = load i32, ptr %15, align 4, !tbaa !29
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %15, align 4, !tbaa !29
  br label %65, !llvm.loop !32

131:                                              ; preds = %70
  br label %132

132:                                              ; preds = %131
  %133 = load i32, ptr %13, align 4, !tbaa !29
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %13, align 4, !tbaa !29
  br label %45, !llvm.loop !34

135:                                              ; preds = %50
  %136 = getelementptr inbounds %class.Image, ptr %23, i32 0, i32 3
  store i8 1, ptr %136, align 8, !tbaa !28
  ret void

137:                                              ; preds = %60, %59
  %138 = load ptr, ptr %11, align 8
  %139 = load i32, ptr %12, align 4
  %140 = insertvalue { ptr, i32 } poison, ptr %138, 0
  %141 = insertvalue { ptr, i32 } %140, i32 %139, 1
  resume { ptr, i32 } %141
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #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 = { "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 = { 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 #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }

!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 = !{!"short", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTS5Image", !10, i64 0, !10, i64 2, !6, i64 8, !13, i64 16, !14, i64 24}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTS8FilePath", !15, i64 0}
!15 = !{!"_ZTSNSt10filesystem7__cxx114pathE", !16, i64 0, !19, i64 32}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !17, i64 0, !18, i64 8, !7, i64 16}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSNSt10filesystem7__cxx114path5_ListE", !20, i64 0}
!20 = !{!"_ZTSSt10unique_ptrINSt10filesystem7__cxx114path5_List5_ImplENS3_13_Impl_deleterEE", !21, i64 0}
!21 = !{!"_ZTSSt15__uniq_ptr_dataINSt10filesystem7__cxx114path5_List5_ImplENS3_13_Impl_deleterELb1ELb1EE", !22, i64 0}
!22 = !{!"_ZTSSt15__uniq_ptr_implINSt10filesystem7__cxx114path5_List5_ImplENS3_13_Impl_deleterEE", !23, i64 0}
!23 = !{!"_ZTSSt5tupleIJPNSt10filesystem7__cxx114path5_List5_ImplENS3_13_Impl_deleterEEE", !24, i64 0}
!24 = !{!"_ZTSSt11_Tuple_implILm0EJPNSt10filesystem7__cxx114path5_List5_ImplENS3_13_Impl_deleterEEE", !25, i64 0}
!25 = !{!"_ZTSSt10_Head_baseILm0EPNSt10filesystem7__cxx114path5_List5_ImplELb0EE", !6, i64 0}
!26 = !{!12, !10, i64 2}
!27 = !{!12, !6, i64 8}
!28 = !{!12, !13, i64 16}
!29 = !{!30, !30, i64 0}
!30 = !{!"int", !7, i64 0}
!31 = !{!7, !7, i64 0}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = distinct !{!34, !33}


; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@.str.17 = external hidden unnamed_addr constant [1 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

declare void @_ZN8FilePathC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8FilePathD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5ImageC2ERKSt6vectorIjSaIjEEtt(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i16 noundef zeroext %2, i16 noundef zeroext %3) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator", align 1
  store i16 %2, ptr %0, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 2
  store i16 %3, ptr %7, align 2, !tbaa !24
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr null, ptr %8, align 8, !tbaa !25
  %9 = getelementptr inbounds i8, ptr %0, i64 16
  store i8 0, ptr %9, align 8, !tbaa !26
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.17, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %11 unwind label %47

11:                                               ; preds = %4
  invoke void @_ZN8FilePathC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %10, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %12 unwind label %49

12:                                               ; preds = %11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  %13 = load i16, ptr %7, align 2, !tbaa !24
  %14 = zext i16 %13 to i64
  %15 = load i16, ptr %0, align 8, !tbaa !5
  %16 = zext i16 %15 to i64
  %17 = shl nuw nsw i64 %14, 2
  %18 = mul nuw nsw i64 %17, %16
  %19 = and i64 %18, 4294967292
  %20 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %19) #7
          to label %21 unwind label %52

21:                                               ; preds = %12
  store ptr %20, ptr %8, align 8, !tbaa !25
  %.not = icmp eq i16 %3, 0
  %.not39 = icmp eq i16 %2, 0
  %or.cond = or i1 %.not, %.not39
  br i1 %or.cond, label %._crit_edge38, label %.preheader.us.preheader

.preheader.us.preheader:                          ; preds = %21
  %22 = zext i16 %2 to i64
  %wide.trip.count45 = zext i16 %3 to i64
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us
  %indvars.iv42 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next43, %._crit_edge.us ]
  %23 = mul nuw nsw i64 %indvars.iv42, %22
  br label %24

24:                                               ; preds = %.preheader.us, %24
  %indvars.iv = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next, %24 ]
  %25 = add nuw nsw i64 %indvars.iv, %23
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %25) #6
  %27 = load i32, ptr %26, align 4, !tbaa !27
  %28 = lshr i32 %27, 24
  %29 = trunc nuw i32 %28 to i8
  %30 = lshr i32 %27, 16
  %31 = trunc i32 %30 to i8
  %32 = lshr i32 %27, 8
  %33 = trunc i32 %32 to i8
  %34 = trunc i32 %27 to i8
  %35 = shl nsw i64 %25, 2
  %36 = load ptr, ptr %8, align 8, !tbaa !25
  %37 = getelementptr inbounds i8, ptr %36, i64 %35
  store i8 %29, ptr %37, align 1, !tbaa !29
  %38 = load ptr, ptr %8, align 8, !tbaa !25
  %39 = or disjoint i64 %35, 1
  %40 = getelementptr inbounds i8, ptr %38, i64 %39
  store i8 %31, ptr %40, align 1, !tbaa !29
  %41 = load ptr, ptr %8, align 8, !tbaa !25
  %42 = or disjoint i64 %35, 2
  %43 = getelementptr inbounds i8, ptr %41, i64 %42
  store i8 %33, ptr %43, align 1, !tbaa !29
  %44 = load ptr, ptr %8, align 8, !tbaa !25
  %45 = or disjoint i64 %35, 3
  %46 = getelementptr inbounds i8, ptr %44, i64 %45
  store i8 %34, ptr %46, align 1, !tbaa !29
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %22
  br i1 %exitcond.not, label %._crit_edge.us, label %24, !llvm.loop !30

._crit_edge.us:                                   ; preds = %24
  %indvars.iv.next43 = add nuw nsw i64 %indvars.iv42, 1
  %exitcond46.not = icmp eq i64 %indvars.iv.next43, %wide.trip.count45
  br i1 %exitcond46.not, label %._crit_edge38, label %.preheader.us, !llvm.loop !32

._crit_edge38:                                    ; preds = %._crit_edge.us, %21
  store i8 1, ptr %9, align 8, !tbaa !26
  ret void

47:                                               ; preds = %4
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %51

49:                                               ; preds = %11
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  br label %51

51:                                               ; preds = %49, %47
  %.pn = phi { ptr, i32 } [ %50, %49 ], [ %48, %47 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  br label %54

52:                                               ; preds = %12
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN8FilePathD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #6
  br label %54

54:                                               ; preds = %52, %51
  %.pn34 = phi { ptr, i32 } [ %53, %52 ], [ %.pn, %51 ]
  resume { ptr, i32 } %.pn34
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_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 = { "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 = { 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 #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }

!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, !7, i64 0}
!6 = !{!"_ZTS5Image", !7, i64 0, !7, i64 2, !10, i64 8, !11, i64 16, !12, i64 24}
!7 = !{!"short", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"_ZTS8FilePath", !13, i64 0}
!13 = !{!"_ZTSNSt10filesystem7__cxx114pathE", !14, i64 0, !17, i64 32}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !15, i64 0, !16, i64 8, !8, i64 16}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !10, i64 0}
!16 = !{!"long", !8, i64 0}
!17 = !{!"_ZTSNSt10filesystem7__cxx114path5_ListE", !18, i64 0}
!18 = !{!"_ZTSSt10unique_ptrINSt10filesystem7__cxx114path5_List5_ImplENS3_13_Impl_deleterEE", !19, i64 0}
!19 = !{!"_ZTSSt15__uniq_ptr_dataINSt10filesystem7__cxx114path5_List5_ImplENS3_13_Impl_deleterELb1ELb1EE", !20, i64 0}
!20 = !{!"_ZTSSt15__uniq_ptr_implINSt10filesystem7__cxx114path5_List5_ImplENS3_13_Impl_deleterEE", !21, i64 0}
!21 = !{!"_ZTSSt5tupleIJPNSt10filesystem7__cxx114path5_List5_ImplENS3_13_Impl_deleterEEE", !22, i64 0}
!22 = !{!"_ZTSSt11_Tuple_implILm0EJPNSt10filesystem7__cxx114path5_List5_ImplENS3_13_Impl_deleterEEE", !23, i64 0}
!23 = !{!"_ZTSSt10_Head_baseILm0EPNSt10filesystem7__cxx114path5_List5_ImplELb0EE", !10, i64 0}
!24 = !{!6, !7, i64 2}
!25 = !{!6, !10, i64 8}
!26 = !{!6, !11, i64 16}
!27 = !{!28, !28, i64 0}
!28 = !{!"int", !8, i64 0}
!29 = !{!8, !8, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass