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

; 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.spvc_reflected_builtin_resource = type { i32, i32, %struct.spvc_reflected_resource }
%struct.spvc_reflected_resource = type { i32, i32, i32, ptr }
%"struct.spirv_cross::BuiltInResource" = type { i32, %"class.spirv_cross::TypedID.217", %"struct.spirv_cross::Resource" }
%"class.spirv_cross::TypedID.217" = type { i32 }
%"struct.spirv_cross::Resource" = type { %"class.spirv_cross::TypedID.216", %"class.spirv_cross::TypedID.217", %"class.spirv_cross::TypedID.217", %"class.std::__cxx11::basic_string" }
%"class.spirv_cross::TypedID.216" = type { i32 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%struct.spvc_resources_s = type { %struct.ScratchMemoryAllocation, ptr, %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.221", %"class.spirv_cross::SmallVector.221" }
%struct.ScratchMemoryAllocation = type { ptr }
%"class.spirv_cross::SmallVector.218" = type { %"class.spirv_cross::VectorView.219", i64, %"class.spirv_cross::AlignedBuffer.220" }
%"class.spirv_cross::VectorView.219" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.220" = type { [192 x i8] }
%"class.spirv_cross::SmallVector.221" = type { %"class.spirv_cross::VectorView.222", i64, %"class.spirv_cross::AlignedBuffer.223" }
%"class.spirv_cross::VectorView.222" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.223" = type { [256 x i8] }

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN14spvc_context_s13allocate_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(136), ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN16spvc_resources_s14copy_resourcesERN11spirv_cross11SmallVectorI31spvc_reflected_builtin_resourceLm8EEERKNS1_INS0_15BuiltInResourceELm8EEE(ptr noundef nonnull align 8 dereferenceable(3600) %0, ptr noundef nonnull align 8 dereferenceable(280) %1, ptr noundef nonnull align 8 dereferenceable(472) %2) #0 align 2 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca %struct.spvc_reflected_builtin_resource, align 8
  %14 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %15 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %16 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %16, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  %18 = call noundef ptr @_ZNK11spirv_cross10VectorViewINS_15BuiltInResourceEE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %17) #3
  store ptr %18, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %19 = load ptr, ptr %8, align 8, !tbaa !5
  %20 = call noundef ptr @_ZNK11spirv_cross10VectorViewINS_15BuiltInResourceEE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %19) #3
  store ptr %20, ptr %10, align 8, !tbaa !5
  br label %21

21:                                               ; preds = %76, %3
  %22 = load ptr, ptr %9, align 8, !tbaa !5
  %23 = load ptr, ptr %10, align 8, !tbaa !5
  %24 = icmp ne ptr %22, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %21
  store i32 2, ptr %11, align 4
  br label %79

26:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %27, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #3
  %28 = load ptr, ptr %12, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.spirv_cross::BuiltInResource", ptr %28, i32 0, i32 1
  %30 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %29)
  %31 = getelementptr inbounds %struct.spvc_reflected_builtin_resource, ptr %13, i32 0, i32 1
  store i32 %30, ptr %31, align 4, !tbaa !9
  %32 = load ptr, ptr %12, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.spirv_cross::BuiltInResource", ptr %32, i32 0, i32 0
  %34 = load i32, ptr %33, align 8, !tbaa !14
  %35 = getelementptr inbounds %struct.spvc_reflected_builtin_resource, ptr %13, i32 0, i32 0
  store i32 %34, ptr %35, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %36 = getelementptr inbounds %struct.spvc_reflected_builtin_resource, ptr %13, i32 0, i32 2
  store ptr %36, ptr %14, align 8, !tbaa !5
  %37 = load ptr, ptr %12, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.spirv_cross::BuiltInResource", ptr %37, i32 0, i32 2
  %39 = getelementptr inbounds %"struct.spirv_cross::Resource", ptr %38, i32 0, i32 2
  %40 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %39)
  %41 = load ptr, ptr %14, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.spvc_reflected_resource, ptr %41, i32 0, i32 1
  store i32 %40, ptr %42, align 4, !tbaa !24
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.spirv_cross::BuiltInResource", ptr %43, i32 0, i32 2
  %45 = getelementptr inbounds %"struct.spirv_cross::Resource", ptr %44, i32 0, i32 1
  %46 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %45)
  %47 = load ptr, ptr %14, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.spvc_reflected_resource, ptr %47, i32 0, i32 2
  store i32 %46, ptr %48, align 8, !tbaa !25
  %49 = load ptr, ptr %12, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.spirv_cross::BuiltInResource", ptr %49, i32 0, i32 2
  %51 = getelementptr inbounds %"struct.spirv_cross::Resource", ptr %50, i32 0, i32 0
  %52 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %51)
  %53 = load ptr, ptr %14, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.spvc_reflected_resource, ptr %53, i32 0, i32 0
  store i32 %52, ptr %54, align 8, !tbaa !26
  %55 = getelementptr inbounds %struct.spvc_resources_s, ptr %15, i32 0, i32 1
  %56 = load ptr, ptr %55, align 8, !tbaa !27
  %57 = load ptr, ptr %12, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.spirv_cross::BuiltInResource", ptr %57, i32 0, i32 2
  %59 = getelementptr inbounds %"struct.spirv_cross::Resource", ptr %58, i32 0, i32 3
  %60 = call noundef ptr @_ZN14spvc_context_s13allocate_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(136) %56, ptr noundef nonnull align 8 dereferenceable(32) %59)
  %61 = load ptr, ptr %14, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.spvc_reflected_resource, ptr %61, i32 0, i32 3
  store ptr %60, ptr %62, align 8, !tbaa !36
  %63 = load ptr, ptr %14, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.spvc_reflected_resource, ptr %63, i32 0, i32 3
  %65 = load ptr, ptr %64, align 8, !tbaa !36
  %66 = icmp ne ptr %65, null
  br i1 %66, label %68, label %67

67:                                               ; preds = %26
  store i1 false, ptr %4, align 1
  store i32 1, ptr %11, align 4
  br label %70

68:                                               ; preds = %26
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11spirv_cross11SmallVectorI31spvc_reflected_builtin_resourceLm8EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(280) %69, ptr noundef nonnull align 8 dereferenceable(32) %13) #3
  store i32 0, ptr %11, align 4
  br label %70

70:                                               ; preds = %68, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #3
  %71 = load i32, ptr %11, align 4
  switch i32 %71, label %73 [
    i32 0, label %72
  ]

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

73:                                               ; preds = %72, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  %74 = load i32, ptr %11, align 4
  switch i32 %74, label %79 [
    i32 0, label %75
  ]

75:                                               ; preds = %73
  br label %76

76:                                               ; preds = %75
  %77 = load ptr, ptr %9, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.spirv_cross::BuiltInResource", ptr %77, i32 1
  store ptr %78, ptr %9, align 8, !tbaa !5
  br label %21

79:                                               ; preds = %73, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  %80 = load i32, ptr %11, align 4
  switch i32 %80, label %84 [
    i32 2, label %81
    i32 1, label %82
  ]

81:                                               ; preds = %79
  store i1 true, ptr %4, align 1
  br label %82

82:                                               ; preds = %81, %79
  %83 = load i1, ptr %4, align 1
  ret i1 %83

84:                                               ; preds = %79
  unreachable
}

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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, !12, i64 4}
!10 = !{!"_ZTS31spvc_reflected_builtin_resource", !11, i64 0, !12, i64 4, !13, i64 8}
!11 = !{!"_ZTS11SpvBuiltIn_", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTS23spvc_reflected_resource", !12, i64 0, !12, i64 4, !12, i64 8, !6, i64 16}
!14 = !{!15, !16, i64 0}
!15 = !{!"_ZTSN11spirv_cross15BuiltInResourceE", !16, i64 0, !17, i64 4, !18, i64 8}
!16 = !{!"_ZTSN3spv7BuiltInE", !7, i64 0}
!17 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE1EEE", !12, i64 0}
!18 = !{!"_ZTSN11spirv_cross8ResourceE", !19, i64 0, !17, i64 4, !17, i64 8, !20, i64 16}
!19 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE0EEE", !12, i64 0}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !22, i64 8, !7, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!22 = !{!"long", !7, i64 0}
!23 = !{!10, !11, i64 0}
!24 = !{!13, !12, i64 4}
!25 = !{!13, !12, i64 8}
!26 = !{!13, !12, i64 0}
!27 = !{!28, !6, i64 8}
!28 = !{!"_ZTS16spvc_resources_s", !29, i64 0, !6, i64 8, !30, i64 16, !30, i64 232, !30, i64 448, !30, i64 664, !30, i64 880, !30, i64 1096, !30, i64 1312, !30, i64 1528, !30, i64 1744, !30, i64 1960, !30, i64 2176, !30, i64 2392, !30, i64 2608, !30, i64 2824, !33, i64 3040, !33, i64 3320}
!29 = !{!"_ZTS23ScratchMemoryAllocation"}
!30 = !{!"_ZTSN11spirv_cross11SmallVectorI23spvc_reflected_resourceLm8EEE", !31, i64 0, !22, i64 16, !32, i64 24}
!31 = !{!"_ZTSN11spirv_cross10VectorViewI23spvc_reflected_resourceEE", !6, i64 0, !22, i64 8}
!32 = !{!"_ZTSN11spirv_cross13AlignedBufferI23spvc_reflected_resourceLm8EEE", !7, i64 0}
!33 = !{!"_ZTSN11spirv_cross11SmallVectorI31spvc_reflected_builtin_resourceLm8EEE", !34, i64 0, !22, i64 16, !35, i64 24}
!34 = !{!"_ZTSN11spirv_cross10VectorViewI31spvc_reflected_builtin_resourceEE", !6, i64 0, !22, i64 8}
!35 = !{!"_ZTSN11spirv_cross13AlignedBufferI31spvc_reflected_builtin_resourceLm8EEE", !7, i64 0}
!36 = !{!13, !6, i64 16}


; 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.spvc_reflected_builtin_resource = type { i32, i32, %struct.spvc_reflected_resource }
%struct.spvc_reflected_resource = type { i32, i32, i32, ptr }

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN14spvc_context_s13allocate_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(136), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

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

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

; 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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN16spvc_resources_s14copy_resourcesERN11spirv_cross11SmallVectorI31spvc_reflected_builtin_resourceLm8EEERKNS1_INS0_15BuiltInResourceELm8EEE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(3600) %0, ptr noundef nonnull align 8 dereferenceable(280) %1, ptr noundef nonnull align 8 dereferenceable(472) %2) local_unnamed_addr #0 align 2 {
  %4 = alloca %struct.spvc_reflected_builtin_resource, align 8
  %5 = tail call noundef ptr @_ZNK11spirv_cross10VectorViewINS_15BuiltInResourceEE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %2) #3
  %6 = tail call noundef ptr @_ZNK11spirv_cross10VectorViewINS_15BuiltInResourceEE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %2) #3
  %.not30 = icmp eq ptr %5, %6
  br i1 %.not30, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %3
  %7 = getelementptr inbounds i8, ptr %4, i64 4
  %8 = getelementptr inbounds i8, ptr %4, i64 8
  %9 = getelementptr inbounds i8, ptr %4, i64 12
  %10 = getelementptr inbounds i8, ptr %4, i64 16
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = getelementptr inbounds i8, ptr %4, i64 24
  br label %13

13:                                               ; preds = %.lr.ph, %26
  %.02431 = phi ptr [ %5, %.lr.ph ], [ %27, %26 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #3
  %14 = getelementptr inbounds i8, ptr %.02431, i64 4
  %15 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %14)
  store i32 %15, ptr %7, align 4, !tbaa !5
  %16 = load i32, ptr %.02431, align 8, !tbaa !13
  store i32 %16, ptr %4, align 8, !tbaa !22
  %17 = getelementptr inbounds i8, ptr %.02431, i64 8
  %18 = getelementptr inbounds i8, ptr %.02431, i64 16
  %19 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %18)
  store i32 %19, ptr %9, align 4, !tbaa !23
  %20 = getelementptr inbounds i8, ptr %.02431, i64 12
  %21 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %20)
  store i32 %21, ptr %10, align 8, !tbaa !24
  %22 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %17)
  store i32 %22, ptr %8, align 8, !tbaa !25
  %23 = load ptr, ptr %11, align 8, !tbaa !26
  %24 = getelementptr inbounds i8, ptr %.02431, i64 24
  %25 = call noundef ptr @_ZN14spvc_context_s13allocate_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(136) %23, ptr noundef nonnull align 8 dereferenceable(32) %24)
  store ptr %25, ptr %12, align 8, !tbaa !35
  %.not27.not = icmp eq ptr %25, null
  br i1 %.not27.not, label %.critedge, label %26

26:                                               ; preds = %13
  call void @_ZN11spirv_cross11SmallVectorI31spvc_reflected_builtin_resourceLm8EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(280) %1, ptr noundef nonnull align 8 dereferenceable(32) %4) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #3
  %27 = getelementptr inbounds i8, ptr %.02431, i64 56
  %.not = icmp eq ptr %27, %6
  br i1 %.not, label %.loopexit, label %13

.critedge:                                        ; preds = %13
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #3
  br label %.loopexit

.loopexit:                                        ; preds = %26, %3, %.critedge
  %.not29 = phi i1 [ false, %.critedge ], [ true, %3 ], [ true, %26 ]
  ret i1 %.not29
}

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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, !10, i64 4}
!6 = !{!"_ZTS31spvc_reflected_builtin_resource", !7, i64 0, !10, i64 4, !11, i64 8}
!7 = !{!"_ZTS11SpvBuiltIn_", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTS23spvc_reflected_resource", !10, i64 0, !10, i64 4, !10, i64 8, !12, i64 16}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTSN11spirv_cross15BuiltInResourceE", !15, i64 0, !16, i64 4, !17, i64 8}
!15 = !{!"_ZTSN3spv7BuiltInE", !8, i64 0}
!16 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE1EEE", !10, i64 0}
!17 = !{!"_ZTSN11spirv_cross8ResourceE", !18, i64 0, !16, i64 4, !16, i64 8, !19, i64 16}
!18 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE0EEE", !10, i64 0}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !20, i64 0, !21, i64 8, !8, i64 16}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !12, i64 0}
!21 = !{!"long", !8, i64 0}
!22 = !{!6, !7, i64 0}
!23 = !{!11, !10, i64 4}
!24 = !{!11, !10, i64 8}
!25 = !{!11, !10, i64 0}
!26 = !{!27, !12, i64 8}
!27 = !{!"_ZTS16spvc_resources_s", !28, i64 0, !12, i64 8, !29, i64 16, !29, i64 232, !29, i64 448, !29, i64 664, !29, i64 880, !29, i64 1096, !29, i64 1312, !29, i64 1528, !29, i64 1744, !29, i64 1960, !29, i64 2176, !29, i64 2392, !29, i64 2608, !29, i64 2824, !32, i64 3040, !32, i64 3320}
!28 = !{!"_ZTS23ScratchMemoryAllocation"}
!29 = !{!"_ZTSN11spirv_cross11SmallVectorI23spvc_reflected_resourceLm8EEE", !30, i64 0, !21, i64 16, !31, i64 24}
!30 = !{!"_ZTSN11spirv_cross10VectorViewI23spvc_reflected_resourceEE", !12, i64 0, !21, i64 8}
!31 = !{!"_ZTSN11spirv_cross13AlignedBufferI23spvc_reflected_resourceLm8EEE", !8, i64 0}
!32 = !{!"_ZTSN11spirv_cross11SmallVectorI31spvc_reflected_builtin_resourceLm8EEE", !33, i64 0, !21, i64 16, !34, i64 24}
!33 = !{!"_ZTSN11spirv_cross10VectorViewI31spvc_reflected_builtin_resourceEE", !12, i64 0, !21, i64 8}
!34 = !{!"_ZTSN11spirv_cross13AlignedBufferI31spvc_reflected_builtin_resourceLm8EEE", !8, i64 0}
!35 = !{!11, !12, i64 16}


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