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

; 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.280" = type { i32 }
%"struct.spirv_cross::SPIRFunction::Parameter" = type <{ %"class.spirv_cross::TypedID.281", %"class.spirv_cross::TypedID.280", i32, i32, i8, [3 x i8] }>
%"class.spirv_cross::TypedID.281" = type { i32 }
%"struct.spirv_cross::SPIRType" = type { %"struct.spirv_cross::IVariant.base", i32, i32, i32, i32, i32, %"class.spirv_cross::SmallVector.92", %"class.spirv_cross::SmallVector.284", i32, i8, i8, i32, %"class.spirv_cross::SmallVector.227", %"class.spirv_cross::SmallVector.92", %"struct.spirv_cross::SPIRType::ImageType", %"class.spirv_cross::TypedID.281", %"class.spirv_cross::TypedID.281", %"class.std::unordered_set.165" }
%"struct.spirv_cross::IVariant.base" = type <{ ptr, %"class.spirv_cross::TypedID.280" }>
%"class.spirv_cross::SmallVector.284" = type { %"class.spirv_cross::VectorView.285", i64, %"class.spirv_cross::AlignedBuffer.286" }
%"class.spirv_cross::VectorView.285" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.286" = type { [8 x i8] }
%"class.spirv_cross::SmallVector.227" = type { %"class.spirv_cross::VectorView.228", i64, %"class.spirv_cross::AlignedBuffer.229" }
%"class.spirv_cross::VectorView.228" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.229" = type { [32 x i8] }
%"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] }
%"struct.spirv_cross::SPIRType::ImageType" = type { %"class.spirv_cross::TypedID.281", i32, i8, i8, i8, i32, i32, i32 }
%"class.std::unordered_set.165" = type { %"class.std::_Hashtable.166" }
%"class.std::_Hashtable.166" = 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 }
%"struct.spirv_cross::IVariant" = type <{ ptr, %"class.spirv_cross::TypedID.280", [4 x i8] }>

@.str.9 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.313 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.314 = external hidden unnamed_addr constant [5 x i8], align 1

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

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

declare noundef i32 @_ZNK11spirv_cross8Compiler19get_execution_modelEv(ptr noundef nonnull align 8 dereferenceable(3176)) #2

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

declare noundef zeroext i1 @_ZNK11spirv_cross8Compiler14has_decorationENS_7TypedIDILNS_5TypesE0EEEN3spv10DecorationE(ptr noundef nonnull align 8 dereferenceable(3176), i32, i32 noundef) #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) #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11spirv_cross12CompilerGLSL13argument_declB5cxx11ERKNS_12SPIRFunction9ParameterE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(9848) %1, ptr noundef nonnull align 4 dereferenceable(17) %2) #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.spirv_cross::TypedID.280", align 4
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  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
  %15 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  %17 = getelementptr inbounds %"struct.spirv_cross::SPIRFunction::Parameter", ptr %16, i32 0, i32 1
  %18 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %17)
  %19 = call noundef nonnull align 8 dereferenceable(336) ptr @_ZNK11spirv_cross8Compiler15expression_typeEj(ptr noundef nonnull align 8 dereferenceable(3176) %15, i32 noundef %18)
  store ptr %19, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store ptr @.str.9, ptr %8, align 8, !tbaa !5
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %20, i32 0, i32 9
  %22 = load i8, ptr %21, align 4, !tbaa !9, !range !38, !noundef !39
  %23 = trunc i8 %22 to i1
  br i1 %23, label %24, label %67

24:                                               ; preds = %3
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %25, i32 0, i32 11
  %27 = load i32, ptr %26, align 8, !tbaa !40
  %28 = icmp eq i32 %27, 3
  br i1 %28, label %29, label %47

29:                                               ; preds = %24
  %30 = call noundef i32 @_ZNK11spirv_cross8Compiler19get_execution_modelEv(ptr noundef nonnull align 8 dereferenceable(3176) %15)
  %31 = icmp eq i32 %30, 5365
  br i1 %31, label %32, label %47

32:                                               ; preds = %29
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.spirv_cross::IVariant", ptr %33, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %9, ptr align 8 %34, i64 4, i1 false), !tbaa.struct !41
  %35 = getelementptr inbounds %"class.spirv_cross::TypedID.280", ptr %9, i32 0, i32 0
  %36 = load i32, ptr %35, align 4
  %37 = call noundef zeroext i1 @_ZNK11spirv_cross8Compiler14has_decorationENS_7TypedIDILNS_5TypesE0EEEN3spv10DecorationE(ptr noundef nonnull align 8 dereferenceable(3176) %15, i32 %36, i32 noundef 2)
  br i1 %37, label %38, label %47

38:                                               ; preds = %32
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = call noundef zeroext i1 @_ZNK11spirv_cross8Compiler15is_builtin_typeERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(3176) %15, ptr noundef nonnull align 8 dereferenceable(336) %39)
  br i1 %40, label %41, label %47

41:                                               ; preds = %38
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.spirv_cross::SPIRFunction::Parameter", ptr %42, i32 0, i32 3
  %44 = load i32, ptr %43, align 4, !tbaa !43
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %46, label %47

46:                                               ; preds = %41
  store ptr @.str.314, ptr %8, align 8, !tbaa !5
  br label %66

47:                                               ; preds = %41, %38, %32, %29, %24
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.spirv_cross::SPIRFunction::Parameter", ptr %48, i32 0, i32 3
  %50 = load i32, ptr %49, align 4, !tbaa !43
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %58

52:                                               ; preds = %47
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = getelementptr inbounds %"struct.spirv_cross::SPIRFunction::Parameter", ptr %53, i32 0, i32 2
  %55 = load i32, ptr %54, align 4, !tbaa !45
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %57, label %58

57:                                               ; preds = %52
  store ptr @.str.313, ptr %8, align 8, !tbaa !5
  br label %65

58:                                               ; preds = %52, %47
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.spirv_cross::SPIRFunction::Parameter", ptr %59, i32 0, i32 3
  %61 = load i32, ptr %60, align 4, !tbaa !43
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %63, label %64

63:                                               ; preds = %58
  store ptr @.str.314, ptr %8, align 8, !tbaa !5
  br label %64

64:                                               ; preds = %63, %58
  br label %65

65:                                               ; preds = %64, %57
  br label %66

66:                                               ; preds = %65, %46
  br label %67

67:                                               ; preds = %66, %3
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #5
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.spirv_cross::SPIRFunction::Parameter", ptr %68, i32 0, i32 1
  %70 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %69)
  %71 = load ptr, ptr %15, align 8, !tbaa !46
  %72 = getelementptr inbounds ptr, ptr %71, i64 50
  %73 = load ptr, ptr %72, align 8
  call void %73(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(9848) %15, i32 noundef %70)
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #5
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #5
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.spirv_cross::SPIRFunction::Parameter", ptr %75, i32 0, i32 1
  %77 = invoke noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %76)
          to label %78 unwind label %92

78:                                               ; preds = %67
  %79 = load ptr, ptr %15, align 8, !tbaa !46
  %80 = getelementptr inbounds ptr, ptr %79, i64 6
  %81 = load ptr, ptr %80, align 8
  invoke void %81(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull align 8 dereferenceable(3176) %15, i32 noundef %77, i1 noundef zeroext true)
          to label %82 unwind label %92

82:                                               ; preds = %78
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.spirv_cross::SPIRFunction::Parameter", ptr %83, i32 0, i32 1
  %85 = invoke noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %84)
          to label %86 unwind label %96

86:                                               ; preds = %82
  %87 = load ptr, ptr %15, align 8, !tbaa !46
  %88 = getelementptr inbounds ptr, ptr %87, i64 27
  %89 = load ptr, ptr %88, align 8
  invoke void %89(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef nonnull align 8 dereferenceable(9848) %15, ptr noundef nonnull align 8 dereferenceable(336) %74, ptr noundef nonnull align 8 dereferenceable(32) %12, i32 noundef %85)
          to label %90 unwind label %96

90:                                               ; preds = %86
  invoke void @_ZN11spirv_cross4joinIJRPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_EEES9_DpOT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %91 unwind label %100

91:                                               ; preds = %90
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  ret void

92:                                               ; preds = %78, %67
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %13, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %14, align 4
  br label %105

96:                                               ; preds = %86, %82
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %13, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %14, align 4
  br label %104

100:                                              ; preds = %90
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %13, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  br label %104

104:                                              ; preds = %100, %96
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  br label %105

105:                                              ; preds = %104, %92
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %106

106:                                              ; preds = %105
  %107 = load ptr, ptr %13, align 8
  %108 = load i32, ptr %14, align 4
  %109 = insertvalue { ptr, i32 } poison, ptr %107, 0
  %110 = insertvalue { ptr, i32 } %109, i32 %108, 1
  resume { ptr, i32 } %110
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11spirv_cross4joinIJRPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_EEES9_DpOT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32), 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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !23, i64 124}
!10 = !{!"_ZTSN11spirv_cross8SPIRTypeE", !11, i64 0, !14, i64 12, !15, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !16, i64 32, !20, i64 88, !13, i64 120, !23, i64 124, !23, i64 125, !24, i64 128, !25, i64 136, !16, i64 192, !28, i64 248, !29, i64 272, !29, i64 276, !33, i64 280}
!11 = !{!"_ZTSN11spirv_cross8IVariantE", !12, i64 8}
!12 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE0EEE", !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSN3spv2OpE", !7, i64 0}
!15 = !{!"_ZTSN11spirv_cross8SPIRType8BaseTypeE", !7, i64 0}
!16 = !{!"_ZTSN11spirv_cross11SmallVectorIjLm8EEE", !17, i64 0, !18, i64 16, !19, i64 24}
!17 = !{!"_ZTSN11spirv_cross10VectorViewIjEE", !6, i64 0, !18, i64 8}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSN11spirv_cross13AlignedBufferIjLm8EEE", !7, i64 0}
!20 = !{!"_ZTSN11spirv_cross11SmallVectorIbLm8EEE", !21, i64 0, !18, i64 16, !22, i64 24}
!21 = !{!"_ZTSN11spirv_cross10VectorViewIbEE", !6, i64 0, !18, i64 8}
!22 = !{!"_ZTSN11spirv_cross13AlignedBufferIbLm8EEE", !7, i64 0}
!23 = !{!"bool", !7, i64 0}
!24 = !{!"_ZTSN3spv12StorageClassE", !7, i64 0}
!25 = !{!"_ZTSN11spirv_cross11SmallVectorINS_7TypedIDILNS_5TypesE1EEELm8EEE", !26, i64 0, !18, i64 16, !27, i64 24}
!26 = !{!"_ZTSN11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEE", !6, i64 0, !18, i64 8}
!27 = !{!"_ZTSN11spirv_cross13AlignedBufferINS_7TypedIDILNS_5TypesE1EEELm8EEE", !7, i64 0}
!28 = !{!"_ZTSN11spirv_cross8SPIRType9ImageTypeE", !29, i64 0, !30, i64 4, !23, i64 8, !23, i64 9, !23, i64 10, !13, i64 12, !31, i64 16, !32, i64 20}
!29 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE1EEE", !13, i64 0}
!30 = !{!"_ZTSN3spv3DimE", !7, i64 0}
!31 = !{!"_ZTSN3spv11ImageFormatE", !7, i64 0}
!32 = !{!"_ZTSN3spv15AccessQualifierE", !7, i64 0}
!33 = !{!"_ZTSSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE", !34, i64 0}
!34 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE", !6, i64 0, !18, i64 8, !35, i64 16, !18, i64 24, !36, i64 32, !6, i64 48}
!35 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!36 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !37, i64 0, !18, i64 8}
!37 = !{!"float", !7, i64 0}
!38 = !{i8 0, i8 2}
!39 = !{}
!40 = !{!10, !24, i64 128}
!41 = !{i64 0, i64 4, !42}
!42 = !{!13, !13, i64 0}
!43 = !{!44, !13, i64 12}
!44 = !{!"_ZTSN11spirv_cross12SPIRFunction9ParameterE", !29, i64 0, !12, i64 4, !13, i64 8, !13, i64 12, !23, i64 16}
!45 = !{!44, !13, i64 8}
!46 = !{!47, !47, i64 0}
!47 = !{!"vtable pointer", !8, 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.9 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.313 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.314 = external hidden unnamed_addr constant [5 x i8], align 1

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

; Function Attrs: mustprogress 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 nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 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 noundef nonnull align 8 dereferenceable(336) ptr @_ZNK11spirv_cross8Compiler15expression_typeEj(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11spirv_cross12CompilerGLSL13argument_declB5cxx11ERKNS_12SPIRFunction9ParameterE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(9848) %1, ptr noundef nonnull align 4 dereferenceable(17) %2) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = getelementptr inbounds i8, ptr %2, i64 4
  %9 = tail call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %8)
  %10 = tail call noundef nonnull align 8 dereferenceable(336) ptr @_ZNK11spirv_cross8Compiler15expression_typeEj(ptr noundef nonnull align 8 dereferenceable(3176) %1, i32 noundef %9)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  store ptr @.str.9, ptr %4, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %10, i64 124
  %12 = load i8, ptr %11, align 4, !tbaa !9, !range !38, !noundef !39
  %13 = trunc nuw i8 %12 to i1
  br i1 %13, label %14, label %37

14:                                               ; preds = %3
  %15 = getelementptr inbounds i8, ptr %10, i64 128
  %16 = load i32, ptr %15, align 8, !tbaa !40
  %17 = icmp eq i32 %16, 3
  br i1 %17, label %18, label %29

18:                                               ; preds = %14
  %19 = tail call noundef i32 @_ZNK11spirv_cross8Compiler19get_execution_modelEv(ptr noundef nonnull align 8 dereferenceable(3176) %1)
  %20 = icmp eq i32 %19, 5365
  br i1 %20, label %21, label %29

21:                                               ; preds = %18
  %22 = getelementptr inbounds i8, ptr %10, i64 8
  %.sroa.0.0.copyload = load i32, ptr %22, align 8, !tbaa !41
  %23 = 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 2)
  br i1 %23, label %24, label %29

24:                                               ; preds = %21
  %25 = tail call noundef zeroext i1 @_ZNK11spirv_cross8Compiler15is_builtin_typeERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(3176) %1, ptr noundef nonnull align 8 dereferenceable(336) %10)
  %26 = getelementptr inbounds i8, ptr %2, i64 12
  %27 = load i32, ptr %26, align 4
  %.not = icmp ne i32 %27, 0
  %or.cond.not = select i1 %25, i1 %.not, i1 false
  br i1 %or.cond.not, label %28, label %29

28:                                               ; preds = %24
  store ptr @.str.314, ptr %4, align 8, !tbaa !5
  br label %37

29:                                               ; preds = %24, %21, %18, %14
  %30 = getelementptr inbounds i8, ptr %2, i64 12
  %31 = load i32, ptr %30, align 4, !tbaa !42
  %.not17 = icmp eq i32 %31, 0
  %32 = getelementptr inbounds i8, ptr %2, i64 8
  %33 = load i32, ptr %32, align 4
  %.not18 = icmp eq i32 %33, 0
  %or.cond25 = select i1 %.not17, i1 true, i1 %.not18
  br i1 %or.cond25, label %35, label %34

34:                                               ; preds = %29
  store ptr @.str.313, ptr %4, align 8, !tbaa !5
  br label %37

35:                                               ; preds = %29
  br i1 %.not17, label %37, label %36

36:                                               ; preds = %35
  store ptr @.str.314, ptr %4, align 8, !tbaa !5
  br label %37

37:                                               ; preds = %28, %35, %36, %34, %3
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  %38 = tail call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %8)
  %39 = load ptr, ptr %1, align 8, !tbaa !44
  %40 = getelementptr inbounds i8, ptr %39, i64 400
  %41 = load ptr, ptr %40, align 8
  call void %41(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 8 dereferenceable(9848) %1, i32 noundef %38)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #4
  %42 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %8)
  %43 = load ptr, ptr %1, align 8, !tbaa !44
  %44 = getelementptr inbounds i8, ptr %43, i64 48
  %45 = load ptr, ptr %44, align 8
  invoke void %45(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(3176) %1, i32 noundef %42, i1 noundef zeroext true)
          to label %46 unwind label %53

46:                                               ; preds = %37
  %47 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %8)
  %48 = load ptr, ptr %1, align 8, !tbaa !44
  %49 = getelementptr inbounds i8, ptr %48, i64 216
  %50 = load ptr, ptr %49, align 8
  invoke void %50(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(9848) %1, ptr noundef nonnull align 8 dereferenceable(336) %10, ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %47)
          to label %51 unwind label %55

51:                                               ; preds = %46
  invoke void @_ZN11spirv_cross4joinIJRPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_EEES9_DpOT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %52 unwind label %57

52:                                               ; preds = %51
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  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
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  ret void

53:                                               ; preds = %37
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %60

55:                                               ; preds = %46
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %59

57:                                               ; preds = %51
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  br label %59

59:                                               ; preds = %57, %55
  %.pn = phi { ptr, i32 } [ %58, %57 ], [ %56, %55 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  br label %60

60:                                               ; preds = %59, %53
  %.pn.pn = phi { ptr, i32 } [ %.pn, %59 ], [ %54, %53 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  resume { ptr, i32 } %.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11spirv_cross4joinIJRPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_EEES9_DpOT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32), 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !23, i64 124}
!10 = !{!"_ZTSN11spirv_cross8SPIRTypeE", !11, i64 0, !14, i64 12, !15, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !16, i64 32, !20, i64 88, !13, i64 120, !23, i64 124, !23, i64 125, !24, i64 128, !25, i64 136, !16, i64 192, !28, i64 248, !29, i64 272, !29, i64 276, !33, i64 280}
!11 = !{!"_ZTSN11spirv_cross8IVariantE", !12, i64 8}
!12 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE0EEE", !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSN3spv2OpE", !7, i64 0}
!15 = !{!"_ZTSN11spirv_cross8SPIRType8BaseTypeE", !7, i64 0}
!16 = !{!"_ZTSN11spirv_cross11SmallVectorIjLm8EEE", !17, i64 0, !18, i64 16, !19, i64 24}
!17 = !{!"_ZTSN11spirv_cross10VectorViewIjEE", !6, i64 0, !18, i64 8}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSN11spirv_cross13AlignedBufferIjLm8EEE", !7, i64 0}
!20 = !{!"_ZTSN11spirv_cross11SmallVectorIbLm8EEE", !21, i64 0, !18, i64 16, !22, i64 24}
!21 = !{!"_ZTSN11spirv_cross10VectorViewIbEE", !6, i64 0, !18, i64 8}
!22 = !{!"_ZTSN11spirv_cross13AlignedBufferIbLm8EEE", !7, i64 0}
!23 = !{!"bool", !7, i64 0}
!24 = !{!"_ZTSN3spv12StorageClassE", !7, i64 0}
!25 = !{!"_ZTSN11spirv_cross11SmallVectorINS_7TypedIDILNS_5TypesE1EEELm8EEE", !26, i64 0, !18, i64 16, !27, i64 24}
!26 = !{!"_ZTSN11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEE", !6, i64 0, !18, i64 8}
!27 = !{!"_ZTSN11spirv_cross13AlignedBufferINS_7TypedIDILNS_5TypesE1EEELm8EEE", !7, i64 0}
!28 = !{!"_ZTSN11spirv_cross8SPIRType9ImageTypeE", !29, i64 0, !30, i64 4, !23, i64 8, !23, i64 9, !23, i64 10, !13, i64 12, !31, i64 16, !32, i64 20}
!29 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE1EEE", !13, i64 0}
!30 = !{!"_ZTSN3spv3DimE", !7, i64 0}
!31 = !{!"_ZTSN3spv11ImageFormatE", !7, i64 0}
!32 = !{!"_ZTSN3spv15AccessQualifierE", !7, i64 0}
!33 = !{!"_ZTSSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE", !34, i64 0}
!34 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE", !6, i64 0, !18, i64 8, !35, i64 16, !18, i64 24, !36, i64 32, !6, i64 48}
!35 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!36 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !37, i64 0, !18, i64 8}
!37 = !{!"float", !7, i64 0}
!38 = !{i8 0, i8 2}
!39 = !{}
!40 = !{!10, !24, i64 128}
!41 = !{!13, !13, i64 0}
!42 = !{!43, !13, i64 12}
!43 = !{!"_ZTSN11spirv_cross12SPIRFunction9ParameterE", !29, i64 0, !12, i64 4, !13, i64 8, !13, i64 12, !23, i64 16}
!44 = !{!45, !45, i64 0}
!45 = !{!"vtable pointer", !8, i64 0}


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