; LLVM IR from Shimmen/ArkoseRenderer :: arkose/rendering/backend/shader (Shader)

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

%struct.Shader = type <{ %"class.std::vector", i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ShaderFile, std::allocator<ShaderFile>>::_Vector_impl" }
%"struct.std::_Vector_base<ShaderFile, std::allocator<ShaderFile>>::_Vector_impl" = type { %"struct.std::_Vector_base<ShaderFile, std::allocator<ShaderFile>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ShaderFile, std::allocator<ShaderFile>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.ShaderFile = type <{ %"class.std::filesystem::__cxx11::path", %"class.std::vector.3", %"class.std::__cxx11::basic_string", i32, [4 x i8] }>
%"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.9" }
%"struct.std::_Head_base.9" = type { ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<ShaderDefine, std::allocator<ShaderDefine>>::_Vector_impl" }
%"struct.std::_Vector_base<ShaderDefine, std::allocator<ShaderDefine>>::_Vector_impl" = type { %"struct.std::_Vector_base<ShaderDefine, std::allocator<ShaderDefine>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ShaderDefine, std::allocator<ShaderDefine>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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::initializer_list" = type { ptr, i64 }
%"class.std::allocator" = type { i8 }

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

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

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

declare i32 @__gxx_personality_v0(...)

declare void @_ZN10ShaderFileC1ENSt10filesystem7__cxx114pathE11ShaderStageSt6vectorI12ShaderDefineSaIS5_EE(ptr noundef nonnull align 8 dereferenceable(100), ptr noundef, i32 noundef, ptr noundef) unnamed_addr #2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10ShaderFileC2ERKS_(ptr noundef nonnull align 8 dereferenceable(100), ptr noundef nonnull align 8 dereferenceable(100)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100)) unnamed_addr #5 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI10ShaderFileSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 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 uwtable
define dso_local void @_ZN6Shader17createMeshShadingENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St6vectorI12ShaderDefineSaIS7_EE(ptr dead_on_unwind noalias writable sret(%struct.Shader) align 8 %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %struct.ShaderFile, align 8
  %10 = alloca %"class.std::filesystem::__cxx11::path", align 8
  %11 = alloca %"class.std::vector.3", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %struct.ShaderFile, align 8
  %15 = alloca %"class.std::filesystem::__cxx11::path", align 8
  %16 = alloca %"class.std::vector.3", align 8
  %17 = alloca %"class.std::vector", align 8
  %18 = alloca %"class.std::initializer_list", align 8
  %19 = alloca [2 x %struct.ShaderFile], align 8
  %20 = alloca ptr, align 8
  %21 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 104, ptr %9) #6
  call void @_ZNSt10filesystem7__cxx114pathC2EONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS1_6formatE(ptr noundef nonnull align 8 dereferenceable(40) %10, ptr noundef nonnull align 8 dereferenceable(32) %1, i8 noundef zeroext 2)
  invoke void @_ZNSt6vectorI12ShaderDefineSaIS0_EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %22 unwind label %45

22:                                               ; preds = %4
  invoke void @_ZN10ShaderFileC1ENSt10filesystem7__cxx114pathE11ShaderStageSt6vectorI12ShaderDefineSaIS5_EE(ptr noundef nonnull align 8 dereferenceable(100) %9, ptr noundef %10, i32 noundef 256, ptr noundef %11)
          to label %23 unwind label %49

23:                                               ; preds = %22
  call void @_ZNSt6vectorI12ShaderDefineSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @_ZNSt10filesystem7__cxx114pathD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #6
  call void @llvm.lifetime.start.p0(i64 104, ptr %14) #6
  invoke void @_ZNSt10filesystem7__cxx114pathC2EONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS1_6formatE(ptr noundef nonnull align 8 dereferenceable(40) %15, ptr noundef nonnull align 8 dereferenceable(32) %2, i8 noundef zeroext 2)
          to label %24 unwind label %54

24:                                               ; preds = %23
  invoke void @_ZNSt6vectorI12ShaderDefineSaIS0_EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %25 unwind label %58

25:                                               ; preds = %24
  invoke void @_ZN10ShaderFileC1ENSt10filesystem7__cxx114pathE11ShaderStageSt6vectorI12ShaderDefineSaIS5_EE(ptr noundef nonnull align 8 dereferenceable(100) %14, ptr noundef %15, i32 noundef 512, ptr noundef %16)
          to label %26 unwind label %62

26:                                               ; preds = %25
  call void @_ZNSt6vectorI12ShaderDefineSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  call void @_ZNSt10filesystem7__cxx114pathD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #6
  call void @llvm.lifetime.start.p0(i64 208, ptr %19) #6
  store ptr %19, ptr %20, align 8
  invoke void @_ZN10ShaderFileC2ERKS_(ptr noundef nonnull align 8 dereferenceable(100) %19, ptr noundef nonnull align 8 dereferenceable(100) %9)
          to label %27 unwind label %67

27:                                               ; preds = %26
  %28 = getelementptr inbounds %struct.ShaderFile, ptr %19, i64 1
  store ptr %28, ptr %20, align 8
  invoke void @_ZN10ShaderFileC2ERKS_(ptr noundef nonnull align 8 dereferenceable(100) %28, ptr noundef nonnull align 8 dereferenceable(100) %14)
          to label %29 unwind label %67

29:                                               ; preds = %27
  %30 = getelementptr inbounds %"class.std::initializer_list", ptr %18, i32 0, i32 0
  store ptr %19, ptr %30, align 8, !tbaa !9
  %31 = getelementptr inbounds %"class.std::initializer_list", ptr %18, i32 0, i32 1
  store i64 2, ptr %31, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #6
  call void @_ZNSaI10ShaderFileEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  %32 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8
  %34 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 1
  %35 = load i64, ptr %34, align 8
  invoke void @_ZNSt6vectorI10ShaderFileSaIS0_EEC2ESt16initializer_listIS0_ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr %33, i64 %35, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %36 unwind label %78

36:                                               ; preds = %29
  invoke void @_ZN6ShaderC1ESt6vectorI10ShaderFileSaIS1_EE10ShaderType(ptr noundef nonnull align 8 dereferenceable(28) %0, ptr noundef %17, i32 noundef 0)
          to label %37 unwind label %82

37:                                               ; preds = %36
  call void @_ZNSt6vectorI10ShaderFileSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  call void @_ZNSt15__new_allocatorI10ShaderFileED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  %38 = getelementptr inbounds [2 x %struct.ShaderFile], ptr %19, i32 0, i32 0
  %39 = getelementptr inbounds %struct.ShaderFile, ptr %38, i64 2
  br label %40

40:                                               ; preds = %40, %37
  %41 = phi ptr [ %39, %37 ], [ %42, %40 ]
  %42 = getelementptr inbounds %struct.ShaderFile, ptr %41, i64 -1
  call void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100) %42) #6
  %43 = icmp eq ptr %42, %38
  br i1 %43, label %44, label %40

44:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 208, ptr %19) #6
  call void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100) %14) #6
  call void @llvm.lifetime.end.p0(i64 104, ptr %14) #6
  call void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100) %9) #6
  call void @llvm.lifetime.end.p0(i64 104, ptr %9) #6
  ret void

45:                                               ; preds = %4
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %12, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %13, align 4
  br label %53

49:                                               ; preds = %22
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %12, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %13, align 4
  call void @_ZNSt6vectorI12ShaderDefineSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  br label %53

53:                                               ; preds = %49, %45
  call void @_ZNSt10filesystem7__cxx114pathD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #6
  br label %96

54:                                               ; preds = %23
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %12, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %13, align 4
  br label %95

58:                                               ; preds = %24
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %12, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %13, align 4
  br label %66

62:                                               ; preds = %25
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %12, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %13, align 4
  call void @_ZNSt6vectorI12ShaderDefineSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  br label %66

66:                                               ; preds = %62, %58
  call void @_ZNSt10filesystem7__cxx114pathD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #6
  br label %95

67:                                               ; preds = %27, %26
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %12, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %13, align 4
  %71 = load ptr, ptr %20, align 8
  %72 = icmp eq ptr %19, %71
  br i1 %72, label %77, label %73

73:                                               ; preds = %73, %67
  %74 = phi ptr [ %71, %67 ], [ %75, %73 ]
  %75 = getelementptr inbounds %struct.ShaderFile, ptr %74, i64 -1
  call void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100) %75) #6
  %76 = icmp eq ptr %75, %19
  br i1 %76, label %77, label %73

77:                                               ; preds = %73, %67
  br label %94

78:                                               ; preds = %29
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %12, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %13, align 4
  br label %86

82:                                               ; preds = %36
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %12, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %13, align 4
  call void @_ZNSt6vectorI10ShaderFileSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  br label %86

86:                                               ; preds = %82, %78
  call void @_ZNSt15__new_allocatorI10ShaderFileED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  %87 = getelementptr inbounds [2 x %struct.ShaderFile], ptr %19, i32 0, i32 0
  %88 = getelementptr inbounds %struct.ShaderFile, ptr %87, i64 2
  br label %89

89:                                               ; preds = %89, %86
  %90 = phi ptr [ %88, %86 ], [ %91, %89 ]
  %91 = getelementptr inbounds %struct.ShaderFile, ptr %90, i64 -1
  call void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100) %91) #6
  %92 = icmp eq ptr %91, %87
  br i1 %92, label %93, label %89

93:                                               ; preds = %89
  br label %94

94:                                               ; preds = %93, %77
  call void @llvm.lifetime.end.p0(i64 208, ptr %19) #6
  call void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100) %14) #6
  br label %95

95:                                               ; preds = %94, %66, %54
  call void @llvm.lifetime.end.p0(i64 104, ptr %14) #6
  call void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100) %9) #6
  br label %96

96:                                               ; preds = %95, %53
  call void @llvm.lifetime.end.p0(i64 104, ptr %9) #6
  br label %97

97:                                               ; preds = %96
  %98 = load ptr, ptr %12, align 8
  %99 = load i32, ptr %13, align 4
  %100 = insertvalue { ptr, i32 } poison, ptr %98, 0
  %101 = insertvalue { ptr, i32 } %100, i32 %99, 1
  resume { ptr, i32 } %101
}

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

declare void @_ZN6ShaderC1ESt6vectorI10ShaderFileSaIS1_EE10ShaderType(ptr, ptr, i32)

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


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

%struct.Shader = type <{ %"class.std::vector", i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ShaderFile, std::allocator<ShaderFile>>::_Vector_impl" }
%"struct.std::_Vector_base<ShaderFile, std::allocator<ShaderFile>>::_Vector_impl" = type { %"struct.std::_Vector_base<ShaderFile, std::allocator<ShaderFile>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ShaderFile, std::allocator<ShaderFile>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.ShaderFile = type <{ %"class.std::filesystem::__cxx11::path", %"class.std::vector.3", %"class.std::__cxx11::basic_string", i32, [4 x i8] }>
%"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.9" }
%"struct.std::_Head_base.9" = type { ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<ShaderDefine, std::allocator<ShaderDefine>>::_Vector_impl" }
%"struct.std::_Vector_base<ShaderDefine, std::allocator<ShaderDefine>>::_Vector_impl" = type { %"struct.std::_Vector_base<ShaderDefine, std::allocator<ShaderDefine>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ShaderDefine, std::allocator<ShaderDefine>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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 }

; 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 uwtable
declare dso_local void @_ZNSt10filesystem7__cxx114pathC2EONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS1_6formatE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(32), i8 noundef zeroext) unnamed_addr #1 align 2

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

declare i32 @__gxx_personality_v0(...)

declare void @_ZN10ShaderFileC1ENSt10filesystem7__cxx114pathE11ShaderStageSt6vectorI12ShaderDefineSaIS5_EE(ptr noundef nonnull align 8 dereferenceable(100), ptr noundef, i32 noundef, ptr noundef) unnamed_addr #2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10ShaderFileC2ERKS_(ptr noundef nonnull align 8 dereferenceable(100), ptr noundef nonnull align 8 dereferenceable(100)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100)) unnamed_addr #5 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI10ShaderFileSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 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 uwtable
define dso_local void @_ZN6Shader17createMeshShadingENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St6vectorI12ShaderDefineSaIS7_EE(ptr dead_on_unwind noalias writable sret(%struct.Shader) align 8 %0, ptr noundef nonnull %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %struct.ShaderFile, align 8
  %6 = alloca %"class.std::filesystem::__cxx11::path", align 8
  %7 = alloca %"class.std::vector.3", align 8
  %8 = alloca %struct.ShaderFile, align 8
  %9 = alloca %"class.std::filesystem::__cxx11::path", align 8
  %10 = alloca %"class.std::vector.3", align 8
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca [2 x %struct.ShaderFile], align 8
  %13 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %5) #6
  call void @_ZNSt10filesystem7__cxx114pathC2EONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS1_6formatE(ptr noundef nonnull align 8 dereferenceable(40) %6, ptr noundef nonnull align 8 dereferenceable(32) %1, i8 noundef zeroext 2)
  invoke void @_ZNSt6vectorI12ShaderDefineSaIS0_EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %14 unwind label %26

14:                                               ; preds = %4
  invoke void @_ZN10ShaderFileC1ENSt10filesystem7__cxx114pathE11ShaderStageSt6vectorI12ShaderDefineSaIS5_EE(ptr noundef nonnull align 8 dereferenceable(100) %5, ptr noundef nonnull %6, i32 noundef 256, ptr noundef nonnull %7)
          to label %15 unwind label %28

15:                                               ; preds = %14
  call void @_ZNSt6vectorI12ShaderDefineSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @_ZNSt10filesystem7__cxx114pathD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #6
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %8) #6
  invoke void @_ZNSt10filesystem7__cxx114pathC2EONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS1_6formatE(ptr noundef nonnull align 8 dereferenceable(40) %9, ptr noundef nonnull align 8 dereferenceable(32) %2, i8 noundef zeroext 2)
          to label %16 unwind label %31

16:                                               ; preds = %15
  invoke void @_ZNSt6vectorI12ShaderDefineSaIS0_EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %17 unwind label %33

17:                                               ; preds = %16
  invoke void @_ZN10ShaderFileC1ENSt10filesystem7__cxx114pathE11ShaderStageSt6vectorI12ShaderDefineSaIS5_EE(ptr noundef nonnull align 8 dereferenceable(100) %8, ptr noundef nonnull %9, i32 noundef 512, ptr noundef nonnull %10)
          to label %18 unwind label %35

18:                                               ; preds = %17
  call void @_ZNSt6vectorI12ShaderDefineSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  call void @_ZNSt10filesystem7__cxx114pathD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #6
  call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %12) #6
  invoke void @_ZN10ShaderFileC2ERKS_(ptr noundef nonnull align 8 dereferenceable(100) %12, ptr noundef nonnull align 8 dereferenceable(100) %5)
          to label %20 unwind label %.thread

.thread:                                          ; preds = %18
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

20:                                               ; preds = %18
  %21 = getelementptr inbounds i8, ptr %12, i64 104
  invoke void @_ZN10ShaderFileC2ERKS_(ptr noundef nonnull align 8 dereferenceable(100) %21, ptr noundef nonnull align 8 dereferenceable(100) %8)
          to label %22 unwind label %.loopexit.loopexit20

22:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #6
  call void @_ZNSaI10ShaderFileEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  invoke void @_ZNSt6vectorI10ShaderFileSaIS0_EEC2ESt16initializer_listIS0_ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr nonnull %12, i64 2, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %23 unwind label %39

23:                                               ; preds = %22
  invoke void @_ZN6ShaderC1ESt6vectorI10ShaderFileSaIS1_EE10ShaderType(ptr noundef nonnull align 8 dereferenceable(28) %0, ptr noundef nonnull %11, i32 noundef 0)
          to label %24 unwind label %41

24:                                               ; preds = %23
  call void @_ZNSt6vectorI10ShaderFileSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @_ZNSt15__new_allocatorI10ShaderFileED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  %25 = getelementptr inbounds i8, ptr %12, i64 104
  call void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100) %25) #6
  call void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100) %12) #6
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %12) #6
  call void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100) %8) #6
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %8) #6
  call void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100) %5) #6
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %5) #6
  ret void

26:                                               ; preds = %4
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %30

28:                                               ; preds = %14
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorI12ShaderDefineSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  br label %30

30:                                               ; preds = %28, %26
  %.pn = phi { ptr, i32 } [ %29, %28 ], [ %27, %26 ]
  call void @_ZNSt10filesystem7__cxx114pathD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #6
  br label %45

31:                                               ; preds = %15
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %44

33:                                               ; preds = %16
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %37

35:                                               ; preds = %17
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorI12ShaderDefineSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  br label %37

37:                                               ; preds = %35, %33
  %.pn11 = phi { ptr, i32 } [ %36, %35 ], [ %34, %33 ]
  call void @_ZNSt10filesystem7__cxx114pathD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #6
  br label %44

.loopexit.loopexit20:                             ; preds = %20
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100) %12) #6
  br label %.loopexit

39:                                               ; preds = %22
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.loopexit

41:                                               ; preds = %23
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorI10ShaderFileSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  br label %.loopexit.loopexit

.loopexit.loopexit:                               ; preds = %41, %39
  %.pn13 = phi { ptr, i32 } [ %42, %41 ], [ %40, %39 ]
  call void @_ZNSt15__new_allocatorI10ShaderFileED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  %43 = getelementptr inbounds i8, ptr %12, i64 104
  call void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100) %43) #6
  call void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100) %12) #6
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit20, %.loopexit.loopexit, %.thread
  %.pn13.pn = phi { ptr, i32 } [ %19, %.thread ], [ %.pn13, %.loopexit.loopexit ], [ %38, %.loopexit.loopexit20 ]
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %12) #6
  call void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100) %8) #6
  br label %44

44:                                               ; preds = %.loopexit, %37, %31
  %.pn13.pn.pn = phi { ptr, i32 } [ %.pn13.pn, %.loopexit ], [ %.pn11, %37 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %8) #6
  call void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100) %5) #6
  br label %45

45:                                               ; preds = %44, %30
  %.pn13.pn.pn.pn = phi { ptr, i32 } [ %.pn13.pn.pn, %44 ], [ %.pn, %30 ]
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %5) #6
  resume { ptr, i32 } %.pn13.pn.pn.pn
}

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

declare void @_ZN6ShaderC1ESt6vectorI10ShaderFileSaIS1_EE10ShaderType(ptr, ptr, i32) local_unnamed_addr

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass