; 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.413" = type { i32 }
%"struct.spirv_cross::SPIRVariable" = type { %"struct.spirv_cross::IVariant.base", %"class.spirv_cross::TypedID.414", i32, i32, %"class.spirv_cross::TypedID.413", %"class.spirv_cross::TypedID.350", %"class.spirv_cross::SmallVector.92", i8, i8, %"class.spirv_cross::TypedID.413", %"class.spirv_cross::SmallVector.7", i8, i8, i8, i8, i32, %"class.spirv_cross::TypedID.415", i8, i8, i8, ptr }
%"struct.spirv_cross::IVariant.base" = type <{ ptr, %"class.spirv_cross::TypedID.413" }>
%"class.spirv_cross::TypedID.414" = type { i32 }
%"class.spirv_cross::TypedID.350" = type { i32 }
%"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] }
%"class.spirv_cross::SmallVector.7" = type { %"class.spirv_cross::VectorView.8", i64, %"class.spirv_cross::AlignedBuffer.9" }
%"class.spirv_cross::VectorView.8" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.9" = type { [32 x i8] }
%"class.spirv_cross::TypedID.415" = type { i32 }
%"struct.spirv_cross::IVariant" = type <{ ptr, %"class.spirv_cross::TypedID.413", [4 x i8] }>

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

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

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

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

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

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

declare noundef zeroext i1 @_ZNK11spirv_cross12CompilerGLSL31is_stage_output_variable_maskedERKNS_12SPIRVariableE(ptr noundef nonnull align 8 dereferenceable(9848), ptr noundef nonnull align 8 dereferenceable(176)) #2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK11spirv_cross11CompilerMSL33variable_decl_is_remapped_storageERKNS_12SPIRVariableEN3spv12StorageClassE(ptr noundef nonnull align 8 dereferenceable(12482) %0, ptr noundef nonnull align 8 dereferenceable(176) %1, i32 noundef %2) unnamed_addr #3 align 2 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.spirv_cross::TypedID.413", align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.spirv_cross::TypedID.413", align 4
  %11 = 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
  %12 = load ptr, ptr %5, align 8
  %13 = load ptr, ptr %6, align 8, !tbaa !5
  %14 = getelementptr inbounds %"struct.spirv_cross::SPIRVariable", ptr %13, i32 0, i32 2
  %15 = load i32, ptr %14, align 8, !tbaa !11
  %16 = load i32, ptr %7, align 4, !tbaa !9
  %17 = icmp eq i32 %15, %16
  br i1 %17, label %18, label %19

18:                                               ; preds = %3
  store i1 true, ptr %4, align 1
  br label %108

19:                                               ; preds = %3
  %20 = load i32, ptr %7, align 4, !tbaa !9
  %21 = icmp eq i32 %20, 4
  br i1 %21, label %22, label %58

22:                                               ; preds = %19
  %23 = call noundef zeroext i1 @_ZNK11spirv_cross11CompilerMSL14is_tesc_shaderEv(ptr noundef nonnull align 8 dereferenceable(12482) %12)
  br i1 %23, label %24, label %39

24:                                               ; preds = %22
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.spirv_cross::SPIRVariable", ptr %25, i32 0, i32 2
  %27 = load i32, ptr %26, align 8, !tbaa !11
  %28 = icmp eq i32 %27, 3
  br i1 %28, label %29, label %39

29:                                               ; preds = %24
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.spirv_cross::SPIRVariable", ptr %30, i32 0, i32 1
  %32 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %31)
  %33 = call noundef nonnull align 8 dereferenceable(336) ptr @_ZNK11spirv_cross8Compiler3getINS_8SPIRTypeEEERKT_j(ptr noundef nonnull align 8 dereferenceable(3176) %12, i32 noundef %32)
  %34 = getelementptr inbounds %"struct.spirv_cross::IVariant", ptr %33, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 8 %34, i64 4, i1 false), !tbaa.struct !27
  %35 = getelementptr inbounds %"class.spirv_cross::TypedID.413", ptr %8, i32 0, i32 0
  %36 = load i32, ptr %35, align 4
  %37 = call noundef zeroext i1 @_ZNK11spirv_cross8Compiler14has_decorationENS_7TypedIDILNS_5TypesE0EEEN3spv10DecorationE(ptr noundef nonnull align 8 dereferenceable(3176) %12, i32 %36, i32 noundef 2)
  br i1 %37, label %38, label %39

38:                                               ; preds = %29
  store i1 true, ptr %4, align 1
  br label %108

39:                                               ; preds = %29, %24, %22
  %40 = call noundef zeroext i1 @_ZNK11spirv_cross11CompilerMSL14is_mesh_shaderEv(ptr noundef nonnull align 8 dereferenceable(12482) %12)
  br i1 %40, label %41, label %46

41:                                               ; preds = %39
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.spirv_cross::SPIRVariable", ptr %42, i32 0, i32 2
  %44 = load i32, ptr %43, align 8, !tbaa !11
  %45 = icmp eq i32 %44, 3
  store i1 %45, ptr %4, align 1
  br label %108

46:                                               ; preds = %39
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.spirv_cross::SPIRVariable", ptr %47, i32 0, i32 2
  %49 = load i32, ptr %48, align 8, !tbaa !11
  %50 = icmp eq i32 %49, 3
  br i1 %50, label %51, label %56

51:                                               ; preds = %46
  %52 = call noundef zeroext i1 @_ZNK11spirv_cross11CompilerMSL14is_tesc_shaderEv(ptr noundef nonnull align 8 dereferenceable(12482) %12)
  br i1 %52, label %53, label %56

53:                                               ; preds = %51
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = call noundef zeroext i1 @_ZNK11spirv_cross12CompilerGLSL31is_stage_output_variable_maskedERKNS_12SPIRVariableE(ptr noundef nonnull align 8 dereferenceable(9848) %12, ptr noundef nonnull align 8 dereferenceable(176) %54)
  br label %56

56:                                               ; preds = %53, %51, %46
  %57 = phi i1 [ false, %51 ], [ false, %46 ], [ %55, %53 ]
  store i1 %57, ptr %4, align 1
  br label %108

58:                                               ; preds = %19
  %59 = load i32, ptr %7, align 4, !tbaa !9
  %60 = icmp eq i32 %59, 12
  br i1 %60, label %61, label %107

61:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.spirv_cross::IVariant", ptr %62, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 8 %63, i64 4, i1 false), !tbaa.struct !27
  %64 = getelementptr inbounds %"class.spirv_cross::TypedID.413", ptr %10, i32 0, i32 0
  %65 = load i32, ptr %64, align 4
  %66 = call noundef i32 @_ZNK11spirv_cross8Compiler14get_decorationENS_7TypedIDILNS_5TypesE0EEEN3spv10DecorationE(ptr noundef nonnull align 8 dereferenceable(3176) %12, i32 %65, i32 noundef 11)
  store i32 %66, ptr %9, align 4, !tbaa !29
  %67 = call noundef zeroext i1 @_ZNK11spirv_cross11CompilerMSL14is_tese_shaderEv(ptr noundef nonnull align 8 dereferenceable(12482) %12)
  br i1 %67, label %68, label %78

68:                                               ; preds = %61
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = call noundef zeroext i1 @_ZNK11spirv_cross8Compiler19is_builtin_variableERKNS_12SPIRVariableE(ptr noundef nonnull align 8 dereferenceable(3176) %12, ptr noundef nonnull align 8 dereferenceable(176) %69)
  br i1 %70, label %71, label %78

71:                                               ; preds = %68
  %72 = load i32, ptr %9, align 4, !tbaa !29
  %73 = icmp eq i32 %72, 13
  br i1 %73, label %77, label %74

74:                                               ; preds = %71
  %75 = load i32, ptr %9, align 4, !tbaa !29
  %76 = icmp eq i32 %75, 7
  br i1 %76, label %77, label %78

77:                                               ; preds = %74, %71
  store i1 false, ptr %4, align 1
  store i32 1, ptr %11, align 4
  br label %106

78:                                               ; preds = %74, %68, %61
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.spirv_cross::SPIRVariable", ptr %79, i32 0, i32 2
  %81 = load i32, ptr %80, align 8, !tbaa !11
  %82 = icmp eq i32 %81, 3
  br i1 %82, label %88, label %83

83:                                               ; preds = %78
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = getelementptr inbounds %"struct.spirv_cross::SPIRVariable", ptr %84, i32 0, i32 2
  %86 = load i32, ptr %85, align 8, !tbaa !11
  %87 = icmp eq i32 %86, 1
  br i1 %87, label %88, label %104

88:                                               ; preds = %83, %78
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.spirv_cross::SPIRVariable", ptr %89, i32 0, i32 2
  %91 = load i32, ptr %90, align 8, !tbaa !11
  %92 = call noundef zeroext i1 @_ZNK11spirv_cross11CompilerMSL34variable_storage_requires_stage_ioEN3spv12StorageClassE(ptr noundef nonnull align 8 dereferenceable(12482) %12, i32 noundef %91)
  br i1 %92, label %104, label %93

93:                                               ; preds = %88
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.spirv_cross::SPIRVariable", ptr %94, i32 0, i32 2
  %96 = load i32, ptr %95, align 8, !tbaa !11
  %97 = icmp ne i32 %96, 3
  br i1 %97, label %102, label %98

98:                                               ; preds = %93
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = call noundef zeroext i1 @_ZNK11spirv_cross12CompilerGLSL31is_stage_output_variable_maskedERKNS_12SPIRVariableE(ptr noundef nonnull align 8 dereferenceable(9848) %12, ptr noundef nonnull align 8 dereferenceable(176) %99)
  %101 = xor i1 %100, true
  br label %102

102:                                              ; preds = %98, %93
  %103 = phi i1 [ true, %93 ], [ %101, %98 ]
  br label %104

104:                                              ; preds = %102, %88, %83
  %105 = phi i1 [ false, %88 ], [ false, %83 ], [ %103, %102 ]
  store i1 %105, ptr %4, align 1
  store i32 1, ptr %11, align 4
  br label %106

106:                                              ; preds = %104, %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %108

107:                                              ; preds = %58
  store i1 false, ptr %4, align 1
  br label %108

108:                                              ; preds = %107, %106, %56, %41, %38, %18
  %109 = load i1, ptr %4, align 1
  ret i1 %109
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 = !{!"_ZTSN3spv12StorageClassE", !7, i64 0}
!11 = !{!12, !10, i64 16}
!12 = !{!"_ZTSN11spirv_cross12SPIRVariableE", !13, i64 0, !16, i64 12, !10, i64 16, !15, i64 20, !14, i64 24, !17, i64 28, !18, i64 32, !22, i64 88, !22, i64 89, !14, i64 92, !23, i64 96, !22, i64 152, !22, i64 153, !22, i64 154, !22, i64 155, !15, i64 156, !26, i64 160, !22, i64 164, !22, i64 165, !22, i64 166, !6, i64 168}
!13 = !{!"_ZTSN11spirv_cross8IVariantE", !14, i64 8}
!14 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE0EEE", !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE1EEE", !15, i64 0}
!17 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE2EEE", !15, i64 0}
!18 = !{!"_ZTSN11spirv_cross11SmallVectorIjLm8EEE", !19, i64 0, !20, i64 16, !21, i64 24}
!19 = !{!"_ZTSN11spirv_cross10VectorViewIjEE", !6, i64 0, !20, i64 8}
!20 = !{!"long", !7, i64 0}
!21 = !{!"_ZTSN11spirv_cross13AlignedBufferIjLm8EEE", !7, i64 0}
!22 = !{!"bool", !7, i64 0}
!23 = !{!"_ZTSN11spirv_cross11SmallVectorINS_7TypedIDILNS_5TypesE0EEELm8EEE", !24, i64 0, !20, i64 16, !25, i64 24}
!24 = !{!"_ZTSN11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE0EEEEE", !6, i64 0, !20, i64 8}
!25 = !{!"_ZTSN11spirv_cross13AlignedBufferINS_7TypedIDILNS_5TypesE0EEELm8EEE", !7, i64 0}
!26 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE6EEE", !15, i64 0}
!27 = !{i64 0, i64 4, !28}
!28 = !{!15, !15, i64 0}
!29 = !{!30, !30, i64 0}
!30 = !{!"_ZTSN3spv7BuiltInE", !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

declare noundef i32 @_ZNK11spirv_cross8Compiler14get_decorationENS_7TypedIDILNS_5TypesE0EEEN3spv10DecorationE(ptr noundef nonnull align 8 dereferenceable(3176), i32, i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK11spirv_cross11CompilerMSL14is_mesh_shaderEv(ptr noundef nonnull align 8 dereferenceable(12482)) 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 #2 align 2

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

declare noundef zeroext i1 @_ZNK11spirv_cross8Compiler19is_builtin_variableERKNS_12SPIRVariableE(ptr noundef nonnull align 8 dereferenceable(3176), ptr noundef nonnull align 8 dereferenceable(176)) local_unnamed_addr #0

declare noundef zeroext i1 @_ZNK11spirv_cross12CompilerGLSL31is_stage_output_variable_maskedERKNS_12SPIRVariableE(ptr noundef nonnull align 8 dereferenceable(9848), ptr noundef nonnull align 8 dereferenceable(176)) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK11spirv_cross11CompilerMSL33variable_decl_is_remapped_storageERKNS_12SPIRVariableEN3spv12StorageClassE(ptr noundef nonnull align 8 dereferenceable(12482) %0, ptr noundef nonnull align 8 dereferenceable(176) %1, i32 noundef %2) unnamed_addr #1 align 2 {
  %4 = getelementptr inbounds i8, ptr %1, i64 16
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = icmp eq i32 %5, %2
  br i1 %6, label %42, label %7

7:                                                ; preds = %3
  switch i32 %2, label %42 [
    i32 4, label %8
    i32 12, label %26
  ]

8:                                                ; preds = %7
  %9 = tail call noundef zeroext i1 @_ZNK11spirv_cross11CompilerMSL14is_tesc_shaderEv(ptr noundef nonnull align 8 dereferenceable(12482) %0)
  %10 = load i32, ptr %4, align 8
  %11 = icmp eq i32 %10, 3
  %or.cond24 = select i1 %9, i1 %11, i1 false
  br i1 %or.cond24, label %12, label %18

12:                                               ; preds = %8
  %13 = getelementptr inbounds i8, ptr %1, i64 12
  %14 = tail call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %13)
  %15 = tail call noundef nonnull align 8 dereferenceable(336) ptr @_ZNK11spirv_cross8Compiler3getINS_8SPIRTypeEEERKT_j(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 noundef %14)
  %16 = getelementptr inbounds i8, ptr %15, i64 8
  %.sroa.03.0.copyload = load i32, ptr %16, align 8, !tbaa !25
  %17 = tail call noundef zeroext i1 @_ZNK11spirv_cross8Compiler14has_decorationENS_7TypedIDILNS_5TypesE0EEEN3spv10DecorationE(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 %.sroa.03.0.copyload, i32 noundef 2)
  br i1 %17, label %42, label %18

18:                                               ; preds = %12, %8
  %19 = tail call noundef zeroext i1 @_ZNK11spirv_cross11CompilerMSL14is_mesh_shaderEv(ptr noundef nonnull align 8 dereferenceable(12482) %0)
  %20 = load i32, ptr %4, align 8, !tbaa !5
  %21 = icmp eq i32 %20, 3
  %.not25 = xor i1 %21, true
  %brmerge = select i1 %19, i1 true, i1 %.not25
  %.mux = select i1 %19, i1 %21, i1 false
  br i1 %brmerge, label %42, label %22

22:                                               ; preds = %18
  %23 = tail call noundef zeroext i1 @_ZNK11spirv_cross11CompilerMSL14is_tesc_shaderEv(ptr noundef nonnull align 8 dereferenceable(12482) %0)
  br i1 %23, label %24, label %42

24:                                               ; preds = %22
  %25 = tail call noundef zeroext i1 @_ZNK11spirv_cross12CompilerGLSL31is_stage_output_variable_maskedERKNS_12SPIRVariableE(ptr noundef nonnull align 8 dereferenceable(9848) %0, ptr noundef nonnull align 8 dereferenceable(176) %1)
  br label %42

26:                                               ; preds = %7
  %27 = getelementptr inbounds i8, ptr %1, i64 8
  %.sroa.0.0.copyload = load i32, ptr %27, align 8, !tbaa !25
  %28 = tail call noundef i32 @_ZNK11spirv_cross8Compiler14get_decorationENS_7TypedIDILNS_5TypesE0EEEN3spv10DecorationE(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 %.sroa.0.0.copyload, i32 noundef 11)
  %29 = tail call noundef zeroext i1 @_ZNK11spirv_cross11CompilerMSL14is_tese_shaderEv(ptr noundef nonnull align 8 dereferenceable(12482) %0)
  br i1 %29, label %30, label %33

30:                                               ; preds = %26
  %31 = tail call noundef zeroext i1 @_ZNK11spirv_cross8Compiler19is_builtin_variableERKNS_12SPIRVariableE(ptr noundef nonnull align 8 dereferenceable(3176) %0, ptr noundef nonnull align 8 dereferenceable(176) %1)
  br i1 %31, label %32, label %33

32:                                               ; preds = %30
  switch i32 %28, label %33 [
    i32 13, label %42
    i32 7, label %42
  ]

33:                                               ; preds = %32, %30, %26
  %34 = load i32, ptr %4, align 8, !tbaa !5
  switch i32 %34, label %42 [
    i32 3, label %35
    i32 1, label %35
  ]

35:                                               ; preds = %33, %33
  %36 = tail call noundef zeroext i1 @_ZNK11spirv_cross11CompilerMSL34variable_storage_requires_stage_ioEN3spv12StorageClassE(ptr noundef nonnull align 8 dereferenceable(12482) %0, i32 noundef %34)
  br i1 %36, label %42, label %37

37:                                               ; preds = %35
  %38 = load i32, ptr %4, align 8, !tbaa !5
  %.not = icmp eq i32 %38, 3
  br i1 %.not, label %39, label %42

39:                                               ; preds = %37
  %40 = tail call noundef zeroext i1 @_ZNK11spirv_cross12CompilerGLSL31is_stage_output_variable_maskedERKNS_12SPIRVariableE(ptr noundef nonnull align 8 dereferenceable(9848) %0, ptr noundef nonnull align 8 dereferenceable(176) %1)
  %41 = xor i1 %40, true
  br label %42

42:                                               ; preds = %18, %7, %32, %32, %33, %37, %39, %35, %22, %24, %12, %3
  %.1 = phi i1 [ true, %3 ], [ true, %12 ], [ false, %22 ], [ %25, %24 ], [ false, %32 ], [ false, %32 ], [ false, %35 ], [ true, %37 ], [ %41, %39 ], [ false, %33 ], [ false, %7 ], [ %.mux, %18 ]
  ret i1 %.1
}

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

!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_cross12SPIRVariableE", !7, i64 0, !12, i64 12, !13, i64 16, !9, i64 20, !8, i64 24, !14, i64 28, !15, i64 32, !20, i64 88, !20, i64 89, !8, i64 92, !21, i64 96, !20, i64 152, !20, i64 153, !20, i64 154, !20, i64 155, !9, i64 156, !24, i64 160, !20, i64 164, !20, i64 165, !20, i64 166, !17, i64 168}
!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 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE1EEE", !9, i64 0}
!13 = !{!"_ZTSN3spv12StorageClassE", !10, i64 0}
!14 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE2EEE", !9, i64 0}
!15 = !{!"_ZTSN11spirv_cross11SmallVectorIjLm8EEE", !16, i64 0, !18, i64 16, !19, i64 24}
!16 = !{!"_ZTSN11spirv_cross10VectorViewIjEE", !17, i64 0, !18, i64 8}
!17 = !{!"any pointer", !10, i64 0}
!18 = !{!"long", !10, i64 0}
!19 = !{!"_ZTSN11spirv_cross13AlignedBufferIjLm8EEE", !10, i64 0}
!20 = !{!"bool", !10, i64 0}
!21 = !{!"_ZTSN11spirv_cross11SmallVectorINS_7TypedIDILNS_5TypesE0EEELm8EEE", !22, i64 0, !18, i64 16, !23, i64 24}
!22 = !{!"_ZTSN11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE0EEEEE", !17, i64 0, !18, i64 8}
!23 = !{!"_ZTSN11spirv_cross13AlignedBufferINS_7TypedIDILNS_5TypesE0EEELm8EEE", !10, i64 0}
!24 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE6EEE", !9, i64 0}
!25 = !{!9, !9, i64 0}


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