	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RB_BeginSurface                ## -- Begin function RB_BeginSurface
	.p2align	4, 0x90
_RB_BeginSurface:                       ## @RB_BeginSurface
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	32(%rdi), %rcx
	testq	%rcx, %rcx
	cmoveq	%rdi, %rcx
	xorps	%xmm0, %xmm0
	movq	_tess@GOTPCREL(%rip), %rax
	movups	%xmm0, 64(%rax)
	movq	$0, 80(%rax)
	movq	%rcx, 24(%rax)
	movl	%esi, (%rax)
	movl	%edx, 4(%rax)
	movups	%xmm0, 48(%rax)
	movl	24(%rcx), %edx
	movl	%edx, 44(%rax)
	movl	20(%rcx), %edx
	movl	%edx, 40(%rax)
	movl	16(%rcx), %edx
	movl	%edx, 16(%rax)
	movq	_qtrue@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 36(%rax)
	movq	_qfalse@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 32(%rax)
	movq	_backEnd@GOTPCREL(%rip), %rdx
	movq	8(%rdx), %rsi
	subq	(%rcx), %rsi
	movq	8(%rcx), %rcx
	cmpq	%rcx, %rsi
	movq	%rcx, %rdi
	cmovlq	%rsi, %rdi
	testq	%rcx, %rcx
	cmoveq	%rsi, %rdi
	movq	%rdi, 8(%rax)
	movq	_VPF_SHADOWMAP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rdx)
	je	LBB0_2
## %bb.1:
	movq	_RB_StageIteratorGeneric@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rax)
LBB0_2:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_tess,88,3                      ## @tess
	.comm	_qtrue,4,2                      ## @qtrue
	.comm	_qfalse,4,2                     ## @qfalse
	.comm	_backEnd,16,3                   ## @backEnd
	.comm	_VPF_SHADOWMAP,4,2              ## @VPF_SHADOWMAP
	.comm	_RB_StageIteratorGeneric,4,2    ## @RB_StageIteratorGeneric
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RB_BeginSurface                ; -- Begin function RB_BeginSurface
	.p2align	2
_RB_BeginSurface:                       ; @RB_BeginSurface
	.cfi_startproc
; %bb.0:
	ldr	x8, [x0, #32]
	cmp	x8, #0
	csel	x9, x0, x8, eq
Lloh0:
	adrp	x8, _tess@GOTPAGE
Lloh1:
	ldr	x8, [x8, _tess@GOTPAGEOFF]
	movi.2d	v0, #0000000000000000
	stur	q0, [x8, #72]
	str	x9, [x8, #24]
	stp	w1, w2, [x8]
	str	xzr, [x8, #48]
	stur	q0, [x8, #56]
	ldur	d0, [x9, #20]
	str	d0, [x8, #40]
	ldr	w10, [x9, #16]
	str	w10, [x8, #16]
Lloh2:
	adrp	x10, _qtrue@GOTPAGE
Lloh3:
	ldr	x10, [x10, _qtrue@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
Lloh5:
	adrp	x11, _qfalse@GOTPAGE
Lloh6:
	ldr	x11, [x11, _qfalse@GOTPAGEOFF]
Lloh7:
	ldr	w11, [x11]
	stp	w11, w10, [x8, #32]
Lloh8:
	adrp	x10, _backEnd@GOTPAGE
Lloh9:
	ldr	x10, [x10, _backEnd@GOTPAGEOFF]
	ldr	x11, [x10, #8]
	ldp	x12, x9, [x9]
	sub	x11, x11, x12
	cmp	x11, x9
	ccmp	x9, #0, #4, ge
	csel	x9, x11, x9, eq
	str	x9, [x8, #8]
	ldr	w9, [x10]
Lloh10:
	adrp	x10, _VPF_SHADOWMAP@GOTPAGE
Lloh11:
	ldr	x10, [x10, _VPF_SHADOWMAP@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_2
; %bb.1:
Lloh13:
	adrp	x9, _RB_StageIteratorGeneric@GOTPAGE
Lloh14:
	ldr	x9, [x9, _RB_StageIteratorGeneric@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	str	w9, [x8, #16]
LBB0_2:
	ret
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_tess,88,3                      ; @tess
	.comm	_qtrue,4,2                      ; @qtrue
	.comm	_qfalse,4,2                     ; @qfalse
	.comm	_backEnd,16,3                   ; @backEnd
	.comm	_VPF_SHADOWMAP,4,2              ; @VPF_SHADOWMAP
	.comm	_RB_StageIteratorGeneric,4,2    ; @RB_StageIteratorGeneric
.subsections_via_symbols
