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

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

%"class.spirv_cross::TypedID.414" = 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.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.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] }>

@.str.25 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [34 x i8], align 1
@__PRETTY_FUNCTION__._ZNK11spirv_cross11CompilerMSL33validate_member_packing_rules_mslERKNS_8SPIRTypeEj = external hidden unnamed_addr constant [99 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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

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

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

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

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

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

; 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) #2 align 2

; 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) #4 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) #4 align 2

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) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK11spirv_cross11CompilerMSL33validate_member_packing_rules_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482) %0, ptr noundef nonnull align 8 dereferenceable(336) %1, i32 noundef %2) #4 align 2 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.spirv_cross::TypedID.414", align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.spirv_cross::TypedID.414", align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i8, align 1
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  %22 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %23, i32 0, i32 12
  %25 = load i32, ptr %7, align 4, !tbaa !9
  %26 = zext i32 %25 to i64
  %27 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %24, i64 noundef %26) #5
  %28 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %27)
  %29 = call noundef nonnull align 8 dereferenceable(336) ptr @_ZNK11spirv_cross8Compiler3getINS_8SPIRTypeEEERKT_j(ptr noundef nonnull align 8 dereferenceable(3176) %22, i32 noundef %28)
  store ptr %29, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.spirv_cross::IVariant", ptr %30, i32 0, i32 1
  %32 = call i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvNS0_IXT_EEEILS1_1EEEv(ptr noundef nonnull align 4 dereferenceable(4) %31)
  %33 = getelementptr inbounds %"class.spirv_cross::TypedID.414", ptr %10, i32 0, i32 0
  store i32 %32, ptr %33, align 4
  %34 = load i32, ptr %7, align 4, !tbaa !9
  %35 = getelementptr inbounds %"class.spirv_cross::TypedID.414", ptr %10, i32 0, i32 0
  %36 = load i32, ptr %35, align 4
  %37 = call noundef i32 @_ZNK11spirv_cross8Compiler21get_member_decorationENS_7TypedIDILNS_5TypesE1EEEjN3spv10DecorationE(ptr noundef nonnull align 8 dereferenceable(3176) %22, i32 %36, i32 noundef %34, i32 noundef 35)
  store i32 %37, ptr %9, align 4, !tbaa !9
  %38 = load i32, ptr %7, align 4, !tbaa !9
  %39 = add i32 %38, 1
  %40 = zext i32 %39 to i64
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %41, i32 0, i32 12
  %43 = call noundef i64 @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %42) #5
  %44 = icmp ult i64 %40, %43
  br i1 %44, label %45, label %76

45:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.spirv_cross::IVariant", ptr %46, i32 0, i32 1
  %48 = call i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvNS0_IXT_EEEILS1_1EEEv(ptr noundef nonnull align 4 dereferenceable(4) %47)
  %49 = getelementptr inbounds %"class.spirv_cross::TypedID.414", ptr %12, i32 0, i32 0
  store i32 %48, ptr %49, align 4
  %50 = load i32, ptr %7, align 4, !tbaa !9
  %51 = add i32 %50, 1
  %52 = getelementptr inbounds %"class.spirv_cross::TypedID.414", ptr %12, i32 0, i32 0
  %53 = load i32, ptr %52, align 4
  %54 = call noundef i32 @_ZNK11spirv_cross8Compiler21get_member_decorationENS_7TypedIDILNS_5TypesE1EEEjN3spv10DecorationE(ptr noundef nonnull align 8 dereferenceable(3176) %22, i32 %53, i32 noundef %51, i32 noundef 35)
  store i32 %54, ptr %11, align 4, !tbaa !9
  %55 = load i32, ptr %11, align 4, !tbaa !9
  %56 = load i32, ptr %9, align 4, !tbaa !9
  %57 = icmp uge i32 %55, %56
  br i1 %57, label %58, label %59

58:                                               ; preds = %45
  br label %61

59:                                               ; preds = %45
  call void @__assert_fail(ptr noundef @.str.144, ptr noundef @.str.25, i32 noundef 4947, ptr noundef @__PRETTY_FUNCTION__._ZNK11spirv_cross11CompilerMSL33validate_member_packing_rules_mslERKNS_8SPIRTypeEj) #6
  unreachable

60:                                               ; No predecessors!
  br label %61

61:                                               ; preds = %60, %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %62 = load i32, ptr %11, align 4, !tbaa !9
  %63 = load i32, ptr %9, align 4, !tbaa !9
  %64 = sub i32 %62, %63
  store i32 %64, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = load i32, ptr %7, align 4, !tbaa !9
  %67 = call noundef i32 @_ZNK11spirv_cross11CompilerMSL35get_declared_struct_member_size_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482) %22, ptr noundef nonnull align 8 dereferenceable(336) %65, i32 noundef %66)
  store i32 %67, ptr %14, align 4, !tbaa !9
  %68 = load i32, ptr %14, align 4, !tbaa !9
  %69 = load i32, ptr %13, align 4, !tbaa !9
  %70 = icmp ugt i32 %68, %69
  br i1 %70, label %71, label %72

71:                                               ; preds = %61
  store i1 false, ptr %4, align 1
  store i32 1, ptr %15, align 4
  br label %73

72:                                               ; preds = %61
  store i32 0, ptr %15, align 4
  br label %73

73:                                               ; preds = %72, %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  %74 = load i32, ptr %15, align 4
  switch i32 %74, label %144 [
    i32 0, label %75
  ]

75:                                               ; preds = %73
  br label %76

76:                                               ; preds = %75, %3
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = call noundef zeroext i1 @_ZNK11spirv_cross8Compiler8is_arrayERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(3176) %22, ptr noundef nonnull align 8 dereferenceable(336) %77)
  br i1 %78, label %79, label %115

79:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #5
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %80, i32 0, i32 6
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK11spirv_cross10VectorViewIjE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %81) #5
  %83 = load i32, ptr %82, align 4, !tbaa !9
  %84 = icmp eq i32 %83, 1
  br i1 %84, label %85, label %91

85:                                               ; preds = %79
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %86, i32 0, i32 7
  %88 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK11spirv_cross10VectorViewIbE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %87) #5
  %89 = load i8, ptr %88, align 1, !tbaa !11, !range !13, !noundef !14
  %90 = trunc i8 %89 to i1
  br label %91

91:                                               ; preds = %85, %79
  %92 = phi i1 [ false, %79 ], [ %90, %85 ]
  %93 = zext i1 %92 to i8
  store i8 %93, ptr %16, align 1, !tbaa !11
  %94 = load i8, ptr %16, align 1, !tbaa !11, !range !13, !noundef !14
  %95 = trunc i8 %94 to i1
  br i1 %95, label %111, label %96

96:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = load i32, ptr %7, align 4, !tbaa !9
  %99 = call noundef i32 @_ZNK11spirv_cross8Compiler31type_struct_member_array_strideERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(3176) %22, ptr noundef nonnull align 8 dereferenceable(336) %97, i32 noundef %98)
  store i32 %99, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = load i32, ptr %7, align 4, !tbaa !9
  %102 = call noundef i32 @_ZNK11spirv_cross11CompilerMSL43get_declared_struct_member_array_stride_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482) %22, ptr noundef nonnull align 8 dereferenceable(336) %100, i32 noundef %101)
  store i32 %102, ptr %18, align 4, !tbaa !9
  %103 = load i32, ptr %17, align 4, !tbaa !9
  %104 = load i32, ptr %18, align 4, !tbaa !9
  %105 = icmp ne i32 %103, %104
  br i1 %105, label %106, label %107

106:                                              ; preds = %96
  store i1 false, ptr %4, align 1
  store i32 1, ptr %15, align 4
  br label %108

107:                                              ; preds = %96
  store i32 0, ptr %15, align 4
  br label %108

108:                                              ; preds = %107, %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  %109 = load i32, ptr %15, align 4
  switch i32 %109, label %112 [
    i32 0, label %110
  ]

110:                                              ; preds = %108
  br label %111

111:                                              ; preds = %110, %91
  store i32 0, ptr %15, align 4
  br label %112

112:                                              ; preds = %111, %108
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  %113 = load i32, ptr %15, align 4
  switch i32 %113, label %144 [
    i32 0, label %114
  ]

114:                                              ; preds = %112
  br label %115

115:                                              ; preds = %114, %76
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = call noundef zeroext i1 @_ZNK11spirv_cross8Compiler9is_matrixERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(3176) %22, ptr noundef nonnull align 8 dereferenceable(336) %116)
  br i1 %117, label %118, label %133

118:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = load i32, ptr %7, align 4, !tbaa !9
  %121 = call noundef i32 @_ZNK11spirv_cross8Compiler32type_struct_member_matrix_strideERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(3176) %22, ptr noundef nonnull align 8 dereferenceable(336) %119, i32 noundef %120)
  store i32 %121, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  %123 = load i32, ptr %7, align 4, !tbaa !9
  %124 = call noundef i32 @_ZNK11spirv_cross11CompilerMSL44get_declared_struct_member_matrix_stride_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482) %22, ptr noundef nonnull align 8 dereferenceable(336) %122, i32 noundef %123)
  store i32 %124, ptr %20, align 4, !tbaa !9
  %125 = load i32, ptr %19, align 4, !tbaa !9
  %126 = load i32, ptr %20, align 4, !tbaa !9
  %127 = icmp ne i32 %125, %126
  br i1 %127, label %128, label %129

128:                                              ; preds = %118
  store i1 false, ptr %4, align 1
  store i32 1, ptr %15, align 4
  br label %130

129:                                              ; preds = %118
  store i32 0, ptr %15, align 4
  br label %130

130:                                              ; preds = %129, %128
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  %131 = load i32, ptr %15, align 4
  switch i32 %131, label %144 [
    i32 0, label %132
  ]

132:                                              ; preds = %130
  br label %133

133:                                              ; preds = %132, %115
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %134 = load ptr, ptr %6, align 8, !tbaa !5
  %135 = load i32, ptr %7, align 4, !tbaa !9
  %136 = call noundef i32 @_ZNK11spirv_cross11CompilerMSL40get_declared_struct_member_alignment_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482) %22, ptr noundef nonnull align 8 dereferenceable(336) %134, i32 noundef %135)
  store i32 %136, ptr %21, align 4, !tbaa !9
  %137 = load i32, ptr %9, align 4, !tbaa !9
  %138 = load i32, ptr %21, align 4, !tbaa !9
  %139 = urem i32 %137, %138
  %140 = icmp ne i32 %139, 0
  br i1 %140, label %141, label %142

141:                                              ; preds = %133
  store i1 false, ptr %4, align 1
  store i32 1, ptr %15, align 4
  br label %143

142:                                              ; preds = %133
  store i1 true, ptr %4, align 1
  store i32 1, ptr %15, align 4
  br label %143

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

144:                                              ; preds = %143, %130, %112, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  %145 = load i1, ptr %4, align 1
  ret i1 %145
}

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

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

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

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

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

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}


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

@.str.25 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [34 x i8], align 1
@__PRETTY_FUNCTION__._ZNK11spirv_cross11CompilerMSL33validate_member_packing_rules_mslERKNS_8SPIRTypeEj = external hidden unnamed_addr constant [99 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

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

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

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

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

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

declare noundef i32 @_ZNK11spirv_cross8Compiler21get_member_decorationENS_7TypedIDILNS_5TypesE1EEEjN3spv10DecorationE(ptr noundef nonnull align 8 dereferenceable(3176), i32, i32 noundef, i32 noundef) local_unnamed_addr #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 #1 align 2

; 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 #3 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 #3 align 2

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 #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK11spirv_cross11CompilerMSL33validate_member_packing_rules_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482) %0, ptr noundef nonnull align 8 dereferenceable(336) %1, i32 noundef %2) local_unnamed_addr #3 align 2 {
  %4 = getelementptr inbounds i8, ptr %1, i64 136
  %5 = zext i32 %2 to i64
  %6 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %5) #4
  %7 = tail call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %6)
  %8 = tail call noundef nonnull align 8 dereferenceable(336) ptr @_ZNK11spirv_cross8Compiler3getINS_8SPIRTypeEEERKT_j(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 noundef %7)
  %9 = getelementptr inbounds i8, ptr %1, i64 8
  %10 = tail call i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvNS0_IXT_EEEILS1_1EEEv(ptr noundef nonnull align 4 dereferenceable(4) %9)
  %11 = tail call noundef i32 @_ZNK11spirv_cross8Compiler21get_member_decorationENS_7TypedIDILNS_5TypesE1EEEjN3spv10DecorationE(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 %10, i32 noundef %2, i32 noundef 35)
  %12 = add i32 %2, 1
  %13 = zext i32 %12 to i64
  %14 = tail call noundef i64 @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %4) #4
  %15 = icmp ugt i64 %14, %13
  br i1 %15, label %16, label %23

16:                                               ; preds = %3
  %17 = tail call i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvNS0_IXT_EEEILS1_1EEEv(ptr noundef nonnull align 4 dereferenceable(4) %9)
  %18 = tail call noundef i32 @_ZNK11spirv_cross8Compiler21get_member_decorationENS_7TypedIDILNS_5TypesE1EEEjN3spv10DecorationE(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 %17, i32 noundef %12, i32 noundef 35)
  %.not = icmp ult i32 %18, %11
  br i1 %.not, label %19, label %20

19:                                               ; preds = %16
  tail call void @__assert_fail(ptr noundef nonnull @.str.144, ptr noundef nonnull @.str.25, i32 noundef 4947, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK11spirv_cross11CompilerMSL33validate_member_packing_rules_mslERKNS_8SPIRTypeEj) #5
  unreachable

20:                                               ; preds = %16
  %21 = sub i32 %18, %11
  %22 = tail 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 %2)
  %.not51 = icmp ugt i32 %22, %21
  br i1 %.not51, label %44, label %23

23:                                               ; preds = %20, %3
  %24 = tail call noundef zeroext i1 @_ZNK11spirv_cross8Compiler8is_arrayERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(3176) %0, ptr noundef nonnull align 8 dereferenceable(336) %8)
  br i1 %24, label %25, label %.critedge56

25:                                               ; preds = %23
  %26 = getelementptr inbounds i8, ptr %8, i64 32
  %27 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK11spirv_cross10VectorViewIjE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %26) #4
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %29 = icmp eq i32 %28, 1
  br i1 %29, label %30, label %.critedge

30:                                               ; preds = %25
  %31 = getelementptr inbounds i8, ptr %8, i64 88
  %32 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK11spirv_cross10VectorViewIbE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %31) #4
  %33 = load i8, ptr %32, align 1, !tbaa !9, !range !11, !noundef !12
  %34 = trunc nuw i8 %33 to i1
  br i1 %34, label %.critedge56, label %.critedge

.critedge:                                        ; preds = %25, %30
  %35 = tail 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 %2)
  %36 = tail call noundef i32 @_ZNK11spirv_cross11CompilerMSL43get_declared_struct_member_array_stride_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482) %0, ptr noundef nonnull align 8 dereferenceable(336) %1, i32 noundef %2)
  %.not52 = icmp eq i32 %35, %36
  br i1 %.not52, label %.critedge56, label %44

.critedge56:                                      ; preds = %30, %.critedge, %23
  %37 = tail call noundef zeroext i1 @_ZNK11spirv_cross8Compiler9is_matrixERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(3176) %0, ptr noundef nonnull align 8 dereferenceable(336) %8)
  br i1 %37, label %38, label %41

38:                                               ; preds = %.critedge56
  %39 = tail call noundef i32 @_ZNK11spirv_cross8Compiler32type_struct_member_matrix_strideERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(3176) %0, ptr noundef nonnull align 8 dereferenceable(336) %1, i32 noundef %2)
  %40 = tail call noundef i32 @_ZNK11spirv_cross11CompilerMSL44get_declared_struct_member_matrix_stride_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482) %0, ptr noundef nonnull align 8 dereferenceable(336) %1, i32 noundef %2)
  %.not53 = icmp eq i32 %39, %40
  br i1 %.not53, label %41, label %44

41:                                               ; preds = %38, %.critedge56
  %42 = tail 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 %2)
  %43 = urem i32 %11, %42
  %.not54 = icmp eq i32 %43, 0
  br label %44

44:                                               ; preds = %.critedge, %20, %38, %41
  %.8 = phi i1 [ %.not54, %41 ], [ false, %38 ], [ false, %20 ], [ false, %.critedge ]
  ret i1 %.8
}

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

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

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

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

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

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

attributes #0 = { noreturn 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 #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 }
attributes #5 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}


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