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

@.str.25 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.1746 = external hidden unnamed_addr constant [15 x i8], align 1
@__PRETTY_FUNCTION__._ZNK11spirv_cross11CompilerMSL34get_declared_type_array_stride_mslERKNS_8SPIRTypeEbb = external hidden unnamed_addr constant [106 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11spirv_cross8SPIRTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(336)) unnamed_addr #2 align 2

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

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

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

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

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

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

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

28:                                               ; preds = %4
  store i32 %27, ptr %10, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %29, i32 0, i32 6
  %31 = call noundef i64 @_ZNK11spirv_cross10VectorViewIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %30) #7
  %32 = trunc i64 %31 to i32
  store i32 %32, ptr %13, align 4, !tbaa !13
  %33 = load i32, ptr %13, align 4, !tbaa !13
  %34 = icmp ugt i32 %33, 0
  br i1 %34, label %35, label %36

35:                                               ; preds = %28
  br label %42

36:                                               ; preds = %28
  call void @__assert_fail(ptr noundef @.str.1746, ptr noundef @.str.25, i32 noundef 17353, ptr noundef @__PRETTY_FUNCTION__._ZNK11spirv_cross11CompilerMSL34get_declared_type_array_stride_mslERKNS_8SPIRTypeEbb) #8
  unreachable

37:                                               ; preds = %4
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %11, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %12, align 4
  br label %74

41:                                               ; No predecessors!
  br label %42

42:                                               ; preds = %41, %35
  %43 = load i32, ptr %13, align 4, !tbaa !13
  %44 = add i32 %43, -1
  store i32 %44, ptr %13, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !13
  br label %45

45:                                               ; preds = %60, %42
  %46 = load i32, ptr %14, align 4, !tbaa !13
  %47 = load i32, ptr %13, align 4, !tbaa !13
  %48 = icmp ult i32 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %72

50:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = load i32, ptr %14, align 4, !tbaa !13
  %53 = invoke noundef i32 @_ZNK11spirv_cross12CompilerGLSL21to_array_size_literalERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(9848) %19, ptr noundef nonnull align 8 dereferenceable(336) %51, i32 noundef %52)
          to label %54 unwind label %63

54:                                               ; preds = %50
  store i32 %53, ptr %15, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 1, ptr %16, align 4, !tbaa !13
  %55 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %56 unwind label %67

56:                                               ; preds = %54
  %57 = load i32, ptr %55, align 4, !tbaa !13
  %58 = load i32, ptr %10, align 4, !tbaa !13
  %59 = mul i32 %58, %57
  store i32 %59, ptr %10, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %60

60:                                               ; preds = %56
  %61 = load i32, ptr %14, align 4, !tbaa !13
  %62 = add i32 %61, 1
  store i32 %62, ptr %14, align 4, !tbaa !13
  br label %45, !llvm.loop !15

63:                                               ; preds = %50
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %11, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %12, align 4
  br label %71

67:                                               ; preds = %54
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %11, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %71

71:                                               ; preds = %67, %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %74

72:                                               ; preds = %49
  %73 = load i32, ptr %10, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @_ZN11spirv_cross8SPIRTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(336) %9) #7
  call void @llvm.lifetime.end.p0(i64 336, ptr %9) #7
  ret i32 %73

74:                                               ; preds = %71, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @_ZN11spirv_cross8SPIRTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(336) %9) #7
  call void @llvm.lifetime.end.p0(i64 336, ptr %9) #7
  br label %75

75:                                               ; preds = %74
  %76 = load ptr, ptr %11, align 8
  %77 = load i32, ptr %12, align 4
  %78 = insertvalue { ptr, i32 } poison, ptr %76, 0
  %79 = insertvalue { ptr, i32 } %78, i32 %77, 1
  resume { ptr, i32 } %79
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 = { 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 #3 = { 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 #4 = { 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 #5 = { "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 = { 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 #7 = { nounwind }
attributes #8 = { 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 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"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"

%"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 }

@.str.25 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.1746 = external hidden unnamed_addr constant [15 x i8], align 1
@__PRETTY_FUNCTION__._ZNK11spirv_cross11CompilerMSL34get_declared_type_array_stride_mslERKNS_8SPIRTypeEbb = external hidden unnamed_addr constant [106 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11spirv_cross8SPIRTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(336)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11spirv_cross11SmallVectorIjLm8EE5clearEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11spirv_cross11SmallVectorIbLm8EE5clearEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZNK11spirv_cross11CompilerMSL34get_declared_type_array_stride_mslERKNS_8SPIRTypeEbb(ptr noundef nonnull align 8 dereferenceable(12482) %0, ptr noundef nonnull align 8 dereferenceable(336) %1, i1 noundef zeroext %2, i1 noundef zeroext %3) local_unnamed_addr #6 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.spirv_cross::SPIRType", align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 336, ptr nonnull %5) #7
  call void @_ZN11spirv_cross8SPIRTypeC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(336) %5, ptr noundef nonnull align 8 dereferenceable(336) %1)
  %8 = getelementptr inbounds i8, ptr %5, i64 32
  call void @_ZN11spirv_cross11SmallVectorIjLm8EE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) %8) #7
  %9 = getelementptr inbounds i8, ptr %5, i64 88
  call void @_ZN11spirv_cross11SmallVectorIbLm8EE5clearEv(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  %10 = invoke noundef i32 @_ZNK11spirv_cross11CompilerMSL26get_declared_type_size_mslERKNS_8SPIRTypeEbb(ptr noundef nonnull align 8 dereferenceable(12482) %0, ptr noundef nonnull align 8 dereferenceable(336) %5, i1 noundef zeroext %2, i1 noundef zeroext %3)
          to label %11 unwind label %16

11:                                               ; preds = %4
  %12 = getelementptr inbounds i8, ptr %1, i64 32
  %13 = call noundef i64 @_ZNK11spirv_cross10VectorViewIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %12) #7
  %14 = trunc i64 %13 to i32
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %15, label %18

15:                                               ; preds = %11
  call void @__assert_fail(ptr noundef nonnull @.str.1746, ptr noundef nonnull @.str.25, i32 noundef 17353, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK11spirv_cross11CompilerMSL34get_declared_type_array_stride_mslERKNS_8SPIRTypeEbb) #8
  unreachable

16:                                               ; preds = %4
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %28

18:                                               ; preds = %11
  %19 = add i32 %14, -1
  %.not23 = icmp eq i32 %19, 0
  br i1 %.not23, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %21, %18
  %.017.lcssa = phi i32 [ %10, %18 ], [ %24, %21 ]
  call void @_ZN11spirv_cross8SPIRTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(336) %5) #7
  call void @llvm.lifetime.end.p0(i64 336, ptr nonnull %5) #7
  ret i32 %.017.lcssa

.lr.ph:                                           ; preds = %18, %21
  %.022 = phi i32 [ %25, %21 ], [ 0, %18 ]
  %.01721 = phi i32 [ %24, %21 ], [ %10, %18 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  %20 = invoke noundef i32 @_ZNK11spirv_cross12CompilerGLSL21to_array_size_literalERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(9848) %0, ptr noundef nonnull align 8 dereferenceable(336) %1, i32 noundef %.022)
          to label %21 unwind label %26

21:                                               ; preds = %.lr.ph
  store i32 %20, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  store i32 1, ptr %7, align 4, !tbaa !5
  %22 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = mul i32 %23, %.01721
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  %25 = add nuw i32 %.022, 1
  %exitcond.not = icmp eq i32 %25, %19
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

26:                                               ; preds = %.lr.ph
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  br label %28

28:                                               ; preds = %26, %16
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %17, %16 ]
  call void @_ZN11spirv_cross8SPIRTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(336) %5) #7
  call void @llvm.lifetime.end.p0(i64 336, ptr nonnull %5) #7
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK11spirv_cross11CompilerMSL26get_declared_type_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 #6 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 = { 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 #3 = { 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 #4 = { 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 #5 = { "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 = { 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 #7 = { nounwind }
attributes #8 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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