; LLVM IR from Razakhel/RaZ :: src/RaZ/Render/ShaderProgram.ll (ZNK3Raz19RenderShaderProgram5cloneEv)

; 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.Raz::RenderShaderProgram" = type { %"class.Raz::ShaderProgram", %"class.Raz::VertexShader", %"class.std::optional", %"class.std::optional.107", %"class.std::optional.117", %"class.Raz::FragmentShader" }
%"class.Raz::ShaderProgram" = type { ptr, %"class.Raz::OwnerValue", %"class.std::unordered_map", %"class.std::vector", %"class.std::vector.19" }
%"class.Raz::OwnerValue" = type { i32 }
%"class.std::unordered_map" = type { %"class.std::_Hashtable.3" }
%"class.std::_Hashtable.3" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.19" = type { %"struct.std::_Vector_base.20" }
%"struct.std::_Vector_base.20" = type { %"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Raz::VertexShader" = type { %"class.Raz::Shader" }
%"class.Raz::Shader" = type { ptr, %"class.Raz::OwnerValue", %"class.Raz::FilePath" }
%"class.Raz::FilePath" = type { %"class.std::__cxx11::basic_string" }
%"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::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload.base", [7 x i8] }
%"struct.std::_Optional_payload.base" = type { %"struct.std::_Optional_payload_base.base" }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<Raz::TessellationControlShader>::_Storage", i8 }>
%"union.std::_Optional_payload_base<Raz::TessellationControlShader>::_Storage" = type { %"class.Raz::TessellationControlShader" }
%"class.Raz::TessellationControlShader" = type { %"class.Raz::Shader" }
%"class.std::optional.107" = type { %"struct.std::_Optional_base.108" }
%"struct.std::_Optional_base.108" = type { %"struct.std::_Optional_payload.110" }
%"struct.std::_Optional_payload.110" = type { %"struct.std::_Optional_payload.base.114", [7 x i8] }
%"struct.std::_Optional_payload.base.114" = type { %"struct.std::_Optional_payload_base.base.113" }
%"struct.std::_Optional_payload_base.base.113" = type <{ %"union.std::_Optional_payload_base<Raz::TessellationEvaluationShader>::_Storage", i8 }>
%"union.std::_Optional_payload_base<Raz::TessellationEvaluationShader>::_Storage" = type { %"class.Raz::TessellationEvaluationShader" }
%"class.Raz::TessellationEvaluationShader" = type { %"class.Raz::Shader" }
%"class.std::optional.117" = type { %"struct.std::_Optional_base.118" }
%"struct.std::_Optional_base.118" = type { %"struct.std::_Optional_payload.120" }
%"struct.std::_Optional_payload.120" = type { %"struct.std::_Optional_payload.base.124", [7 x i8] }
%"struct.std::_Optional_payload.base.124" = type { %"struct.std::_Optional_payload_base.base.123" }
%"struct.std::_Optional_payload_base.base.123" = type <{ %"union.std::_Optional_payload_base<Raz::GeometryShader>::_Storage", i8 }>
%"union.std::_Optional_payload_base<Raz::GeometryShader>::_Storage" = type { %"class.Raz::GeometryShader" }
%"class.Raz::GeometryShader" = type { %"class.Raz::Shader" }
%"class.Raz::FragmentShader" = type { %"class.Raz::Shader" }

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Raz13ShaderProgram4linkEv(ptr noundef nonnull align 8 dereferenceable(120)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3Raz13ShaderProgram14sendAttributesEv(ptr noundef nonnull align 8 dereferenceable(120)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3Raz13ShaderProgram12initTexturesEv(ptr noundef nonnull align 8 dereferenceable(120)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3Raz13ShaderProgram17initImageTexturesEv(ptr noundef nonnull align 8 dereferenceable(120)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Raz19RenderShaderProgram15setVertexShaderEONS_12VertexShaderE(ptr noundef nonnull align 8 dereferenceable(384), ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Raz19RenderShaderProgram28setTessellationControlShaderEONS_25TessellationControlShaderE(ptr noundef nonnull align 8 dereferenceable(384), ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt8optionalIN3Raz25TessellationControlShaderEEcvbEv(ptr noundef nonnull align 8 dereferenceable(56)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Raz19RenderShaderProgram31setTessellationEvaluationShaderEONS_28TessellationEvaluationShaderE(ptr noundef nonnull align 8 dereferenceable(384), ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt8optionalIN3Raz28TessellationEvaluationShaderEEcvbEv(ptr noundef nonnull align 8 dereferenceable(56)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Raz19RenderShaderProgram17setGeometryShaderEONS_14GeometryShaderE(ptr noundef nonnull align 8 dereferenceable(384), ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt8optionalIN3Raz14GeometryShaderEEcvbEv(ptr noundef nonnull align 8 dereferenceable(56)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Raz19RenderShaderProgram17setFragmentShaderEONS_14FragmentShaderE(ptr noundef nonnull align 8 dereferenceable(384), ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3Raz19RenderShaderProgram5cloneEv(ptr dead_on_unwind noalias writable sret(%"class.Raz::RenderShaderProgram") align 8 %0, ptr noundef nonnull align 8 dereferenceable(384) %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i1, align 1
  %6 = alloca %"class.Raz::VertexShader", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.Raz::TessellationControlShader", align 8
  %10 = alloca %"class.Raz::TessellationEvaluationShader", align 8
  %11 = alloca %"class.Raz::GeometryShader", align 8
  %12 = alloca %"class.Raz::FragmentShader", align 8
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %13 = load ptr, ptr %4, align 8
  store i1 false, ptr %5, align 1
  call void @_ZN3Raz19RenderShaderProgramC2Ev(ptr noundef nonnull align 8 dereferenceable(384) %0)
  call void @llvm.lifetime.start.p0(i64 48, ptr %6) #5
  %14 = getelementptr inbounds %"class.Raz::RenderShaderProgram", ptr %13, i32 0, i32 1
  invoke void @_ZNK3Raz12VertexShader5cloneEv(ptr dead_on_unwind writable sret(%"class.Raz::VertexShader") align 8 %6, ptr noundef nonnull align 8 dereferenceable(48) %14)
          to label %15 unwind label %24

15:                                               ; preds = %2
  invoke void @_ZN3Raz19RenderShaderProgram15setVertexShaderEONS_12VertexShaderE(ptr noundef nonnull align 8 dereferenceable(384) %0, ptr noundef nonnull align 8 dereferenceable(48) %6)
          to label %16 unwind label %28

16:                                               ; preds = %15
  call void @_ZN3Raz6ShaderD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %6) #5
  %17 = getelementptr inbounds %"class.Raz::RenderShaderProgram", ptr %13, i32 0, i32 2
  %18 = call noundef zeroext i1 @_ZNKSt8optionalIN3Raz25TessellationControlShaderEEcvbEv(ptr noundef nonnull align 8 dereferenceable(56) %17) #5
  br i1 %18, label %19, label %42

19:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 48, ptr %9) #5
  %20 = getelementptr inbounds %"class.Raz::RenderShaderProgram", ptr %13, i32 0, i32 2
  %21 = call noundef ptr @_ZNKSt8optionalIN3Raz25TessellationControlShaderEEptEv(ptr noundef nonnull align 8 dereferenceable(56) %20) #5
  invoke void @_ZNK3Raz25TessellationControlShader5cloneEv(ptr dead_on_unwind writable sret(%"class.Raz::TessellationControlShader") align 8 %9, ptr noundef nonnull align 8 dereferenceable(48) %21)
          to label %22 unwind label %33

22:                                               ; preds = %19
  invoke void @_ZN3Raz19RenderShaderProgram28setTessellationControlShaderEONS_25TessellationControlShaderE(ptr noundef nonnull align 8 dereferenceable(384) %0, ptr noundef nonnull align 8 dereferenceable(48) %9)
          to label %23 unwind label %37

23:                                               ; preds = %22
  call void @_ZN3Raz6ShaderD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #5
  br label %42

24:                                               ; preds = %2
  %25 = landingpad { ptr, i32 }
          cleanup
  %26 = extractvalue { ptr, i32 } %25, 0
  store ptr %26, ptr %7, align 8
  %27 = extractvalue { ptr, i32 } %25, 1
  store i32 %27, ptr %8, align 4
  br label %32

28:                                               ; preds = %15
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %7, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %8, align 4
  call void @_ZN3Raz6ShaderD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #5
  br label %32

32:                                               ; preds = %28, %24
  call void @llvm.lifetime.end.p0(i64 48, ptr %6) #5
  br label %112

33:                                               ; preds = %19
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %7, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %8, align 4
  br label %41

37:                                               ; preds = %22
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %7, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %8, align 4
  call void @_ZN3Raz6ShaderD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #5
  br label %41

41:                                               ; preds = %37, %33
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #5
  br label %112

42:                                               ; preds = %23, %16
  %43 = getelementptr inbounds %"class.Raz::RenderShaderProgram", ptr %13, i32 0, i32 3
  %44 = call noundef zeroext i1 @_ZNKSt8optionalIN3Raz28TessellationEvaluationShaderEEcvbEv(ptr noundef nonnull align 8 dereferenceable(56) %43) #5
  br i1 %44, label %45, label %59

45:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 48, ptr %10) #5
  %46 = getelementptr inbounds %"class.Raz::RenderShaderProgram", ptr %13, i32 0, i32 3
  %47 = call noundef ptr @_ZNKSt8optionalIN3Raz28TessellationEvaluationShaderEEptEv(ptr noundef nonnull align 8 dereferenceable(56) %46) #5
  invoke void @_ZNK3Raz28TessellationEvaluationShader5cloneEv(ptr dead_on_unwind writable sret(%"class.Raz::TessellationEvaluationShader") align 8 %10, ptr noundef nonnull align 8 dereferenceable(48) %47)
          to label %48 unwind label %50

48:                                               ; preds = %45
  invoke void @_ZN3Raz19RenderShaderProgram31setTessellationEvaluationShaderEONS_28TessellationEvaluationShaderE(ptr noundef nonnull align 8 dereferenceable(384) %0, ptr noundef nonnull align 8 dereferenceable(48) %10)
          to label %49 unwind label %54

49:                                               ; preds = %48
  call void @_ZN3Raz6ShaderD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #5
  br label %59

50:                                               ; preds = %45
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %7, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %8, align 4
  br label %58

54:                                               ; preds = %48
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %7, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %8, align 4
  call void @_ZN3Raz6ShaderD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #5
  br label %58

58:                                               ; preds = %54, %50
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #5
  br label %112

59:                                               ; preds = %49, %42
  %60 = getelementptr inbounds %"class.Raz::RenderShaderProgram", ptr %13, i32 0, i32 4
  %61 = call noundef zeroext i1 @_ZNKSt8optionalIN3Raz14GeometryShaderEEcvbEv(ptr noundef nonnull align 8 dereferenceable(56) %60) #5
  br i1 %61, label %62, label %76

62:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 48, ptr %11) #5
  %63 = getelementptr inbounds %"class.Raz::RenderShaderProgram", ptr %13, i32 0, i32 4
  %64 = call noundef ptr @_ZNKSt8optionalIN3Raz14GeometryShaderEEptEv(ptr noundef nonnull align 8 dereferenceable(56) %63) #5
  invoke void @_ZNK3Raz14GeometryShader5cloneEv(ptr dead_on_unwind writable sret(%"class.Raz::GeometryShader") align 8 %11, ptr noundef nonnull align 8 dereferenceable(48) %64)
          to label %65 unwind label %67

65:                                               ; preds = %62
  invoke void @_ZN3Raz19RenderShaderProgram17setGeometryShaderEONS_14GeometryShaderE(ptr noundef nonnull align 8 dereferenceable(384) %0, ptr noundef nonnull align 8 dereferenceable(48) %11)
          to label %66 unwind label %71

66:                                               ; preds = %65
  call void @_ZN3Raz6ShaderD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #5
  br label %76

67:                                               ; preds = %62
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %7, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %8, align 4
  br label %75

71:                                               ; preds = %65
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %7, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %8, align 4
  call void @_ZN3Raz6ShaderD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #5
  br label %75

75:                                               ; preds = %71, %67
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #5
  br label %112

76:                                               ; preds = %66, %59
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #5
  %77 = getelementptr inbounds %"class.Raz::RenderShaderProgram", ptr %13, i32 0, i32 5
  invoke void @_ZNK3Raz14FragmentShader5cloneEv(ptr dead_on_unwind writable sret(%"class.Raz::FragmentShader") align 8 %12, ptr noundef nonnull align 8 dereferenceable(48) %77)
          to label %78 unwind label %97

78:                                               ; preds = %76
  invoke void @_ZN3Raz19RenderShaderProgram17setFragmentShaderEONS_14FragmentShaderE(ptr noundef nonnull align 8 dereferenceable(384) %0, ptr noundef nonnull align 8 dereferenceable(48) %12)
          to label %79 unwind label %101

79:                                               ; preds = %78
  call void @_ZN3Raz6ShaderD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #5
  invoke void @_ZN3Raz13ShaderProgram4linkEv(ptr noundef nonnull align 8 dereferenceable(120) %0)
          to label %80 unwind label %106

80:                                               ; preds = %79
  %81 = getelementptr inbounds %"class.Raz::ShaderProgram", ptr %13, i32 0, i32 2
  %82 = getelementptr inbounds %"class.Raz::ShaderProgram", ptr %0, i32 0, i32 2
  %83 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3Raz13ShaderProgram9AttributeESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S8_EEEaSERKSH_(ptr noundef nonnull align 8 dereferenceable(56) %82, ptr noundef nonnull align 8 dereferenceable(56) %81)
          to label %84 unwind label %106

84:                                               ; preds = %80
  %85 = getelementptr inbounds %"class.Raz::ShaderProgram", ptr %13, i32 0, i32 3
  %86 = getelementptr inbounds %"class.Raz::ShaderProgram", ptr %0, i32 0, i32 3
  %87 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorISt4pairISt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISB_EEaSERKSD_(ptr noundef nonnull align 8 dereferenceable(24) %86, ptr noundef nonnull align 8 dereferenceable(24) %85)
          to label %88 unwind label %106

88:                                               ; preds = %84
  %89 = getelementptr inbounds %"class.Raz::ShaderProgram", ptr %13, i32 0, i32 4
  %90 = getelementptr inbounds %"class.Raz::ShaderProgram", ptr %0, i32 0, i32 4
  %91 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorISt4pairISt10shared_ptrIN3Raz7TextureEENS2_13ShaderProgram22ImageTextureAttachmentEESaIS7_EEaSERKS9_(ptr noundef nonnull align 8 dereferenceable(24) %90, ptr noundef nonnull align 8 dereferenceable(24) %89)
          to label %92 unwind label %106

92:                                               ; preds = %88
  invoke void @_ZNK3Raz13ShaderProgram14sendAttributesEv(ptr noundef nonnull align 8 dereferenceable(120) %13)
          to label %93 unwind label %106

93:                                               ; preds = %92
  invoke void @_ZNK3Raz13ShaderProgram12initTexturesEv(ptr noundef nonnull align 8 dereferenceable(120) %13)
          to label %94 unwind label %106

94:                                               ; preds = %93
  invoke void @_ZNK3Raz13ShaderProgram17initImageTexturesEv(ptr noundef nonnull align 8 dereferenceable(120) %13)
          to label %95 unwind label %106

95:                                               ; preds = %94
  store i1 true, ptr %5, align 1
  %96 = load i1, ptr %5, align 1
  br i1 %96, label %111, label %110

97:                                               ; preds = %76
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %7, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %8, align 4
  br label %105

101:                                              ; preds = %78
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %7, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %8, align 4
  call void @_ZN3Raz6ShaderD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #5
  br label %105

105:                                              ; preds = %101, %97
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #5
  br label %112

106:                                              ; preds = %94, %93, %92, %88, %84, %80, %79
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %7, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %8, align 4
  br label %112

110:                                              ; preds = %95
  call void @_ZN3Raz19RenderShaderProgramD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %0) #5
  br label %111

111:                                              ; preds = %110, %95
  ret void

112:                                              ; preds = %106, %105, %75, %58, %41, %32
  call void @_ZN3Raz19RenderShaderProgramD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %0) #5
  br label %113

113:                                              ; preds = %112
  %114 = load ptr, ptr %7, align 8
  %115 = load i32, ptr %8, align 4
  %116 = insertvalue { ptr, i32 } poison, ptr %114, 0
  %117 = insertvalue { ptr, i32 } %116, i32 %115, 1
  resume { ptr, i32 } %117
}

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

declare void @_ZNK3Raz12VertexShader5cloneEv(ptr dead_on_unwind writable sret(%"class.Raz::VertexShader") align 8, ptr noundef nonnull align 8 dereferenceable(48)) #3

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

declare void @_ZNK3Raz25TessellationControlShader5cloneEv(ptr dead_on_unwind writable sret(%"class.Raz::TessellationControlShader") align 8, ptr noundef nonnull align 8 dereferenceable(48)) #3

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

declare void @_ZNK3Raz28TessellationEvaluationShader5cloneEv(ptr dead_on_unwind writable sret(%"class.Raz::TessellationEvaluationShader") align 8, ptr noundef nonnull align 8 dereferenceable(48)) #3

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

declare void @_ZNK3Raz14GeometryShader5cloneEv(ptr dead_on_unwind writable sret(%"class.Raz::GeometryShader") align 8, ptr noundef nonnull align 8 dereferenceable(48)) #3

declare void @_ZNK3Raz14FragmentShader5cloneEv(ptr dead_on_unwind writable sret(%"class.Raz::FragmentShader") align 8, ptr noundef nonnull align 8 dereferenceable(48)) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3Raz13ShaderProgram9AttributeESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S8_EEEaSERKSH_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) #1 align 2

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

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

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

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

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


; 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.Raz::RenderShaderProgram" = type { %"class.Raz::ShaderProgram", %"class.Raz::VertexShader", %"class.std::optional", %"class.std::optional.107", %"class.std::optional.117", %"class.Raz::FragmentShader" }
%"class.Raz::ShaderProgram" = type { ptr, %"class.Raz::OwnerValue", %"class.std::unordered_map", %"class.std::vector", %"class.std::vector.19" }
%"class.Raz::OwnerValue" = type { i32 }
%"class.std::unordered_map" = type { %"class.std::_Hashtable.3" }
%"class.std::_Hashtable.3" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.19" = type { %"struct.std::_Vector_base.20" }
%"struct.std::_Vector_base.20" = type { %"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Raz::VertexShader" = type { %"class.Raz::Shader" }
%"class.Raz::Shader" = type { ptr, %"class.Raz::OwnerValue", %"class.Raz::FilePath" }
%"class.Raz::FilePath" = type { %"class.std::__cxx11::basic_string" }
%"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::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload.base", [7 x i8] }
%"struct.std::_Optional_payload.base" = type { %"struct.std::_Optional_payload_base.base" }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<Raz::TessellationControlShader>::_Storage", i8 }>
%"union.std::_Optional_payload_base<Raz::TessellationControlShader>::_Storage" = type { %"class.Raz::TessellationControlShader" }
%"class.Raz::TessellationControlShader" = type { %"class.Raz::Shader" }
%"class.std::optional.107" = type { %"struct.std::_Optional_base.108" }
%"struct.std::_Optional_base.108" = type { %"struct.std::_Optional_payload.110" }
%"struct.std::_Optional_payload.110" = type { %"struct.std::_Optional_payload.base.114", [7 x i8] }
%"struct.std::_Optional_payload.base.114" = type { %"struct.std::_Optional_payload_base.base.113" }
%"struct.std::_Optional_payload_base.base.113" = type <{ %"union.std::_Optional_payload_base<Raz::TessellationEvaluationShader>::_Storage", i8 }>
%"union.std::_Optional_payload_base<Raz::TessellationEvaluationShader>::_Storage" = type { %"class.Raz::TessellationEvaluationShader" }
%"class.Raz::TessellationEvaluationShader" = type { %"class.Raz::Shader" }
%"class.std::optional.117" = type { %"struct.std::_Optional_base.118" }
%"struct.std::_Optional_base.118" = type { %"struct.std::_Optional_payload.120" }
%"struct.std::_Optional_payload.120" = type { %"struct.std::_Optional_payload.base.124", [7 x i8] }
%"struct.std::_Optional_payload.base.124" = type { %"struct.std::_Optional_payload_base.base.123" }
%"struct.std::_Optional_payload_base.base.123" = type <{ %"union.std::_Optional_payload_base<Raz::GeometryShader>::_Storage", i8 }>
%"union.std::_Optional_payload_base<Raz::GeometryShader>::_Storage" = type { %"class.Raz::GeometryShader" }
%"class.Raz::GeometryShader" = type { %"class.Raz::Shader" }
%"class.Raz::FragmentShader" = type { %"class.Raz::Shader" }

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Raz13ShaderProgram4linkEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3Raz13ShaderProgram14sendAttributesEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3Raz13ShaderProgram12initTexturesEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3Raz13ShaderProgram17initImageTexturesEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Raz19RenderShaderProgram15setVertexShaderEONS_12VertexShaderE(ptr noundef nonnull align 8 dereferenceable(384), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Raz19RenderShaderProgram28setTessellationControlShaderEONS_25TessellationControlShaderE(ptr noundef nonnull align 8 dereferenceable(384), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt8optionalIN3Raz25TessellationControlShaderEEcvbEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Raz19RenderShaderProgram31setTessellationEvaluationShaderEONS_28TessellationEvaluationShaderE(ptr noundef nonnull align 8 dereferenceable(384), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt8optionalIN3Raz28TessellationEvaluationShaderEEcvbEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Raz19RenderShaderProgram17setGeometryShaderEONS_14GeometryShaderE(ptr noundef nonnull align 8 dereferenceable(384), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt8optionalIN3Raz14GeometryShaderEEcvbEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Raz19RenderShaderProgram17setFragmentShaderEONS_14FragmentShaderE(ptr noundef nonnull align 8 dereferenceable(384), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3Raz19RenderShaderProgram5cloneEv(ptr dead_on_unwind noalias nonnull writable sret(%"class.Raz::RenderShaderProgram") align 8 %0, ptr noundef nonnull align 8 dereferenceable(384) %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.Raz::VertexShader", align 8
  %4 = alloca %"class.Raz::TessellationControlShader", align 8
  %5 = alloca %"class.Raz::TessellationEvaluationShader", align 8
  %6 = alloca %"class.Raz::GeometryShader", align 8
  %7 = alloca %"class.Raz::FragmentShader", align 8
  tail call void @_ZN3Raz19RenderShaderProgramC2Ev(ptr noundef nonnull align 8 dereferenceable(384) %0)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #5
  %8 = getelementptr inbounds i8, ptr %1, i64 120
  invoke void @_ZNK3Raz12VertexShader5cloneEv(ptr dead_on_unwind nonnull writable sret(%"class.Raz::VertexShader") align 8 %3, ptr noundef nonnull align 8 dereferenceable(48) %8)
          to label %9 unwind label %17

9:                                                ; preds = %2
  invoke void @_ZN3Raz19RenderShaderProgram15setVertexShaderEONS_12VertexShaderE(ptr noundef nonnull align 8 dereferenceable(384) %0, ptr noundef nonnull align 8 dereferenceable(48) %3)
          to label %10 unwind label %19

10:                                               ; preds = %9
  call void @_ZN3Raz6ShaderD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #5
  %11 = getelementptr inbounds i8, ptr %1, i64 168
  %12 = call noundef zeroext i1 @_ZNKSt8optionalIN3Raz25TessellationControlShaderEEcvbEv(ptr noundef nonnull align 8 dereferenceable(56) %11) #5
  br i1 %12, label %13, label %27

13:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #5
  %14 = call noundef ptr @_ZNKSt8optionalIN3Raz25TessellationControlShaderEEptEv(ptr noundef nonnull align 8 dereferenceable(56) %11) #5
  invoke void @_ZNK3Raz25TessellationControlShader5cloneEv(ptr dead_on_unwind nonnull writable sret(%"class.Raz::TessellationControlShader") align 8 %4, ptr noundef nonnull align 8 dereferenceable(48) %14)
          to label %15 unwind label %22

15:                                               ; preds = %13
  invoke void @_ZN3Raz19RenderShaderProgram28setTessellationControlShaderEONS_25TessellationControlShaderE(ptr noundef nonnull align 8 dereferenceable(384) %0, ptr noundef nonnull align 8 dereferenceable(48) %4)
          to label %16 unwind label %24

16:                                               ; preds = %15
  call void @_ZN3Raz6ShaderD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #5
  br label %27

17:                                               ; preds = %2
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %21

19:                                               ; preds = %9
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3Raz6ShaderD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #5
  br label %21

21:                                               ; preds = %19, %17
  %.pn = phi { ptr, i32 } [ %20, %19 ], [ %18, %17 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #5
  br label %78

22:                                               ; preds = %13
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %26

24:                                               ; preds = %15
  %25 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3Raz6ShaderD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  br label %26

26:                                               ; preds = %24, %22
  %.pn10 = phi { ptr, i32 } [ %25, %24 ], [ %23, %22 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #5
  br label %78

27:                                               ; preds = %16, %10
  %28 = getelementptr inbounds i8, ptr %1, i64 224
  %29 = call noundef zeroext i1 @_ZNKSt8optionalIN3Raz28TessellationEvaluationShaderEEcvbEv(ptr noundef nonnull align 8 dereferenceable(56) %28) #5
  br i1 %29, label %30, label %39

30:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #5
  %31 = call noundef ptr @_ZNKSt8optionalIN3Raz28TessellationEvaluationShaderEEptEv(ptr noundef nonnull align 8 dereferenceable(56) %28) #5
  invoke void @_ZNK3Raz28TessellationEvaluationShader5cloneEv(ptr dead_on_unwind nonnull writable sret(%"class.Raz::TessellationEvaluationShader") align 8 %5, ptr noundef nonnull align 8 dereferenceable(48) %31)
          to label %32 unwind label %34

32:                                               ; preds = %30
  invoke void @_ZN3Raz19RenderShaderProgram31setTessellationEvaluationShaderEONS_28TessellationEvaluationShaderE(ptr noundef nonnull align 8 dereferenceable(384) %0, ptr noundef nonnull align 8 dereferenceable(48) %5)
          to label %33 unwind label %36

33:                                               ; preds = %32
  call void @_ZN3Raz6ShaderD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #5
  br label %39

34:                                               ; preds = %30
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %38

36:                                               ; preds = %32
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3Raz6ShaderD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #5
  br label %38

38:                                               ; preds = %36, %34
  %.pn12 = phi { ptr, i32 } [ %37, %36 ], [ %35, %34 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #5
  br label %78

39:                                               ; preds = %33, %27
  %40 = getelementptr inbounds i8, ptr %1, i64 280
  %41 = call noundef zeroext i1 @_ZNKSt8optionalIN3Raz14GeometryShaderEEcvbEv(ptr noundef nonnull align 8 dereferenceable(56) %40) #5
  br i1 %41, label %42, label %51

42:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #5
  %43 = call noundef ptr @_ZNKSt8optionalIN3Raz14GeometryShaderEEptEv(ptr noundef nonnull align 8 dereferenceable(56) %40) #5
  invoke void @_ZNK3Raz14GeometryShader5cloneEv(ptr dead_on_unwind nonnull writable sret(%"class.Raz::GeometryShader") align 8 %6, ptr noundef nonnull align 8 dereferenceable(48) %43)
          to label %44 unwind label %46

44:                                               ; preds = %42
  invoke void @_ZN3Raz19RenderShaderProgram17setGeometryShaderEONS_14GeometryShaderE(ptr noundef nonnull align 8 dereferenceable(384) %0, ptr noundef nonnull align 8 dereferenceable(48) %6)
          to label %45 unwind label %48

45:                                               ; preds = %44
  call void @_ZN3Raz6ShaderD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #5
  br label %51

46:                                               ; preds = %42
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %50

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

50:                                               ; preds = %48, %46
  %.pn14 = phi { ptr, i32 } [ %49, %48 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #5
  br label %78

51:                                               ; preds = %45, %39
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %7) #5
  %52 = getelementptr inbounds i8, ptr %1, i64 336
  invoke void @_ZNK3Raz14FragmentShader5cloneEv(ptr dead_on_unwind nonnull writable sret(%"class.Raz::FragmentShader") align 8 %7, ptr noundef nonnull align 8 dereferenceable(48) %52)
          to label %53 unwind label %70

53:                                               ; preds = %51
  invoke void @_ZN3Raz19RenderShaderProgram17setFragmentShaderEONS_14FragmentShaderE(ptr noundef nonnull align 8 dereferenceable(384) %0, ptr noundef nonnull align 8 dereferenceable(48) %7)
          to label %54 unwind label %72

54:                                               ; preds = %53
  call void @_ZN3Raz6ShaderD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #5
  invoke void @_ZN3Raz13ShaderProgram4linkEv(ptr noundef nonnull align 8 dereferenceable(120) %0)
          to label %55 unwind label %75

55:                                               ; preds = %54
  %56 = getelementptr inbounds i8, ptr %1, i64 16
  %57 = getelementptr inbounds i8, ptr %0, i64 16
  %58 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3Raz13ShaderProgram9AttributeESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S8_EEEaSERKSH_(ptr noundef nonnull align 8 dereferenceable(56) %57, ptr noundef nonnull align 8 dereferenceable(56) %56)
          to label %59 unwind label %75

59:                                               ; preds = %55
  %60 = getelementptr inbounds i8, ptr %1, i64 72
  %61 = getelementptr inbounds i8, ptr %0, i64 72
  %62 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorISt4pairISt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISB_EEaSERKSD_(ptr noundef nonnull align 8 dereferenceable(24) %61, ptr noundef nonnull align 8 dereferenceable(24) %60)
          to label %63 unwind label %75

63:                                               ; preds = %59
  %64 = getelementptr inbounds i8, ptr %1, i64 96
  %65 = getelementptr inbounds i8, ptr %0, i64 96
  %66 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorISt4pairISt10shared_ptrIN3Raz7TextureEENS2_13ShaderProgram22ImageTextureAttachmentEESaIS7_EEaSERKS9_(ptr noundef nonnull align 8 dereferenceable(24) %65, ptr noundef nonnull align 8 dereferenceable(24) %64)
          to label %67 unwind label %75

67:                                               ; preds = %63
  invoke void @_ZNK3Raz13ShaderProgram14sendAttributesEv(ptr noundef nonnull align 8 dereferenceable(120) %1)
          to label %68 unwind label %75

68:                                               ; preds = %67
  invoke void @_ZNK3Raz13ShaderProgram12initTexturesEv(ptr noundef nonnull align 8 dereferenceable(120) %1)
          to label %69 unwind label %75

69:                                               ; preds = %68
  invoke void @_ZNK3Raz13ShaderProgram17initImageTexturesEv(ptr noundef nonnull align 8 dereferenceable(120) %1)
          to label %77 unwind label %75

70:                                               ; preds = %51
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %74

72:                                               ; preds = %53
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3Raz6ShaderD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #5
  br label %74

74:                                               ; preds = %72, %70
  %.pn16 = phi { ptr, i32 } [ %73, %72 ], [ %71, %70 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #5
  br label %78

75:                                               ; preds = %69, %68, %67, %63, %59, %55, %54
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %78

77:                                               ; preds = %69
  ret void

78:                                               ; preds = %75, %74, %50, %38, %26, %21
  %.pn18 = phi { ptr, i32 } [ %76, %75 ], [ %.pn16, %74 ], [ %.pn14, %50 ], [ %.pn12, %38 ], [ %.pn10, %26 ], [ %.pn, %21 ]
  call void @_ZN3Raz19RenderShaderProgramD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %0) #5
  resume { ptr, i32 } %.pn18
}

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

declare void @_ZNK3Raz12VertexShader5cloneEv(ptr dead_on_unwind writable sret(%"class.Raz::VertexShader") align 8, ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3

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

declare void @_ZNK3Raz25TessellationControlShader5cloneEv(ptr dead_on_unwind writable sret(%"class.Raz::TessellationControlShader") align 8, ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3

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

declare void @_ZNK3Raz28TessellationEvaluationShader5cloneEv(ptr dead_on_unwind writable sret(%"class.Raz::TessellationEvaluationShader") align 8, ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3

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

declare void @_ZNK3Raz14GeometryShader5cloneEv(ptr dead_on_unwind writable sret(%"class.Raz::GeometryShader") align 8, ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3

declare void @_ZNK3Raz14FragmentShader5cloneEv(ptr dead_on_unwind writable sret(%"class.Raz::FragmentShader") align 8, ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3Raz13ShaderProgram9AttributeESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S8_EEEaSERKSH_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #1 align 2

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

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

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

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

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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 = { 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,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass