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

17:                                               ; preds = %3
  invoke void @_ZN10ShaderFileC1ENSt10filesystem7__cxx114pathE11ShaderStageSt6vectorI12ShaderDefineSaIS5_EE(ptr noundef nonnull align 8 dereferenceable(100) %7, ptr noundef %8, i32 noundef 4, ptr noundef %9)
          to label %18 unwind label %39

18:                                               ; preds = %17
  call void @_ZNSt6vectorI12ShaderDefineSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  call void @_ZNSt10filesystem7__cxx114pathD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #6
  call void @llvm.lifetime.start.p0(i64 104, ptr %14) #6
  store ptr %14, ptr %15, align 8
  invoke void @_ZN10ShaderFileC2ERKS_(ptr noundef nonnull align 8 dereferenceable(100) %14, ptr noundef nonnull align 8 dereferenceable(100) %7)
          to label %19 unwind label %44

19:                                               ; preds = %18
  %20 = getelementptr inbounds %"class.std::initializer_list", ptr %13, i32 0, i32 0
  store ptr %14, ptr %20, align 8, !tbaa !9
  %21 = getelementptr inbounds %"class.std::initializer_list", ptr %13, i32 0, i32 1
  store i64 1, ptr %21, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #6
  call void @_ZNSaI10ShaderFileEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  %22 = getelementptr inbounds { ptr, i64 }, ptr %13, i32 0, i32 0
  %23 = load ptr, ptr %22, align 8
  %24 = getelementptr inbounds { ptr, i64 }, ptr %13, i32 0, i32 1
  %25 = load i64, ptr %24, align 8
  invoke void @_ZNSt6vectorI10ShaderFileSaIS0_EEC2ESt16initializer_listIS0_ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr %23, i64 %25, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %26 unwind label %55

26:                                               ; preds = %19
  invoke void @_ZN6ShaderC1ESt6vectorI10ShaderFileSaIS1_EE10ShaderType(ptr noundef nonnull align 8 dereferenceable(28) %0, ptr noundef %12, i32 noundef 1)
          to label %27 unwind label %59

27:                                               ; preds = %26
  call void @_ZNSt6vectorI10ShaderFileSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @_ZNSt15__new_allocatorI10ShaderFileED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  %28 = getelementptr inbounds [1 x %struct.ShaderFile], ptr %14, i32 0, i32 0
  %29 = getelementptr inbounds %struct.ShaderFile, ptr %28, i64 1
  br label %30

30:                                               ; preds = %30, %27
  %31 = phi ptr [ %29, %27 ], [ %32, %30 ]
  %32 = getelementptr inbounds %struct.ShaderFile, ptr %31, i64 -1
  call void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100) %32) #6
  %33 = icmp eq ptr %32, %28
  br i1 %33, label %34, label %30

34:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 104, ptr %14) #6
  call void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100) %7) #6
  call void @llvm.lifetime.end.p0(i64 104, ptr %7) #6
  ret void

35:                                               ; preds = %3
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %10, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %11, align 4
  br label %43

39:                                               ; preds = %17
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %10, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %11, align 4
  call void @_ZNSt6vectorI12ShaderDefineSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  br label %43

43:                                               ; preds = %39, %35
  call void @_ZNSt10filesystem7__cxx114pathD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #6
  br label %72

44:                                               ; preds = %18
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %10, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %11, align 4
  %48 = load ptr, ptr %15, align 8
  %49 = icmp eq ptr %14, %48
  br i1 %49, label %54, label %50

50:                                               ; preds = %50, %44
  %51 = phi ptr [ %48, %44 ], [ %52, %50 ]
  %52 = getelementptr inbounds %struct.ShaderFile, ptr %51, i64 -1
  call void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100) %52) #6
  %53 = icmp eq ptr %52, %14
  br i1 %53, label %54, label %50

54:                                               ; preds = %50, %44
  br label %71

55:                                               ; preds = %19
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %10, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %11, align 4
  br label %63

59:                                               ; preds = %26
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %10, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %11, align 4
  call void @_ZNSt6vectorI10ShaderFileSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  br label %63

63:                                               ; preds = %59, %55
  call void @_ZNSt15__new_allocatorI10ShaderFileED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  %64 = getelementptr inbounds [1 x %struct.ShaderFile], ptr %14, i32 0, i32 0
  %65 = getelementptr inbounds %struct.ShaderFile, ptr %64, i64 1
  br label %66

66:                                               ; preds = %66, %63
  %67 = phi ptr [ %65, %63 ], [ %68, %66 ]
  %68 = getelementptr inbounds %struct.ShaderFile, ptr %67, i64 -1
  call void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100) %68) #6
  %69 = icmp eq ptr %68, %64
  br i1 %69, label %70, label %66

70:                                               ; preds = %66
  br label %71

71:                                               ; preds = %70, %54
  call void @llvm.lifetime.end.p0(i64 104, ptr %14) #6
  call void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100) %7) #6
  br label %72

72:                                               ; preds = %71, %43
  call void @llvm.lifetime.end.p0(i64 104, ptr %7) #6
  br label %73

73:                                               ; preds = %72
  %74 = load ptr, ptr %10, align 8
  %75 = load i32, ptr %11, align 4
  %76 = insertvalue { ptr, i32 } poison, ptr %74, 0
  %77 = insertvalue { ptr, i32 } %76, i32 %75, 1
  resume { ptr, i32 } %77
}

; 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 @_ZN6Shader13createComputeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorI12ShaderDefineSaIS7_EE(ptr dead_on_unwind noalias writable sret(%struct.Shader) align 8 %0, ptr noundef nonnull %1, ptr noundef %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %struct.ShaderFile, align 8
  %5 = alloca %"class.std::filesystem::__cxx11::path", align 8
  %6 = alloca %"class.std::vector.3", align 8
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca [1 x %struct.ShaderFile], align 8
  %9 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %4) #6
  call void @_ZNSt10filesystem7__cxx114pathC2EONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS1_6formatE(ptr noundef nonnull align 8 dereferenceable(40) %5, ptr noundef nonnull align 8 dereferenceable(32) %1, i8 noundef zeroext 2)
  invoke void @_ZNSt6vectorI12ShaderDefineSaIS0_EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %10 unwind label %15

10:                                               ; preds = %3
  invoke void @_ZN10ShaderFileC1ENSt10filesystem7__cxx114pathE11ShaderStageSt6vectorI12ShaderDefineSaIS5_EE(ptr noundef nonnull align 8 dereferenceable(100) %4, ptr noundef nonnull %5, i32 noundef 4, ptr noundef nonnull %6)
          to label %11 unwind label %17

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

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

13:                                               ; preds = %12
  invoke void @_ZN6ShaderC1ESt6vectorI10ShaderFileSaIS1_EE10ShaderType(ptr noundef nonnull align 8 dereferenceable(28) %0, ptr noundef nonnull %7, i32 noundef 1)
          to label %14 unwind label %24

14:                                               ; preds = %13
  call void @_ZNSt6vectorI10ShaderFileSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @_ZNSt15__new_allocatorI10ShaderFileED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #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) %4) #6
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %4) #6
  ret void

15:                                               ; preds = %3
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %19

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

19:                                               ; preds = %17, %15
  %.pn = phi { ptr, i32 } [ %18, %17 ], [ %16, %15 ]
  call void @_ZNSt10filesystem7__cxx114pathD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #6
  br label %26

20:                                               ; preds = %11
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

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

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

.loopexit.loopexit:                               ; preds = %24, %22
  %.pn8 = phi { ptr, i32 } [ %25, %24 ], [ %23, %22 ]
  call void @_ZNSt15__new_allocatorI10ShaderFileED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  call void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100) %8) #6
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %20
  %.pn8.pn = phi { ptr, i32 } [ %21, %20 ], [ %.pn8, %.loopexit.loopexit ]
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %8) #6
  call void @_ZN10ShaderFileD2Ev(ptr noundef nonnull align 8 dereferenceable(100) %4) #6
  br label %26

26:                                               ; preds = %.loopexit, %19
  %.pn8.pn.pn = phi { ptr, i32 } [ %.pn8.pn, %.loopexit ], [ %.pn, %19 ]
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn8.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: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass