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

%"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::TypedID.280" = type { i32 }
%"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.spirv_cross::TypedID.281" = type { 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::SPIRVariable" = type { %"struct.spirv_cross::IVariant.base", %"class.spirv_cross::TypedID.281", i32, i32, %"class.spirv_cross::TypedID.280", %"class.spirv_cross::TypedID.282", %"class.spirv_cross::SmallVector.92", i8, i8, %"class.spirv_cross::TypedID.280", %"class.spirv_cross::SmallVector.7", i8, i8, i8, i8, i32, %"class.spirv_cross::TypedID.283", i8, i8, i8, ptr }
%"class.spirv_cross::TypedID.282" = type { i32 }
%"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.283" = type { i32 }
%"struct.spirv_cross::SPIRExpression" = type <{ %"struct.spirv_cross::IVariant.base", %"class.spirv_cross::TypedID.280", %"class.std::__cxx11::basic_string", %"class.spirv_cross::TypedID.281", %"class.spirv_cross::TypedID.280", i8, i8, i8, i8, [4 x i8], %"class.spirv_cross::SmallVector.7", %"class.spirv_cross::SmallVector.7", %"class.spirv_cross::SmallVector.7", i32, [4 x i8] }>
%"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] }
%"struct.spirv_cross::IVariant" = type <{ ptr, %"class.spirv_cross::TypedID.280", [4 x i8] }>

; 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 dso_local noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN11spirv_cross8Compiler9maybe_getINS_12SPIRVariableEEEPT_j(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN11spirv_cross8Compiler9maybe_getINS_14SPIRExpressionEEEPT_j(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11spirv_cross12CompilerGLSL18should_dereferenceEj(ptr noundef nonnull align 8 dereferenceable(9848) %0, i32 noundef %1) #2 align 2 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  %12 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %13 = load i32, ptr %5, align 4, !tbaa !9
  %14 = call noundef nonnull align 8 dereferenceable(336) ptr @_ZNK11spirv_cross8Compiler15expression_typeEj(ptr noundef nonnull align 8 dereferenceable(3176) %12, i32 noundef %13)
  store ptr %14, ptr %6, align 8, !tbaa !5
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %15, i32 0, i32 9
  %17 = load i8, ptr %16, align 4, !tbaa !11, !range !39, !noundef !40
  %18 = trunc i8 %17 to i1
  br i1 %18, label %20, label %19

19:                                               ; preds = %2
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %126

20:                                               ; preds = %2
  %21 = load i32, ptr %5, align 4, !tbaa !9
  %22 = call noundef zeroext i1 @_ZNK11spirv_cross8Compiler20expression_is_lvalueEj(ptr noundef nonnull align 8 dereferenceable(3176) %12, i32 noundef %21)
  br i1 %22, label %24, label %23

23:                                               ; preds = %20
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %126

24:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %25 = load i32, ptr %5, align 4, !tbaa !9
  %26 = call noundef ptr @_ZN11spirv_cross8Compiler9maybe_getINS_12SPIRVariableEEEPT_j(ptr noundef nonnull align 8 dereferenceable(3176) %12, i32 noundef %25)
  store ptr %26, ptr %8, align 8, !tbaa !5
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %34

29:                                               ; preds = %24
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.spirv_cross::SPIRVariable", ptr %30, i32 0, i32 12
  %32 = load i8, ptr %31, align 1, !tbaa !41, !range !39, !noundef !40
  %33 = trunc i8 %32 to i1
  store i1 %33, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %35

34:                                               ; preds = %24
  store i32 0, ptr %7, align 4
  br label %35

35:                                               ; preds = %34, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %36 = load i32, ptr %7, align 4
  switch i32 %36, label %126 [
    i32 0, label %37
  ]

37:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %38 = load i32, ptr %5, align 4, !tbaa !9
  %39 = call noundef ptr @_ZN11spirv_cross8Compiler9maybe_getINS_14SPIRExpressionEEEPT_j(ptr noundef nonnull align 8 dereferenceable(3176) %12, i32 noundef %38)
  store ptr %39, ptr %9, align 8, !tbaa !5
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = icmp ne ptr %40, null
  br i1 %41, label %42, label %122

42:                                               ; preds = %37
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.spirv_cross::SPIRExpression", ptr %43, i32 0, i32 7
  %45 = load i8, ptr %44, align 2, !tbaa !48, !range !39, !noundef !40
  %46 = trunc i8 %45 to i1
  br i1 %46, label %47, label %48

47:                                               ; preds = %42
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %123

48:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store ptr null, ptr %10, align 8, !tbaa !5
  br label %49

49:                                               ; preds = %111, %48
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.spirv_cross::SPIRExpression", ptr %50, i32 0, i32 4
  %52 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %51)
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %59

54:                                               ; preds = %49
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.spirv_cross::IVariant", ptr %55, i32 0, i32 1
  %57 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %56)
  %58 = call noundef zeroext i1 @_ZNK11spirv_cross12CompilerGLSL23expression_is_forwardedEj(ptr noundef nonnull align 8 dereferenceable(9848) %12, i32 noundef %57)
  br label %59

59:                                               ; preds = %54, %49
  %60 = phi i1 [ false, %49 ], [ %58, %54 ]
  br i1 %60, label %61, label %112

61:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.spirv_cross::SPIRExpression", ptr %62, i32 0, i32 4
  %64 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %63)
  %65 = call noundef nonnull align 8 dereferenceable(336) ptr @_ZNK11spirv_cross8Compiler15expression_typeEj(ptr noundef nonnull align 8 dereferenceable(3176) %12, i32 noundef %64)
  store ptr %65, ptr %11, align 8, !tbaa !5
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %66, i32 0, i32 9
  %68 = load i8, ptr %67, align 4, !tbaa !11, !range !39, !noundef !40
  %69 = trunc i8 %68 to i1
  %70 = zext i1 %69 to i32
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %71, i32 0, i32 9
  %73 = load i8, ptr %72, align 4, !tbaa !11, !range !39, !noundef !40
  %74 = trunc i8 %73 to i1
  %75 = zext i1 %74 to i32
  %76 = icmp ne i32 %70, %75
  br i1 %76, label %93, label %77

77:                                               ; preds = %61
  %78 = load ptr, ptr %11, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %78, i32 0, i32 8
  %80 = load i32, ptr %79, align 8, !tbaa !52
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %81, i32 0, i32 8
  %83 = load i32, ptr %82, align 8, !tbaa !52
  %84 = icmp ne i32 %80, %83
  br i1 %84, label %93, label %85

85:                                               ; preds = %77
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %86, i32 0, i32 16
  %88 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %87)
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %89, i32 0, i32 16
  %91 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %90)
  %92 = icmp ne i32 %88, %91
  br i1 %92, label %93, label %94

93:                                               ; preds = %85, %77, %61
  store i32 3, ptr %7, align 4
  br label %109

94:                                               ; preds = %85
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = getelementptr inbounds %"struct.spirv_cross::SPIRExpression", ptr %95, i32 0, i32 4
  %97 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %96)
  %98 = call noundef ptr @_ZN11spirv_cross8Compiler9maybe_getINS_12SPIRVariableEEEPT_j(ptr noundef nonnull align 8 dereferenceable(3176) %12, i32 noundef %97)
  store ptr %98, ptr %10, align 8, !tbaa !5
  %99 = icmp ne ptr %98, null
  br i1 %99, label %100, label %101

100:                                              ; preds = %94
  store i32 3, ptr %7, align 4
  br label %109

101:                                              ; preds = %94
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = getelementptr inbounds %"struct.spirv_cross::SPIRExpression", ptr %102, i32 0, i32 4
  %104 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %103)
  %105 = call noundef ptr @_ZN11spirv_cross8Compiler9maybe_getINS_14SPIRExpressionEEEPT_j(ptr noundef nonnull align 8 dereferenceable(3176) %12, i32 noundef %104)
  store ptr %105, ptr %9, align 8, !tbaa !5
  %106 = icmp ne ptr %105, null
  br i1 %106, label %108, label %107

107:                                              ; preds = %101
  store i32 3, ptr %7, align 4
  br label %109

108:                                              ; preds = %101
  store i32 0, ptr %7, align 4
  br label %109

109:                                              ; preds = %108, %107, %100, %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  %110 = load i32, ptr %7, align 4
  switch i32 %110, label %128 [
    i32 0, label %111
    i32 3, label %112
  ]

111:                                              ; preds = %109
  br label %49, !llvm.loop !53

112:                                              ; preds = %109, %59
  %113 = load ptr, ptr %10, align 8, !tbaa !5
  %114 = icmp ne ptr %113, null
  br i1 %114, label %115, label %120

115:                                              ; preds = %112
  %116 = load ptr, ptr %10, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.spirv_cross::SPIRVariable", ptr %116, i32 0, i32 12
  %118 = load i8, ptr %117, align 1, !tbaa !41, !range !39, !noundef !40
  %119 = trunc i8 %118 to i1
  br label %120

120:                                              ; preds = %115, %112
  %121 = phi i1 [ true, %112 ], [ %119, %115 ]
  store i1 %121, ptr %3, align 1
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %123

122:                                              ; preds = %37
  store i32 0, ptr %7, align 4
  br label %123

123:                                              ; preds = %122, %120, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  %124 = load i32, ptr %7, align 4
  switch i32 %124, label %126 [
    i32 0, label %125
  ]

125:                                              ; preds = %123
  store i1 true, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %126

126:                                              ; preds = %125, %123, %35, %23, %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %127 = load i1, ptr %3, align 1
  ret i1 %127

128:                                              ; preds = %109
  unreachable
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK11spirv_cross12CompilerGLSL23expression_is_forwardedEj(ptr noundef nonnull align 8 dereferenceable(9848), i32 noundef) #2 align 2

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 = { 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 #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 = { 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, !24, i64 124}
!12 = !{!"_ZTSN11spirv_cross8SPIRTypeE", !13, i64 0, !15, i64 12, !16, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !17, i64 32, !21, i64 88, !10, i64 120, !24, i64 124, !24, i64 125, !25, i64 128, !26, i64 136, !17, i64 192, !29, i64 248, !30, i64 272, !30, i64 276, !34, i64 280}
!13 = !{!"_ZTSN11spirv_cross8IVariantE", !14, i64 8}
!14 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE0EEE", !10, i64 0}
!15 = !{!"_ZTSN3spv2OpE", !7, i64 0}
!16 = !{!"_ZTSN11spirv_cross8SPIRType8BaseTypeE", !7, i64 0}
!17 = !{!"_ZTSN11spirv_cross11SmallVectorIjLm8EEE", !18, i64 0, !19, i64 16, !20, i64 24}
!18 = !{!"_ZTSN11spirv_cross10VectorViewIjEE", !6, i64 0, !19, i64 8}
!19 = !{!"long", !7, i64 0}
!20 = !{!"_ZTSN11spirv_cross13AlignedBufferIjLm8EEE", !7, i64 0}
!21 = !{!"_ZTSN11spirv_cross11SmallVectorIbLm8EEE", !22, i64 0, !19, i64 16, !23, i64 24}
!22 = !{!"_ZTSN11spirv_cross10VectorViewIbEE", !6, i64 0, !19, i64 8}
!23 = !{!"_ZTSN11spirv_cross13AlignedBufferIbLm8EEE", !7, i64 0}
!24 = !{!"bool", !7, i64 0}
!25 = !{!"_ZTSN3spv12StorageClassE", !7, i64 0}
!26 = !{!"_ZTSN11spirv_cross11SmallVectorINS_7TypedIDILNS_5TypesE1EEELm8EEE", !27, i64 0, !19, i64 16, !28, i64 24}
!27 = !{!"_ZTSN11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEE", !6, i64 0, !19, i64 8}
!28 = !{!"_ZTSN11spirv_cross13AlignedBufferINS_7TypedIDILNS_5TypesE1EEELm8EEE", !7, i64 0}
!29 = !{!"_ZTSN11spirv_cross8SPIRType9ImageTypeE", !30, i64 0, !31, i64 4, !24, i64 8, !24, i64 9, !24, i64 10, !10, i64 12, !32, i64 16, !33, i64 20}
!30 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE1EEE", !10, i64 0}
!31 = !{!"_ZTSN3spv3DimE", !7, i64 0}
!32 = !{!"_ZTSN3spv11ImageFormatE", !7, i64 0}
!33 = !{!"_ZTSN3spv15AccessQualifierE", !7, i64 0}
!34 = !{!"_ZTSSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE", !35, i64 0}
!35 = !{!"_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, !19, i64 8, !36, i64 16, !19, i64 24, !37, i64 32, !6, i64 48}
!36 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!37 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !38, i64 0, !19, i64 8}
!38 = !{!"float", !7, i64 0}
!39 = !{i8 0, i8 2}
!40 = !{}
!41 = !{!42, !24, i64 153}
!42 = !{!"_ZTSN11spirv_cross12SPIRVariableE", !13, i64 0, !30, i64 12, !25, i64 16, !10, i64 20, !14, i64 24, !43, i64 28, !17, i64 32, !24, i64 88, !24, i64 89, !14, i64 92, !44, i64 96, !24, i64 152, !24, i64 153, !24, i64 154, !24, i64 155, !10, i64 156, !47, i64 160, !24, i64 164, !24, i64 165, !24, i64 166, !6, i64 168}
!43 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE2EEE", !10, i64 0}
!44 = !{!"_ZTSN11spirv_cross11SmallVectorINS_7TypedIDILNS_5TypesE0EEELm8EEE", !45, i64 0, !19, i64 16, !46, i64 24}
!45 = !{!"_ZTSN11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE0EEEEE", !6, i64 0, !19, i64 8}
!46 = !{!"_ZTSN11spirv_cross13AlignedBufferINS_7TypedIDILNS_5TypesE0EEELm8EEE", !7, i64 0}
!47 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE6EEE", !10, i64 0}
!48 = !{!49, !24, i64 58}
!49 = !{!"_ZTSN11spirv_cross14SPIRExpressionE", !13, i64 0, !14, i64 12, !50, i64 16, !30, i64 48, !14, i64 52, !24, i64 56, !24, i64 57, !24, i64 58, !24, i64 59, !44, i64 64, !44, i64 120, !44, i64 176, !10, i64 232}
!50 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !51, i64 0, !19, i64 8, !7, i64 16}
!51 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!52 = !{!12, !10, i64 120}
!53 = distinct !{!53, !54}
!54 = !{!"llvm.loop.mustprogress"}


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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11spirv_cross12CompilerGLSL18should_dereferenceEj(ptr noundef nonnull align 8 dereferenceable(9848) %0, i32 noundef %1) local_unnamed_addr #1 align 2 {
  %3 = tail call noundef nonnull align 8 dereferenceable(336) ptr @_ZNK11spirv_cross8Compiler15expression_typeEj(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 noundef %1)
  %4 = getelementptr inbounds i8, ptr %3, i64 124
  %5 = load i8, ptr %4, align 4, !tbaa !5, !range !37, !noundef !38
  %6 = trunc nuw i8 %5 to i1
  br i1 %6, label %7, label %.critedge.thread

7:                                                ; preds = %2
  %8 = tail call noundef zeroext i1 @_ZNK11spirv_cross8Compiler20expression_is_lvalueEj(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 noundef %1)
  br i1 %8, label %9, label %.critedge.thread

9:                                                ; preds = %7
  %10 = tail call noundef ptr @_ZN11spirv_cross8Compiler9maybe_getINS_12SPIRVariableEEEPT_j(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 noundef %1)
  %.not = icmp eq ptr %10, null
  br i1 %.not, label %11, label %.critedge.thread.sink.split

11:                                               ; preds = %9
  %12 = tail call noundef ptr @_ZN11spirv_cross8Compiler9maybe_getINS_14SPIRExpressionEEEPT_j(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 noundef %1)
  %.not41 = icmp eq ptr %12, null
  br i1 %.not41, label %.critedge.thread, label %13

13:                                               ; preds = %11
  %14 = getelementptr inbounds i8, ptr %12, i64 58
  %15 = load i8, ptr %14, align 2, !tbaa !39, !range !37, !noundef !38
  %16 = trunc nuw i8 %15 to i1
  br i1 %16, label %.critedge.thread, label %.preheader

.preheader:                                       ; preds = %13
  %17 = getelementptr inbounds i8, ptr %3, i64 120
  %18 = getelementptr inbounds i8, ptr %3, i64 276
  br label %19

19:                                               ; preds = %.preheader, %43
  %.030 = phi ptr [ %45, %43 ], [ %12, %.preheader ]
  %20 = getelementptr inbounds i8, ptr %.030, i64 52
  %21 = tail call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %20)
  %.not42 = icmp eq i32 %21, 0
  br i1 %.not42, label %.critedge.thread, label %22

22:                                               ; preds = %19
  %23 = getelementptr inbounds i8, ptr %.030, i64 8
  %24 = tail call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %23)
  %25 = tail call noundef zeroext i1 @_ZNK11spirv_cross12CompilerGLSL23expression_is_forwardedEj(ptr noundef nonnull align 8 dereferenceable(9848) %0, i32 noundef %24)
  br i1 %25, label %26, label %.critedge.thread

26:                                               ; preds = %22
  %27 = tail call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %20)
  %28 = tail call noundef nonnull align 8 dereferenceable(336) ptr @_ZNK11spirv_cross8Compiler15expression_typeEj(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 noundef %27)
  %29 = getelementptr inbounds i8, ptr %28, i64 124
  %30 = load i8, ptr %29, align 4, !tbaa !5, !range !37, !noundef !38
  %31 = load i8, ptr %4, align 4, !tbaa !5, !range !37, !noundef !38
  %.not43 = icmp eq i8 %30, %31
  br i1 %.not43, label %32, label %.critedge.thread

32:                                               ; preds = %26
  %33 = getelementptr inbounds i8, ptr %28, i64 120
  %34 = load i32, ptr %33, align 8, !tbaa !46
  %35 = load i32, ptr %17, align 8, !tbaa !46
  %.not44 = icmp eq i32 %34, %35
  br i1 %.not44, label %36, label %.critedge.thread

36:                                               ; preds = %32
  %37 = getelementptr inbounds i8, ptr %28, i64 276
  %38 = tail call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %37)
  %39 = tail call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %18)
  %.not45 = icmp eq i32 %38, %39
  br i1 %.not45, label %40, label %.critedge.thread

40:                                               ; preds = %36
  %41 = tail call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %20)
  %42 = tail call noundef ptr @_ZN11spirv_cross8Compiler9maybe_getINS_12SPIRVariableEEEPT_j(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 noundef %41)
  %.not46 = icmp eq ptr %42, null
  br i1 %.not46, label %43, label %.critedge.thread.sink.split

43:                                               ; preds = %40
  %44 = tail call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %20)
  %45 = tail call noundef ptr @_ZN11spirv_cross8Compiler9maybe_getINS_14SPIRExpressionEEEPT_j(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 noundef %44)
  %.not47 = icmp eq ptr %45, null
  br i1 %.not47, label %.critedge.thread, label %19

.critedge.thread.sink.split:                      ; preds = %40, %9
  %.lcssa.sink = phi ptr [ %10, %9 ], [ %42, %40 ]
  %46 = getelementptr inbounds i8, ptr %.lcssa.sink, i64 153
  %47 = load i8, ptr %46, align 1, !tbaa !47, !range !37, !noundef !38
  %48 = trunc nuw i8 %47 to i1
  br label %.critedge.thread

.critedge.thread:                                 ; preds = %22, %19, %26, %32, %36, %43, %.critedge.thread.sink.split, %13, %11, %7, %2
  %.2 = phi i1 [ false, %2 ], [ false, %7 ], [ false, %13 ], [ true, %11 ], [ %48, %.critedge.thread.sink.split ], [ true, %43 ], [ true, %36 ], [ true, %32 ], [ true, %26 ], [ true, %19 ], [ true, %22 ]
  ret i1 %.2
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK11spirv_cross12CompilerGLSL23expression_is_forwardedEj(ptr noundef nonnull align 8 dereferenceable(9848), i32 noundef) local_unnamed_addr #1 align 2

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

!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, !22, i64 124}
!6 = !{!"_ZTSN11spirv_cross8SPIRTypeE", !7, i64 0, !12, i64 12, !13, i64 16, !9, i64 20, !9, i64 24, !9, i64 28, !14, i64 32, !19, i64 88, !9, i64 120, !22, i64 124, !22, i64 125, !23, i64 128, !24, i64 136, !14, i64 192, !27, i64 248, !28, i64 272, !28, i64 276, !32, i64 280}
!7 = !{!"_ZTSN11spirv_cross8IVariantE", !8, i64 8}
!8 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE0EEE", !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"_ZTSN3spv2OpE", !10, i64 0}
!13 = !{!"_ZTSN11spirv_cross8SPIRType8BaseTypeE", !10, i64 0}
!14 = !{!"_ZTSN11spirv_cross11SmallVectorIjLm8EEE", !15, i64 0, !17, i64 16, !18, i64 24}
!15 = !{!"_ZTSN11spirv_cross10VectorViewIjEE", !16, i64 0, !17, i64 8}
!16 = !{!"any pointer", !10, i64 0}
!17 = !{!"long", !10, i64 0}
!18 = !{!"_ZTSN11spirv_cross13AlignedBufferIjLm8EEE", !10, i64 0}
!19 = !{!"_ZTSN11spirv_cross11SmallVectorIbLm8EEE", !20, i64 0, !17, i64 16, !21, i64 24}
!20 = !{!"_ZTSN11spirv_cross10VectorViewIbEE", !16, i64 0, !17, i64 8}
!21 = !{!"_ZTSN11spirv_cross13AlignedBufferIbLm8EEE", !10, i64 0}
!22 = !{!"bool", !10, i64 0}
!23 = !{!"_ZTSN3spv12StorageClassE", !10, i64 0}
!24 = !{!"_ZTSN11spirv_cross11SmallVectorINS_7TypedIDILNS_5TypesE1EEELm8EEE", !25, i64 0, !17, i64 16, !26, i64 24}
!25 = !{!"_ZTSN11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEE", !16, i64 0, !17, i64 8}
!26 = !{!"_ZTSN11spirv_cross13AlignedBufferINS_7TypedIDILNS_5TypesE1EEELm8EEE", !10, i64 0}
!27 = !{!"_ZTSN11spirv_cross8SPIRType9ImageTypeE", !28, i64 0, !29, i64 4, !22, i64 8, !22, i64 9, !22, i64 10, !9, i64 12, !30, i64 16, !31, i64 20}
!28 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE1EEE", !9, i64 0}
!29 = !{!"_ZTSN3spv3DimE", !10, i64 0}
!30 = !{!"_ZTSN3spv11ImageFormatE", !10, i64 0}
!31 = !{!"_ZTSN3spv15AccessQualifierE", !10, i64 0}
!32 = !{!"_ZTSSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE", !33, i64 0}
!33 = !{!"_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", !16, i64 0, !17, i64 8, !34, i64 16, !17, i64 24, !35, i64 32, !16, i64 48}
!34 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !16, i64 0}
!35 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !36, i64 0, !17, i64 8}
!36 = !{!"float", !10, i64 0}
!37 = !{i8 0, i8 2}
!38 = !{}
!39 = !{!40, !22, i64 58}
!40 = !{!"_ZTSN11spirv_cross14SPIRExpressionE", !7, i64 0, !8, i64 12, !41, i64 16, !28, i64 48, !8, i64 52, !22, i64 56, !22, i64 57, !22, i64 58, !22, i64 59, !43, i64 64, !43, i64 120, !43, i64 176, !9, i64 232}
!41 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !42, i64 0, !17, i64 8, !10, i64 16}
!42 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !16, i64 0}
!43 = !{!"_ZTSN11spirv_cross11SmallVectorINS_7TypedIDILNS_5TypesE0EEELm8EEE", !44, i64 0, !17, i64 16, !45, i64 24}
!44 = !{!"_ZTSN11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE0EEEEE", !16, i64 0, !17, i64 8}
!45 = !{!"_ZTSN11spirv_cross13AlignedBufferINS_7TypedIDILNS_5TypesE0EEELm8EEE", !10, i64 0}
!46 = !{!6, !9, i64 120}
!47 = !{!48, !22, i64 153}
!48 = !{!"_ZTSN11spirv_cross12SPIRVariableE", !7, i64 0, !28, i64 12, !23, i64 16, !9, i64 20, !8, i64 24, !49, i64 28, !14, i64 32, !22, i64 88, !22, i64 89, !8, i64 92, !43, i64 96, !22, i64 152, !22, i64 153, !22, i64 154, !22, i64 155, !9, i64 156, !50, i64 160, !22, i64 164, !22, i64 165, !22, i64 166, !16, i64 168}
!49 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE2EEE", !9, i64 0}
!50 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE6EEE", !9, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass