; LLVM IR from Try/Tempest :: Engine/thirdparty/spirv_cross (spirv_msl)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.spirv_cross::TypedID.413" = type { i32 }
%"struct.spirv_cross::IVariant" = type <{ ptr, %"class.spirv_cross::TypedID.413", [4 x i8] }>
%"struct.spirv_cross::SPIRVariable" = type { %"struct.spirv_cross::IVariant.base", %"class.spirv_cross::TypedID.414", i32, i32, %"class.spirv_cross::TypedID.413", %"class.spirv_cross::TypedID.350", %"class.spirv_cross::SmallVector.92", i8, i8, %"class.spirv_cross::TypedID.413", %"class.spirv_cross::SmallVector.7", i8, i8, i8, i8, i32, %"class.spirv_cross::TypedID.415", i8, i8, i8, ptr }
%"struct.spirv_cross::IVariant.base" = type <{ ptr, %"class.spirv_cross::TypedID.413" }>
%"class.spirv_cross::TypedID.414" = type { i32 }
%"class.spirv_cross::TypedID.350" = type { i32 }
%"class.spirv_cross::SmallVector.92" = type { %"class.spirv_cross::VectorView.93", i64, %"class.spirv_cross::AlignedBuffer.94" }
%"class.spirv_cross::VectorView.93" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.94" = type { [32 x i8] }
%"class.spirv_cross::SmallVector.7" = type { %"class.spirv_cross::VectorView.8", i64, %"class.spirv_cross::AlignedBuffer.9" }
%"class.spirv_cross::VectorView.8" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.9" = type { [32 x i8] }
%"class.spirv_cross::TypedID.415" = type { i32 }

@.str.66 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1518 = external hidden unnamed_addr constant [3 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; 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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

declare noundef zeroext i1 @_ZNK11spirv_cross8Compiler8is_arrayERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(3176), ptr noundef nonnull align 8 dereferenceable(336)) #3

declare noundef ptr @_ZN11spirv_cross8Compiler26maybe_get_backing_variableEj(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef) #3

declare noundef zeroext i1 @_ZNK11spirv_cross8Compiler14has_decorationENS_7TypedIDILNS_5TypesE0EEEN3spv10DecorationE(ptr noundef nonnull align 8 dereferenceable(3176), i32, i32 noundef) #3

declare void @_ZN11spirv_cross12CompilerGLSL14to_member_nameB5cxx11ERKNS_8SPIRTypeEj(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(9848), ptr noundef nonnull align 8 dereferenceable(336), i32 noundef) #3

declare noundef zeroext i1 @_ZN11spirv_cross12CompilerGLSL18should_dereferenceEj(ptr noundef nonnull align 8 dereferenceable(9848), i32 noundef) #3

declare noundef nonnull align 8 dereferenceable(336) ptr @_ZNK11spirv_cross8Compiler16get_pointee_typeEj(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11spirv_cross11CompilerMSL19to_member_referenceB5cxx11EjRKNS_8SPIRTypeEjb(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(12482) %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(336) %3, i32 noundef %4, i1 noundef zeroext %5) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca ptr, align 8
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  %16 = alloca %"class.spirv_cross::TypedID.413", align 4
  %17 = alloca %"class.spirv_cross::TypedID.413", align 4
  %18 = alloca i8, align 1
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  store ptr %0, ptr %7, align 8
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !5
  store i32 %4, ptr %11, align 4, !tbaa !9
  %24 = zext i1 %5 to i8
  store i8 %24, ptr %12, align 1, !tbaa !11
  %25 = load ptr, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %26 = load i32, ptr %9, align 4, !tbaa !9
  %27 = call noundef ptr @_ZN11spirv_cross8Compiler26maybe_get_backing_variableEj(ptr noundef nonnull align 8 dereferenceable(3176) %25, i32 noundef %26)
  store ptr %27, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #5
  store i8 0, ptr %14, align 1, !tbaa !11
  %28 = load ptr, ptr %13, align 8, !tbaa !5
  %29 = icmp ne ptr %28, null
  br i1 %29, label %30, label %73

30:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #5
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.spirv_cross::IVariant", ptr %31, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 8 %32, i64 4, i1 false), !tbaa.struct !13
  %33 = getelementptr inbounds %"class.spirv_cross::TypedID.413", ptr %16, i32 0, i32 0
  %34 = load i32, ptr %33, align 4
  %35 = call noundef zeroext i1 @_ZNK11spirv_cross8Compiler14has_decorationENS_7TypedIDILNS_5TypesE0EEEN3spv10DecorationE(ptr noundef nonnull align 8 dereferenceable(3176) %25, i32 %34, i32 noundef 2)
  br i1 %35, label %42, label %36

36:                                               ; preds = %30
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.spirv_cross::IVariant", ptr %37, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 8 %38, i64 4, i1 false), !tbaa.struct !13
  %39 = getelementptr inbounds %"class.spirv_cross::TypedID.413", ptr %17, i32 0, i32 0
  %40 = load i32, ptr %39, align 4
  %41 = call noundef zeroext i1 @_ZNK11spirv_cross8Compiler14has_decorationENS_7TypedIDILNS_5TypesE0EEEN3spv10DecorationE(ptr noundef nonnull align 8 dereferenceable(3176) %25, i32 %40, i32 noundef 3)
  br label %42

42:                                               ; preds = %36, %30
  %43 = phi i1 [ true, %30 ], [ %41, %36 ]
  %44 = zext i1 %43 to i8
  store i8 %44, ptr %15, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  %45 = load i8, ptr %15, align 1, !tbaa !11, !range !14, !noundef !15
  %46 = trunc i8 %45 to i1
  br i1 %46, label %47, label %59

47:                                               ; preds = %42
  %48 = load ptr, ptr %13, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.spirv_cross::SPIRVariable", ptr %48, i32 0, i32 2
  %50 = load i32, ptr %49, align 8, !tbaa !16
  %51 = icmp eq i32 %50, 2
  br i1 %51, label %57, label %52

52:                                               ; preds = %47
  %53 = load ptr, ptr %13, align 8, !tbaa !5
  %54 = getelementptr inbounds %"struct.spirv_cross::SPIRVariable", ptr %53, i32 0, i32 2
  %55 = load i32, ptr %54, align 8, !tbaa !16
  %56 = icmp eq i32 %55, 12
  br label %57

57:                                               ; preds = %52, %47
  %58 = phi i1 [ true, %47 ], [ %56, %52 ]
  br label %59

59:                                               ; preds = %57, %42
  %60 = phi i1 [ false, %42 ], [ %58, %57 ]
  %61 = zext i1 %60 to i8
  store i8 %61, ptr %18, align 1, !tbaa !11
  %62 = load i8, ptr %18, align 1, !tbaa !11, !range !14, !noundef !15
  %63 = trunc i8 %62 to i1
  br i1 %63, label %64, label %70

64:                                               ; preds = %59
  %65 = load ptr, ptr %13, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.spirv_cross::SPIRVariable", ptr %65, i32 0, i32 1
  %67 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %66)
  %68 = call noundef nonnull align 8 dereferenceable(336) ptr @_ZNK11spirv_cross8Compiler16get_pointee_typeEj(ptr noundef nonnull align 8 dereferenceable(3176) %25, i32 noundef %67)
  %69 = call noundef zeroext i1 @_ZNK11spirv_cross8Compiler8is_arrayERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(3176) %25, ptr noundef nonnull align 8 dereferenceable(336) %68)
  br label %70

70:                                               ; preds = %64, %59
  %71 = phi i1 [ false, %59 ], [ %69, %64 ]
  %72 = zext i1 %71 to i8
  store i8 %72, ptr %14, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  br label %73

73:                                               ; preds = %70, %6
  %74 = load i8, ptr %14, align 1, !tbaa !11, !range !14, !noundef !15
  %75 = trunc i8 %74 to i1
  br i1 %75, label %82, label %76

76:                                               ; preds = %73
  %77 = load i8, ptr %12, align 1, !tbaa !11, !range !14, !noundef !15
  %78 = trunc i8 %77 to i1
  br i1 %78, label %90, label %79

79:                                               ; preds = %76
  %80 = load i32, ptr %9, align 4, !tbaa !9
  %81 = call noundef zeroext i1 @_ZN11spirv_cross12CompilerGLSL18should_dereferenceEj(ptr noundef nonnull align 8 dereferenceable(9848) %25, i32 noundef %80)
  br i1 %81, label %82, label %90

82:                                               ; preds = %79, %73
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #5
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  %84 = load i32, ptr %11, align 4, !tbaa !9
  call void @_ZN11spirv_cross12CompilerGLSL14to_member_nameB5cxx11ERKNS_8SPIRTypeEj(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %19, ptr noundef nonnull align 8 dereferenceable(9848) %25, ptr noundef nonnull align 8 dereferenceable(336) %83, i32 noundef %84)
  invoke void @_ZN11spirv_cross4joinIJRA3_KcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEES9_DpOT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 1 dereferenceable(3) @.str.1518, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %85 unwind label %86

85:                                               ; preds = %82
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #5
  store i32 1, ptr %22, align 4
  br label %98

86:                                               ; preds = %82
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %20, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %21, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #5
  br label %99

90:                                               ; preds = %79, %76
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #5
  %91 = load ptr, ptr %10, align 8, !tbaa !5
  %92 = load i32, ptr %11, align 4, !tbaa !9
  call void @_ZN11spirv_cross12CompilerGLSL14to_member_nameB5cxx11ERKNS_8SPIRTypeEj(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %23, ptr noundef nonnull align 8 dereferenceable(9848) %25, ptr noundef nonnull align 8 dereferenceable(336) %91, i32 noundef %92)
  invoke void @_ZN11spirv_cross4joinIJRA2_KcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEES9_DpOT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 1 dereferenceable(2) @.str.66, ptr noundef nonnull align 8 dereferenceable(32) %23)
          to label %93 unwind label %94

93:                                               ; preds = %90
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #5
  store i32 1, ptr %22, align 4
  br label %98

94:                                               ; preds = %90
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %20, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %21, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #5
  br label %99

98:                                               ; preds = %93, %85
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  ret void

99:                                               ; preds = %94, %86
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %100

100:                                              ; preds = %99
  %101 = load ptr, ptr %20, align 8
  %102 = load i32, ptr %21, align 4
  %103 = insertvalue { ptr, i32 } poison, ptr %101, 0
  %104 = insertvalue { ptr, i32 } %103, i32 %102, 1
  resume { ptr, i32 } %104
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11spirv_cross4joinIJRA3_KcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEES9_DpOT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 1 dereferenceable(3), ptr noundef nonnull align 8 dereferenceable(32)) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11spirv_cross4joinIJRA2_KcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEES9_DpOT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 1 dereferenceable(2), ptr noundef nonnull align 8 dereferenceable(32)) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i64 0, i64 4, !9}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!17, !21, i64 16}
!17 = !{!"_ZTSN11spirv_cross12SPIRVariableE", !18, i64 0, !20, i64 12, !21, i64 16, !10, i64 20, !19, i64 24, !22, i64 28, !23, i64 32, !12, i64 88, !12, i64 89, !19, i64 92, !27, i64 96, !12, i64 152, !12, i64 153, !12, i64 154, !12, i64 155, !10, i64 156, !30, i64 160, !12, i64 164, !12, i64 165, !12, i64 166, !6, i64 168}
!18 = !{!"_ZTSN11spirv_cross8IVariantE", !19, i64 8}
!19 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE0EEE", !10, i64 0}
!20 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE1EEE", !10, i64 0}
!21 = !{!"_ZTSN3spv12StorageClassE", !7, i64 0}
!22 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE2EEE", !10, i64 0}
!23 = !{!"_ZTSN11spirv_cross11SmallVectorIjLm8EEE", !24, i64 0, !25, i64 16, !26, i64 24}
!24 = !{!"_ZTSN11spirv_cross10VectorViewIjEE", !6, i64 0, !25, i64 8}
!25 = !{!"long", !7, i64 0}
!26 = !{!"_ZTSN11spirv_cross13AlignedBufferIjLm8EEE", !7, i64 0}
!27 = !{!"_ZTSN11spirv_cross11SmallVectorINS_7TypedIDILNS_5TypesE0EEELm8EEE", !28, i64 0, !25, i64 16, !29, i64 24}
!28 = !{!"_ZTSN11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE0EEEEE", !6, i64 0, !25, i64 8}
!29 = !{!"_ZTSN11spirv_cross13AlignedBufferINS_7TypedIDILNS_5TypesE0EEELm8EEE", !7, i64 0}
!30 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE6EEE", !10, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@.str.66 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1518 = external hidden unnamed_addr constant [3 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; 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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

declare noundef zeroext i1 @_ZNK11spirv_cross8Compiler8is_arrayERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(3176), ptr noundef nonnull align 8 dereferenceable(336)) local_unnamed_addr #2

declare noundef ptr @_ZN11spirv_cross8Compiler26maybe_get_backing_variableEj(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef) local_unnamed_addr #2

declare noundef zeroext i1 @_ZNK11spirv_cross8Compiler14has_decorationENS_7TypedIDILNS_5TypesE0EEEN3spv10DecorationE(ptr noundef nonnull align 8 dereferenceable(3176), i32, i32 noundef) local_unnamed_addr #2

declare void @_ZN11spirv_cross12CompilerGLSL14to_member_nameB5cxx11ERKNS_8SPIRTypeEj(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(9848), ptr noundef nonnull align 8 dereferenceable(336), i32 noundef) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN11spirv_cross12CompilerGLSL18should_dereferenceEj(ptr noundef nonnull align 8 dereferenceable(9848), i32 noundef) local_unnamed_addr #2

declare noundef nonnull align 8 dereferenceable(336) ptr @_ZNK11spirv_cross8Compiler16get_pointee_typeEj(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11spirv_cross11CompilerMSL19to_member_referenceB5cxx11EjRKNS_8SPIRTypeEjb(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(12482) %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(336) %3, i32 noundef %4, i1 noundef zeroext %5) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = tail call noundef ptr @_ZN11spirv_cross8Compiler26maybe_get_backing_variableEj(ptr noundef nonnull align 8 dereferenceable(3176) %1, i32 noundef %2)
  %.not = icmp eq ptr %9, null
  br i1 %.not, label %.critedge26, label %10

10:                                               ; preds = %6
  %11 = getelementptr inbounds i8, ptr %3, i64 8
  %.sroa.02.0.copyload = load i32, ptr %11, align 8, !tbaa !5
  %12 = tail call noundef zeroext i1 @_ZNK11spirv_cross8Compiler14has_decorationENS_7TypedIDILNS_5TypesE0EEEN3spv10DecorationE(ptr noundef nonnull align 8 dereferenceable(3176) %1, i32 %.sroa.02.0.copyload, i32 noundef 2)
  br i1 %12, label %.critedge, label %13

13:                                               ; preds = %10
  %.sroa.0.0.copyload = load i32, ptr %11, align 8, !tbaa !5
  %14 = tail call noundef zeroext i1 @_ZNK11spirv_cross8Compiler14has_decorationENS_7TypedIDILNS_5TypesE0EEEN3spv10DecorationE(ptr noundef nonnull align 8 dereferenceable(3176) %1, i32 %.sroa.0.0.copyload, i32 noundef 3)
  br i1 %14, label %.critedge, label %.critedge26

.critedge:                                        ; preds = %10, %13
  %15 = getelementptr inbounds i8, ptr %9, i64 16
  %16 = load i32, ptr %15, align 8, !tbaa !9
  switch i32 %16, label %.critedge26 [
    i32 12, label %.critedge25
    i32 2, label %.critedge25
  ]

.critedge25:                                      ; preds = %.critedge, %.critedge
  %17 = getelementptr inbounds i8, ptr %9, i64 12
  %18 = tail call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %17)
  %19 = tail call noundef nonnull align 8 dereferenceable(336) ptr @_ZNK11spirv_cross8Compiler16get_pointee_typeEj(ptr noundef nonnull align 8 dereferenceable(3176) %1, i32 noundef %18)
  %20 = tail call noundef zeroext i1 @_ZNK11spirv_cross8Compiler8is_arrayERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(3176) %1, ptr noundef nonnull align 8 dereferenceable(336) %19)
  br i1 %20, label %23, label %.critedge26

.critedge26:                                      ; preds = %6, %13, %.critedge, %.critedge25
  br i1 %5, label %27, label %21

21:                                               ; preds = %.critedge26
  %22 = tail call noundef zeroext i1 @_ZN11spirv_cross12CompilerGLSL18should_dereferenceEj(ptr noundef nonnull align 8 dereferenceable(9848) %1, i32 noundef %2)
  br i1 %22, label %23, label %27

23:                                               ; preds = %21, %.critedge25
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #4
  call void @_ZN11spirv_cross12CompilerGLSL14to_member_nameB5cxx11ERKNS_8SPIRTypeEj(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(9848) %1, ptr noundef nonnull align 8 dereferenceable(336) %3, i32 noundef %4)
  invoke void @_ZN11spirv_cross4joinIJRA3_KcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEES9_DpOT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 1 dereferenceable(3) @.str.1518, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %24 unwind label %25

24:                                               ; preds = %23
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  br label %31

25:                                               ; preds = %23
  %26 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  br label %32

27:                                               ; preds = %21, %.critedge26
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #4
  call void @_ZN11spirv_cross12CompilerGLSL14to_member_nameB5cxx11ERKNS_8SPIRTypeEj(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(9848) %1, ptr noundef nonnull align 8 dereferenceable(336) %3, i32 noundef %4)
  invoke void @_ZN11spirv_cross4joinIJRA2_KcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEES9_DpOT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 1 dereferenceable(2) @.str.66, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %28 unwind label %29

28:                                               ; preds = %27
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  br label %31

29:                                               ; preds = %27
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  br label %32

31:                                               ; preds = %28, %24
  ret void

32:                                               ; preds = %29, %25
  %.pn = phi { ptr, i32 } [ %26, %25 ], [ %30, %29 ]
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11spirv_cross4joinIJRA3_KcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEES9_DpOT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 1 dereferenceable(3), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11spirv_cross4joinIJRA2_KcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEES9_DpOT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 1 dereferenceable(2), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !14, i64 16}
!10 = !{!"_ZTSN11spirv_cross12SPIRVariableE", !11, i64 0, !13, i64 12, !14, i64 16, !6, i64 20, !12, i64 24, !15, i64 28, !16, i64 32, !21, i64 88, !21, i64 89, !12, i64 92, !22, i64 96, !21, i64 152, !21, i64 153, !21, i64 154, !21, i64 155, !6, i64 156, !25, i64 160, !21, i64 164, !21, i64 165, !21, i64 166, !18, i64 168}
!11 = !{!"_ZTSN11spirv_cross8IVariantE", !12, i64 8}
!12 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE0EEE", !6, i64 0}
!13 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE1EEE", !6, i64 0}
!14 = !{!"_ZTSN3spv12StorageClassE", !7, i64 0}
!15 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE2EEE", !6, i64 0}
!16 = !{!"_ZTSN11spirv_cross11SmallVectorIjLm8EEE", !17, i64 0, !19, i64 16, !20, i64 24}
!17 = !{!"_ZTSN11spirv_cross10VectorViewIjEE", !18, i64 0, !19, i64 8}
!18 = !{!"any pointer", !7, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!"_ZTSN11spirv_cross13AlignedBufferIjLm8EEE", !7, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"_ZTSN11spirv_cross11SmallVectorINS_7TypedIDILNS_5TypesE0EEELm8EEE", !23, i64 0, !19, i64 16, !24, i64 24}
!23 = !{!"_ZTSN11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE0EEEEE", !18, i64 0, !19, i64 8}
!24 = !{!"_ZTSN11spirv_cross13AlignedBufferINS_7TypedIDILNS_5TypesE0EEELm8EEE", !7, i64 0}
!25 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE6EEE", !6, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass