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

%"struct.spirv_cross::SPIRType" = type { %"struct.spirv_cross::IVariant.base", i32, i32, i32, i32, i32, %"class.spirv_cross::SmallVector.92", %"class.spirv_cross::SmallVector.416", i32, i8, i8, i32, %"class.spirv_cross::SmallVector.227", %"class.spirv_cross::SmallVector.92", %"struct.spirv_cross::SPIRType::ImageType", %"class.spirv_cross::TypedID.414", %"class.spirv_cross::TypedID.414", %"class.std::unordered_set.165" }
%"struct.spirv_cross::IVariant.base" = type <{ ptr, %"class.spirv_cross::TypedID.413" }>
%"class.spirv_cross::TypedID.413" = type { i32 }
%"class.spirv_cross::SmallVector.416" = type { %"class.spirv_cross::VectorView.417", i64, %"class.spirv_cross::AlignedBuffer.418" }
%"class.spirv_cross::VectorView.417" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.418" = 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.414", i32, i8, i8, i8, i32, i32, i32 }
%"class.spirv_cross::TypedID.414" = 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::IVariant" = type <{ ptr, %"class.spirv_cross::TypedID.413", [4 x i8] }>

@_ZTIN11spirv_cross13CompilerErrorE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.140 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.141 = external hidden unnamed_addr constant [75 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

declare ptr @__cxa_allocate_exception(i64)

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

declare void @__cxa_free_exception(ptr)

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

declare void @__cxa_throw(ptr, ptr, ptr)

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

declare noundef i32 @_ZNK11spirv_cross8Compiler23get_extended_decorationEjNS_19ExtendedDecorationsE(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef, i32 noundef) #4

declare void @_ZN11spirv_cross8Compiler23set_extended_decorationEjNS_19ExtendedDecorationsEj(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef, i32 noundef, i32 noundef) #4

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK11spirv_cross10VectorViewIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11spirv_cross11CompilerMSL26mark_struct_members_packedERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(12482), ptr noundef nonnull align 8 dereferenceable(336)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11spirv_cross11CompilerMSL26mark_scalar_layout_structsERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(12482) %0, ptr noundef nonnull align 8 dereferenceable(336) %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  %16 = alloca i32, align 4
  %17 = alloca i8, align 1
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %24 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %25, i32 0, i32 12
  %27 = call noundef i64 @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %26) #6
  %28 = trunc i64 %27 to i32
  store i32 %28, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %29

29:                                               ; preds = %205, %2
  %30 = load i32, ptr %6, align 4, !tbaa !9
  %31 = load i32, ptr %5, align 4, !tbaa !9
  %32 = icmp ult i32 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %208

34:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %35, i32 0, i32 12
  %37 = load i32, ptr %6, align 4, !tbaa !9
  %38 = zext i32 %37 to i64
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %36, i64 noundef %38) #6
  %40 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %39)
  %41 = call noundef nonnull align 8 dereferenceable(336) ptr @_ZN11spirv_cross8Compiler3getINS_8SPIRTypeEEERT_j(ptr noundef nonnull align 8 dereferenceable(3176) %24, i32 noundef %40)
  store ptr %41, ptr %8, align 8, !tbaa !5
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %42, i32 0, i32 2
  %44 = load i32, ptr %43, align 8, !tbaa !11
  %45 = icmp eq i32 %44, 15
  br i1 %45, label %46, label %201

46:                                               ; preds = %34
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %47, i32 0, i32 9
  %49 = load i8, ptr %48, align 4, !tbaa !39, !range !40, !noundef !41
  %50 = trunc i8 %49 to i1
  br i1 %50, label %51, label %56

51:                                               ; preds = %46
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %52, i32 0, i32 11
  %54 = load i32, ptr %53, align 8, !tbaa !42
  %55 = icmp eq i32 %54, 5349
  br i1 %55, label %201, label %56

56:                                               ; preds = %51, %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %57, ptr %9, align 8, !tbaa !5
  br label %58

58:                                               ; preds = %63, %56
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %59, i32 0, i32 6
  %61 = call noundef zeroext i1 @_ZNK11spirv_cross10VectorViewIjE5emptyEv(ptr noundef nonnull align 8 dereferenceable(16) %60) #6
  %62 = xor i1 %61, true
  br i1 %62, label %63, label %68

63:                                               ; preds = %58
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %64, i32 0, i32 16
  %66 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %65)
  %67 = call noundef nonnull align 8 dereferenceable(336) ptr @_ZN11spirv_cross8Compiler3getINS_8SPIRTypeEEERT_j(ptr noundef nonnull align 8 dereferenceable(3176) %24, i32 noundef %66)
  store ptr %67, ptr %9, align 8, !tbaa !5
  br label %58, !llvm.loop !43

68:                                               ; preds = %58
  %69 = load ptr, ptr %9, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.spirv_cross::IVariant", ptr %69, i32 0, i32 1
  %71 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %70)
  %72 = call noundef zeroext i1 @_ZNK11spirv_cross8Compiler23has_extended_decorationEjNS_19ExtendedDecorationsE(ptr noundef nonnull align 8 dereferenceable(3176) %24, i32 noundef %71, i32 noundef 2)
  br i1 %72, label %73, label %74

73:                                               ; preds = %68
  store i32 4, ptr %7, align 4
  br label %197

74:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = load i32, ptr %6, align 4, !tbaa !9
  %77 = call noundef i32 @_ZNK11spirv_cross11CompilerMSL40get_declared_struct_member_alignment_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482) %24, ptr noundef nonnull align 8 dereferenceable(336) %75, i32 noundef %76)
  store i32 %77, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = load i32, ptr %6, align 4, !tbaa !9
  %80 = call noundef i32 @_ZNK11spirv_cross11CompilerMSL35get_declared_struct_member_size_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482) %24, ptr noundef nonnull align 8 dereferenceable(336) %78, i32 noundef %79)
  store i32 %80, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = load i32, ptr %6, align 4, !tbaa !9
  %83 = call noundef i32 @_ZNK11spirv_cross8Compiler25type_struct_member_offsetERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(3176) %24, ptr noundef nonnull align 8 dereferenceable(336) %81, i32 noundef %82)
  store i32 %83, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %84 = load i32, ptr %6, align 4, !tbaa !9
  %85 = add i32 %84, 1
  %86 = load i32, ptr %5, align 4, !tbaa !9
  %87 = icmp ult i32 %85, %86
  br i1 %87, label %88, label %93

88:                                               ; preds = %74
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = load i32, ptr %6, align 4, !tbaa !9
  %91 = add i32 %90, 1
  %92 = call noundef i32 @_ZNK11spirv_cross8Compiler25type_struct_member_offsetERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(3176) %24, ptr noundef nonnull align 8 dereferenceable(336) %89, i32 noundef %91)
  store i32 %92, ptr %13, align 4, !tbaa !9
  br label %97

93:                                               ; preds = %74
  %94 = load i32, ptr %12, align 4, !tbaa !9
  %95 = load i32, ptr %11, align 4, !tbaa !9
  %96 = add i32 %94, %95
  store i32 %96, ptr %13, align 4, !tbaa !9
  br label %97

97:                                               ; preds = %93, %88
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #6
  %98 = load i32, ptr %12, align 4, !tbaa !9
  %99 = load i32, ptr %10, align 4, !tbaa !9
  %100 = urem i32 %98, %99
  %101 = icmp ne i32 %100, 0
  %102 = zext i1 %101 to i8
  store i8 %102, ptr %14, align 1, !tbaa !45
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #6
  %103 = load i32, ptr %12, align 4, !tbaa !9
  %104 = load i32, ptr %11, align 4, !tbaa !9
  %105 = add i32 %103, %104
  %106 = load i32, ptr %13, align 4, !tbaa !9
  %107 = icmp ugt i32 %105, %106
  %108 = zext i1 %107 to i8
  store i8 %108, ptr %15, align 1, !tbaa !45
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #6
  store i8 0, ptr %17, align 1, !tbaa !45
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %109, i32 0, i32 6
  %111 = call noundef zeroext i1 @_ZNK11spirv_cross10VectorViewIjE5emptyEv(ptr noundef nonnull align 8 dereferenceable(16) %110) #6
  br i1 %111, label %144, label %112

112:                                              ; preds = %97
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = load i32, ptr %6, align 4, !tbaa !9
  %115 = call noundef i32 @_ZNK11spirv_cross8Compiler31type_struct_member_array_strideERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(3176) %24, ptr noundef nonnull align 8 dereferenceable(336) %113, i32 noundef %114)
  store i32 %115, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %116, i32 0, i32 6
  %118 = call noundef i64 @_ZNK11spirv_cross10VectorViewIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %117) #6
  %119 = sub i64 %118, 1
  %120 = trunc i64 %119 to i32
  store i32 %120, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %121

121:                                              ; preds = %134, %112
  %122 = load i32, ptr %19, align 4, !tbaa !9
  %123 = load i32, ptr %18, align 4, !tbaa !9
  %124 = icmp ult i32 %122, %123
  br i1 %124, label %126, label %125

125:                                              ; preds = %121
  store i32 7, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %137

126:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  %128 = load i32, ptr %19, align 4, !tbaa !9
  %129 = call noundef i32 @_ZNK11spirv_cross12CompilerGLSL21to_array_size_literalERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(9848) %24, ptr noundef nonnull align 8 dereferenceable(336) %127, i32 noundef %128)
  store i32 %129, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 1, ptr %21, align 4, !tbaa !9
  %130 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %131 = load i32, ptr %130, align 4, !tbaa !9
  %132 = load i32, ptr %16, align 4, !tbaa !9
  %133 = udiv i32 %132, %131
  store i32 %133, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %134

134:                                              ; preds = %126
  %135 = load i32, ptr %19, align 4, !tbaa !9
  %136 = add i32 %135, 1
  store i32 %136, ptr %19, align 4, !tbaa !9
  br label %121, !llvm.loop !46

137:                                              ; preds = %125
  store i8 1, ptr %17, align 1, !tbaa !45
  %138 = load ptr, ptr %9, align 8, !tbaa !5
  %139 = call noundef i32 @_ZNK11spirv_cross11CompilerMSL28get_declared_struct_size_mslERKNS_8SPIRTypeEbb(ptr noundef nonnull align 8 dereferenceable(12482) %24, ptr noundef nonnull align 8 dereferenceable(336) %138, i1 noundef zeroext false, i1 noundef zeroext false)
  %140 = load i32, ptr %16, align 4, !tbaa !9
  %141 = icmp ugt i32 %139, %140
  br i1 %141, label %142, label %143

142:                                              ; preds = %137
  store i8 1, ptr %15, align 1, !tbaa !45
  br label %143

143:                                              ; preds = %142, %137
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %144

144:                                              ; preds = %143, %97
  %145 = load i8, ptr %14, align 1, !tbaa !45, !range !40, !noundef !41
  %146 = trunc i8 %145 to i1
  br i1 %146, label %150, label %147

147:                                              ; preds = %144
  %148 = load i8, ptr %15, align 1, !tbaa !45, !range !40, !noundef !41
  %149 = trunc i8 %148 to i1
  br i1 %149, label %150, label %152

150:                                              ; preds = %147, %144
  %151 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11spirv_cross11CompilerMSL26mark_struct_members_packedERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(12482) %24, ptr noundef nonnull align 8 dereferenceable(336) %151)
  br label %152

152:                                              ; preds = %150, %147
  %153 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11spirv_cross11CompilerMSL26mark_scalar_layout_structsERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(12482) %24, ptr noundef nonnull align 8 dereferenceable(336) %153)
  %154 = load i8, ptr %17, align 1, !tbaa !45, !range !40, !noundef !41
  %155 = trunc i8 %154 to i1
  br i1 %155, label %156, label %196

156:                                              ; preds = %152
  %157 = load ptr, ptr %9, align 8, !tbaa !5
  %158 = call noundef i32 @_ZNK11spirv_cross11CompilerMSL28get_declared_struct_size_mslERKNS_8SPIRTypeEbb(ptr noundef nonnull align 8 dereferenceable(12482) %24, ptr noundef nonnull align 8 dereferenceable(336) %157, i1 noundef zeroext true, i1 noundef zeroext true)
  store i32 %158, ptr %11, align 4, !tbaa !9
  %159 = load i32, ptr %16, align 4, !tbaa !9
  %160 = load i32, ptr %11, align 4, !tbaa !9
  %161 = icmp ult i32 %159, %160
  br i1 %161, label %162, label %169

162:                                              ; preds = %156
  %163 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZN11spirv_cross13CompilerErrorC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %163, ptr noundef @.str.140)
          to label %164 unwind label %165

164:                                              ; preds = %162
  call void @__cxa_throw(ptr %163, ptr @_ZTIN11spirv_cross13CompilerErrorE, ptr @_ZNSt13runtime_errorD2Ev) #7
  unreachable

165:                                              ; preds = %162
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %22, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %23, align 4
  call void @__cxa_free_exception(ptr %163) #6
  br label %200

169:                                              ; preds = %156
  %170 = load ptr, ptr %9, align 8, !tbaa !5
  %171 = getelementptr inbounds %"struct.spirv_cross::IVariant", ptr %170, i32 0, i32 1
  %172 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %171)
  %173 = call noundef zeroext i1 @_ZNK11spirv_cross8Compiler23has_extended_decorationEjNS_19ExtendedDecorationsE(ptr noundef nonnull align 8 dereferenceable(3176) %24, i32 noundef %172, i32 noundef 3)
  br i1 %173, label %174, label %189

174:                                              ; preds = %169
  %175 = load i32, ptr %16, align 4, !tbaa !9
  %176 = load ptr, ptr %9, align 8, !tbaa !5
  %177 = getelementptr inbounds %"struct.spirv_cross::IVariant", ptr %176, i32 0, i32 1
  %178 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %177)
  %179 = call noundef i32 @_ZNK11spirv_cross8Compiler23get_extended_decorationEjNS_19ExtendedDecorationsE(ptr noundef nonnull align 8 dereferenceable(3176) %24, i32 noundef %178, i32 noundef 3)
  %180 = icmp ne i32 %175, %179
  br i1 %180, label %181, label %188

181:                                              ; preds = %174
  %182 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZN11spirv_cross13CompilerErrorC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %182, ptr noundef @.str.141)
          to label %183 unwind label %184

183:                                              ; preds = %181
  call void @__cxa_throw(ptr %182, ptr @_ZTIN11spirv_cross13CompilerErrorE, ptr @_ZNSt13runtime_errorD2Ev) #7
  unreachable

184:                                              ; preds = %181
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %22, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %23, align 4
  call void @__cxa_free_exception(ptr %182) #6
  br label %200

188:                                              ; preds = %174
  br label %194

189:                                              ; preds = %169
  %190 = load ptr, ptr %9, align 8, !tbaa !5
  %191 = getelementptr inbounds %"struct.spirv_cross::IVariant", ptr %190, i32 0, i32 1
  %192 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %191)
  %193 = load i32, ptr %16, align 4, !tbaa !9
  call void @_ZN11spirv_cross8Compiler23set_extended_decorationEjNS_19ExtendedDecorationsEj(ptr noundef nonnull align 8 dereferenceable(3176) %24, i32 noundef %192, i32 noundef 3, i32 noundef %193)
  br label %194

194:                                              ; preds = %189, %188
  br label %195

195:                                              ; preds = %194
  br label %196

196:                                              ; preds = %195, %152
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  store i32 0, ptr %7, align 4
  br label %197

197:                                              ; preds = %196, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  %198 = load i32, ptr %7, align 4
  switch i32 %198, label %202 [
    i32 0, label %199
  ]

199:                                              ; preds = %197
  br label %201

200:                                              ; preds = %184, %165
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %209

201:                                              ; preds = %199, %51, %34
  store i32 0, ptr %7, align 4
  br label %202

202:                                              ; preds = %201, %197
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  %203 = load i32, ptr %7, align 4
  switch i32 %203, label %214 [
    i32 0, label %204
    i32 4, label %205
  ]

204:                                              ; preds = %202
  br label %205

205:                                              ; preds = %204, %202
  %206 = load i32, ptr %6, align 4, !tbaa !9
  %207 = add i32 %206, 1
  store i32 %207, ptr %6, align 4, !tbaa !9
  br label %29, !llvm.loop !47

208:                                              ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret void

209:                                              ; preds = %200
  %210 = load ptr, ptr %22, align 8
  %211 = load i32, ptr %23, align 4
  %212 = insertvalue { ptr, i32 } poison, ptr %210, 0
  %213 = insertvalue { ptr, i32 } %212, i32 %211, 1
  resume { ptr, i32 } %213

214:                                              ; preds = %202
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK11spirv_cross11CompilerMSL40get_declared_struct_member_alignment_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482), ptr noundef nonnull align 8 dereferenceable(336), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK11spirv_cross11CompilerMSL35get_declared_struct_member_size_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482), ptr noundef nonnull align 8 dereferenceable(336), i32 noundef) #1 align 2

declare noundef i32 @_ZNK11spirv_cross8Compiler25type_struct_member_offsetERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(3176), ptr noundef nonnull align 8 dereferenceable(336), i32 noundef) #4

declare noundef i32 @_ZNK11spirv_cross8Compiler31type_struct_member_array_strideERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(3176), ptr noundef nonnull align 8 dereferenceable(336), i32 noundef) #4

declare noundef i32 @_ZNK11spirv_cross12CompilerGLSL21to_array_size_literalERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(9848), ptr noundef nonnull align 8 dereferenceable(336), i32 noundef) #4

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { noreturn }

!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, !16, i64 16}
!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 = !{!12, !24, i64 124}
!40 = !{i8 0, i8 2}
!41 = !{}
!42 = !{!12, !25, i64 128}
!43 = distinct !{!43, !44}
!44 = !{!"llvm.loop.mustprogress"}
!45 = !{!24, !24, i64 0}
!46 = distinct !{!46, !44}
!47 = distinct !{!47, !44}


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

@_ZTIN11spirv_cross13CompilerErrorE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.140 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.141 = external hidden unnamed_addr constant [75 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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

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

declare noundef i32 @_ZNK11spirv_cross8Compiler23get_extended_decorationEjNS_19ExtendedDecorationsE(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef, i32 noundef) local_unnamed_addr #4

declare void @_ZN11spirv_cross8Compiler23set_extended_decorationEjNS_19ExtendedDecorationsEj(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(336) ptr @_ZN11spirv_cross8Compiler3getINS_8SPIRTypeEEERT_j(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef) local_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 #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK11spirv_cross10VectorViewIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11spirv_cross11CompilerMSL26mark_struct_members_packedERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(12482), ptr noundef nonnull align 8 dereferenceable(336)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11spirv_cross11CompilerMSL26mark_scalar_layout_structsERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(12482) %0, ptr noundef nonnull align 8 dereferenceable(336) %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = getelementptr inbounds i8, ptr %1, i64 136
  %6 = tail call noundef i64 @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  %7 = and i64 %6, 4294967295
  %.not86 = icmp eq i64 %7, 0
  br i1 %.not86, label %._crit_edge85, label %.lr.ph84.preheader

.lr.ph84.preheader:                               ; preds = %2
  %8 = and i64 %6, 4294967295
  br label %.lr.ph84

._crit_edge85:                                    ; preds = %.critedge, %2
  ret void

.lr.ph84:                                         ; preds = %.lr.ph84.preheader, %.critedge
  %indvars.iv = phi i64 [ 0, %.lr.ph84.preheader ], [ %indvars.iv.next, %.critedge ]
  %9 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef %indvars.iv) #6
  %10 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %9)
  %11 = call noundef nonnull align 8 dereferenceable(336) ptr @_ZN11spirv_cross8Compiler3getINS_8SPIRTypeEEERT_j(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 noundef %10)
  %12 = getelementptr inbounds i8, ptr %11, i64 16
  %13 = load i32, ptr %12, align 8, !tbaa !5
  %14 = icmp eq i32 %13, 15
  br i1 %14, label %15, label %.critedge

15:                                               ; preds = %.lr.ph84
  %16 = getelementptr inbounds i8, ptr %11, i64 124
  %17 = load i8, ptr %16, align 4, !tbaa !37, !range !38, !noundef !39
  %18 = trunc nuw i8 %17 to i1
  %19 = getelementptr inbounds i8, ptr %11, i64 128
  %20 = load i32, ptr %19, align 8
  %21 = icmp eq i32 %20, 5349
  %or.cond = select i1 %18, i1 %21, i1 false
  br i1 %or.cond, label %.critedge, label %.preheader

.preheader:                                       ; preds = %15
  %22 = getelementptr inbounds i8, ptr %11, i64 32
  %23 = call noundef zeroext i1 @_ZNK11spirv_cross10VectorViewIjE5emptyEv(ptr noundef nonnull align 8 dereferenceable(16) %22) #6
  br i1 %23, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %.06774 = phi ptr [ %26, %.lr.ph ], [ %11, %.preheader ]
  %24 = getelementptr inbounds i8, ptr %.06774, i64 276
  %25 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %24)
  %26 = call noundef nonnull align 8 dereferenceable(336) ptr @_ZN11spirv_cross8Compiler3getINS_8SPIRTypeEEERT_j(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 noundef %25)
  %27 = getelementptr inbounds i8, ptr %26, i64 32
  %28 = call noundef zeroext i1 @_ZNK11spirv_cross10VectorViewIjE5emptyEv(ptr noundef nonnull align 8 dereferenceable(16) %27) #6
  br i1 %28, label %._crit_edge, label %.lr.ph, !llvm.loop !40

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  %.067.lcssa = phi ptr [ %11, %.preheader ], [ %26, %.lr.ph ]
  %29 = getelementptr inbounds i8, ptr %.067.lcssa, i64 8
  %30 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %29)
  %31 = call noundef zeroext i1 @_ZNK11spirv_cross8Compiler23has_extended_decorationEjNS_19ExtendedDecorationsE(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 noundef %30, i32 noundef 2)
  br i1 %31, label %.critedge, label %32

32:                                               ; preds = %._crit_edge
  %33 = trunc nuw i64 %indvars.iv to i32
  %34 = call noundef i32 @_ZNK11spirv_cross11CompilerMSL40get_declared_struct_member_alignment_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482) %0, ptr noundef nonnull align 8 dereferenceable(336) %1, i32 noundef %33)
  %35 = call noundef i32 @_ZNK11spirv_cross11CompilerMSL35get_declared_struct_member_size_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482) %0, ptr noundef nonnull align 8 dereferenceable(336) %1, i32 noundef %33)
  %36 = call noundef i32 @_ZNK11spirv_cross8Compiler25type_struct_member_offsetERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(3176) %0, ptr noundef nonnull align 8 dereferenceable(336) %1, i32 noundef %33)
  %37 = add nuw nsw i64 %indvars.iv, 1
  %38 = icmp ult i64 %37, %8
  br i1 %38, label %39, label %42

39:                                               ; preds = %32
  %40 = trunc nuw i64 %37 to i32
  %41 = call noundef i32 @_ZNK11spirv_cross8Compiler25type_struct_member_offsetERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(3176) %0, ptr noundef nonnull align 8 dereferenceable(336) %1, i32 noundef %40)
  %.pre = add i32 %36, %35
  br label %44

42:                                               ; preds = %32
  %43 = add i32 %36, %35
  br label %44

44:                                               ; preds = %42, %39
  %.pre-phi = phi i32 [ %43, %42 ], [ %.pre, %39 ]
  %.066 = phi i32 [ %43, %42 ], [ %41, %39 ]
  %45 = urem i32 %36, %34
  %.not = icmp ne i32 %45, 0
  %46 = icmp ugt i32 %.pre-phi, %.066
  %47 = call noundef zeroext i1 @_ZNK11spirv_cross10VectorViewIjE5emptyEv(ptr noundef nonnull align 8 dereferenceable(16) %22) #6
  br i1 %47, label %60, label %48

48:                                               ; preds = %44
  %49 = call noundef i32 @_ZNK11spirv_cross8Compiler31type_struct_member_array_strideERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(3176) %0, ptr noundef nonnull align 8 dereferenceable(336) %1, i32 noundef %33)
  %50 = call noundef i64 @_ZNK11spirv_cross10VectorViewIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %22) #6
  %51 = trunc i64 %50 to i32
  %52 = add i32 %51, -1
  %.not87 = icmp eq i32 %52, 0
  br i1 %.not87, label %._crit_edge79, label %.lr.ph78

._crit_edge79:                                    ; preds = %.lr.ph78, %48
  %.062.lcssa = phi i32 [ %49, %48 ], [ %58, %.lr.ph78 ]
  %53 = call noundef i32 @_ZNK11spirv_cross11CompilerMSL28get_declared_struct_size_mslERKNS_8SPIRTypeEbb(ptr noundef nonnull align 8 dereferenceable(12482) %0, ptr noundef nonnull align 8 dereferenceable(336) %.067.lcssa, i1 noundef zeroext false, i1 noundef zeroext false)
  %54 = icmp ugt i32 %53, %.062.lcssa
  %spec.select = or i1 %46, %54
  br label %60

.lr.ph78:                                         ; preds = %48, %.lr.ph78
  %.05976 = phi i32 [ %59, %.lr.ph78 ], [ 0, %48 ]
  %.06275 = phi i32 [ %58, %.lr.ph78 ], [ %49, %48 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %55 = call noundef i32 @_ZNK11spirv_cross12CompilerGLSL21to_array_size_literalERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(9848) %0, ptr noundef nonnull align 8 dereferenceable(336) %11, i32 noundef %.05976)
  store i32 %55, ptr %3, align 4, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  store i32 1, ptr %4, align 4, !tbaa !42
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %57 = load i32, ptr %56, align 4, !tbaa !42
  %58 = udiv i32 %.06275, %57
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  %59 = add nuw i32 %.05976, 1
  %exitcond.not = icmp eq i32 %59, %52
  br i1 %exitcond.not, label %._crit_edge79, label %.lr.ph78, !llvm.loop !43

60:                                               ; preds = %._crit_edge79, %44
  %.164 = phi i1 [ %46, %44 ], [ %spec.select, %._crit_edge79 ]
  %.1 = phi i32 [ 0, %44 ], [ %.062.lcssa, %._crit_edge79 ]
  %brmerge = select i1 %.not, i1 true, i1 %.164
  br i1 %brmerge, label %61, label %62

61:                                               ; preds = %60
  call void @_ZN11spirv_cross11CompilerMSL26mark_struct_members_packedERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(12482) %0, ptr noundef nonnull align 8 dereferenceable(336) %.067.lcssa)
  br label %62

62:                                               ; preds = %60, %61
  call void @_ZN11spirv_cross11CompilerMSL26mark_scalar_layout_structsERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(12482) %0, ptr noundef nonnull align 8 dereferenceable(336) %.067.lcssa)
  br i1 %47, label %.critedge, label %63

63:                                               ; preds = %62
  %64 = call noundef i32 @_ZNK11spirv_cross11CompilerMSL28get_declared_struct_size_mslERKNS_8SPIRTypeEbb(ptr noundef nonnull align 8 dereferenceable(12482) %0, ptr noundef nonnull align 8 dereferenceable(336) %.067.lcssa, i1 noundef zeroext true, i1 noundef zeroext true)
  %65 = icmp ult i32 %.1, %64
  br i1 %65, label %66, label %71

66:                                               ; preds = %63
  %67 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZN11spirv_cross13CompilerErrorC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %67, ptr noundef nonnull @.str.140)
          to label %68 unwind label %69

68:                                               ; preds = %66
  call void @__cxa_throw(ptr nonnull %67, ptr nonnull @_ZTIN11spirv_cross13CompilerErrorE, ptr nonnull @_ZNSt13runtime_errorD2Ev) #7
  unreachable

69:                                               ; preds = %66
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %83

71:                                               ; preds = %63
  %72 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %29)
  %73 = call noundef zeroext i1 @_ZNK11spirv_cross8Compiler23has_extended_decorationEjNS_19ExtendedDecorationsE(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 noundef %72, i32 noundef 3)
  %74 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %29)
  br i1 %73, label %75, label %82

75:                                               ; preds = %71
  %76 = call noundef i32 @_ZNK11spirv_cross8Compiler23get_extended_decorationEjNS_19ExtendedDecorationsE(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 noundef %74, i32 noundef 3)
  %.not70 = icmp eq i32 %.1, %76
  br i1 %.not70, label %.critedge, label %77

77:                                               ; preds = %75
  %78 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZN11spirv_cross13CompilerErrorC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %78, ptr noundef nonnull @.str.141)
          to label %79 unwind label %80

79:                                               ; preds = %77
  call void @__cxa_throw(ptr nonnull %78, ptr nonnull @_ZTIN11spirv_cross13CompilerErrorE, ptr nonnull @_ZNSt13runtime_errorD2Ev) #7
  unreachable

80:                                               ; preds = %77
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %83

82:                                               ; preds = %71
  call void @_ZN11spirv_cross8Compiler23set_extended_decorationEjNS_19ExtendedDecorationsEj(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 noundef %74, i32 noundef 3, i32 noundef %.1)
  br label %.critedge

83:                                               ; preds = %80, %69
  %.sink = phi ptr [ %78, %80 ], [ %67, %69 ]
  %.pn = phi { ptr, i32 } [ %81, %80 ], [ %70, %69 ]
  call void @__cxa_free_exception(ptr %.sink) #6
  resume { ptr, i32 } %.pn

.critedge:                                        ; preds = %75, %82, %62, %._crit_edge, %.lr.ph84, %15
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond90.not = icmp eq i64 %indvars.iv.next, %8
  br i1 %exitcond90.not, label %._crit_edge85, label %.lr.ph84, !llvm.loop !44
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK11spirv_cross11CompilerMSL40get_declared_struct_member_alignment_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482), ptr noundef nonnull align 8 dereferenceable(336), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK11spirv_cross11CompilerMSL35get_declared_struct_member_size_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482), ptr noundef nonnull align 8 dereferenceable(336), i32 noundef) local_unnamed_addr #1 align 2

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

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

declare noundef i32 @_ZNK11spirv_cross12CompilerGLSL21to_array_size_literalERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(9848), ptr noundef nonnull align 8 dereferenceable(336), i32 noundef) local_unnamed_addr #4

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { noreturn }

!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, !13, i64 16}
!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 = !{!6, !22, i64 124}
!38 = !{i8 0, i8 2}
!39 = !{}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}
!42 = !{!9, !9, i64 0}
!43 = distinct !{!43, !41}
!44 = distinct !{!44, !41}


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