	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function RB_SurfaceVaoCached
_RB_SurfaceVaoCached:                   ## @RB_SurfaceVaoCached
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movl	%edx, %r13d
	movq	%rsi, %r15
	movl	%edi, %r12d
	movq	_qfalse@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	%rax, -72(%rbp)
	movq	%rax, -64(%rbp)
	movq	%rax, -56(%rbp)
	movq	_tess@GOTPCREL(%rip), %rbx
	movq	48(%rbx), %rdi
	callq	_ShaderRequiresCPUDeforms
	testl	%eax, %eax
	jne	LBB0_14
## %bb.1:
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movq	48(%rbx), %rax
	cmpl	$0, 4(%rax)
	jne	LBB0_14
## %bb.2:
	cmpl	$0, (%rax)
	jne	LBB0_14
## %bb.3:
	testl	%r12d, %r12d
	je	LBB0_14
## %bb.4:
	testl	%r13d, %r13d
	je	LBB0_14
## %bb.5:
	movq	%rbx, %rcx
	movl	%r13d, %ebx
	xorl	%eax, %eax
	movq	%rcx, %r13
	callq	_VaoCache_BindVao
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	orl	%eax, (%r13)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	orl	%eax, 4(%r13)
	leaq	-56(%rbp), %rdi
	leaq	-72(%rbp), %rsi
	leaq	-64(%rbp), %rdx
	movl	%r12d, %ecx
	movl	%ebx, %r8d
	callq	_VaoCache_CheckAdd
	cmpq	$0, -56(%rbp)
	movl	%ebx, %r14d
	je	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	callq	_RB_EndSurface
	movq	48(%r13), %rdi
	movl	40(%r13), %edx
	movl	44(%r13), %esi
	callq	_RB_BeginSurface
LBB0_7:
	cmpq	$0, -72(%rbp)
	je	LBB0_9
## %bb.8:
	xorl	%eax, %eax
	callq	_VaoCache_RecycleVertexBuffer
LBB0_9:
	cmpq	$0, -64(%rbp)
	je	LBB0_11
## %bb.10:
	xorl	%eax, %eax
	callq	_VaoCache_RecycleIndexBuffer
LBB0_11:
	movq	%r13, %rbx
	cmpq	$0, 32(%r13)
	jne	LBB0_13
## %bb.12:
	xorl	%eax, %eax
	callq	_VaoCache_InitQueue
LBB0_13:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	movq	%r15, %rdx
	movl	%r14d, %ecx
	callq	_VaoCache_AddSurface
	addl	%r14d, 8(%rbx)
	movslq	%r12d, %rax
	addq	%rax, 32(%rbx)
	movq	_qfalse@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
	movq	_qtrue@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	%rax, 16(%rbx)
LBB0_14:
	movq	(%r14), %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_qfalse,8,3                     ## @qfalse
	.comm	_tess,56,3                      ## @tess
	.comm	_qtrue,8,3                      ## @qtrue
	.no_dead_strip	_RB_SurfaceVaoCached
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function RB_SurfaceVaoCached
_RB_SurfaceVaoCached:                   ; @RB_SurfaceVaoCached
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x5
	mov	x24, x4
	mov	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x25, _qfalse@GOTPAGE
Lloh1:
	ldr	x25, [x25, _qfalse@GOTPAGEOFF]
	ldr	x8, [x25]
	stp	x8, x8, [sp, #16]
	str	x8, [sp, #8]
Lloh2:
	adrp	x26, _tess@GOTPAGE
Lloh3:
	ldr	x26, [x26, _tess@GOTPAGEOFF]
	ldr	x0, [x26, #48]
	bl	_ShaderRequiresCPUDeforms
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	x8, [x26, #48]
	ldr	w9, [x8, #4]
	cbnz	w9, LBB0_3
; %bb.2:
	ldr	w8, [x8]
	cbz	w8, LBB0_5
LBB0_3:
Lloh4:
	adrp	x25, _qfalse@GOTPAGE
Lloh5:
	ldr	x25, [x25, _qfalse@GOTPAGEOFF]
LBB0_4:
	ldr	x0, [x25]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_5:
Lloh6:
	adrp	x25, _qfalse@GOTPAGE
Lloh7:
	ldr	x25, [x25, _qfalse@GOTPAGEOFF]
	cbz	w19, LBB0_4
; %bb.6:
	cbz	w20, LBB0_4
; %bb.7:
	bl	_VaoCache_BindVao
	ldp	w8, w9, [x26]
	orr	w8, w8, w24
	orr	w9, w9, w23
	stp	w8, w9, [x26]
	add	x0, sp, #8
	add	x1, sp, #24
	add	x2, sp, #16
	mov	x3, x19
	mov	x4, x20
	bl	_VaoCache_CheckAdd
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_9
; %bb.8:
	bl	_RB_EndSurface
	ldr	x0, [x26, #48]
	ldp	w2, w1, [x26, #40]
	bl	_RB_BeginSurface
LBB0_9:
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_11
; %bb.10:
	bl	_VaoCache_RecycleVertexBuffer
LBB0_11:
	ldr	x8, [sp, #16]
	cbz	x8, LBB0_13
; %bb.12:
	bl	_VaoCache_RecycleIndexBuffer
LBB0_13:
	ldr	x8, [x26, #32]
	cbnz	x8, LBB0_15
; %bb.14:
	bl	_VaoCache_InitQueue
LBB0_15:
	mov	x0, x22
	mov	x1, x19
	mov	x2, x21
	mov	x3, x20
	bl	_VaoCache_AddSurface
	ldr	w8, [x26, #8]
	add	w8, w8, w20
	str	w8, [x26, #8]
	ldr	x8, [x26, #32]
	add	x8, x8, w19, sxtw
	str	x8, [x26, #32]
	ldr	x8, [x25]
Lloh8:
	adrp	x25, _qtrue@GOTPAGE
Lloh9:
	ldr	x25, [x25, _qtrue@GOTPAGEOFF]
	ldr	x9, [x25]
	stp	x9, x8, [x26, #16]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_qfalse,8,3                     ; @qfalse
	.comm	_tess,56,3                      ; @tess
	.comm	_qtrue,8,3                      ; @qtrue
	.no_dead_strip	_RB_SurfaceVaoCached
.subsections_via_symbols
