	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RB_CapShadowMap                ## -- Begin function RB_CapShadowMap
	.p2align	4, 0x90
_RB_CapShadowMap:                       ## @RB_CapShadowMap
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_tess@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_RB_EndSurface
LBB0_2:
	movslq	(%rbx), %rax
	cmpq	$-1, %rax
	je	LBB0_9
## %bb.3:
	movslq	4(%rbx), %rsi
	movq	_tr@GOTPCREL(%rip), %rcx
	cmpq	$-1, %rsi
	je	LBB0_6
## %bb.4:
	movq	8(%rcx), %rcx
	movq	(%rcx,%rax,8), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	movl	(%rax), %edi
	movq	_GL_TEXTURE_CUBE_MAP_POSITIVE_X@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	jmp	LBB0_8
LBB0_6:
	movq	(%rcx), %rcx
	movq	(%rcx,%rax,8), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movl	(%rax), %edi
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
LBB0_8:
	movq	_backEnd@GOTPCREL(%rip), %rdx
	movl	8(%rdx), %r9d
	movq	_glConfig@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r10
	movq	_PSHADOW_MAP_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	movq	(%rdx), %rcx
	addq	%rax, %rcx
	subq	%rcx, %r10
	subq	$8, %rsp
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	pushq	%rax
	pushq	%rax
	pushq	%r10
	callq	_qglCopyTextureSubImage2DEXT
	addq	$32, %rsp
LBB0_9:
	addq	$8, %rbx
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_tess,8,3                       ## @tess
	.comm	_tr,16,3                        ## @tr
	.comm	_GL_TEXTURE_CUBE_MAP_POSITIVE_X,8,3 ## @GL_TEXTURE_CUBE_MAP_POSITIVE_X
	.comm	_backEnd,16,3                   ## @backEnd
	.comm	_glConfig,8,3                   ## @glConfig
	.comm	_PSHADOW_MAP_SIZE,8,3           ## @PSHADOW_MAP_SIZE
	.comm	_GL_TEXTURE_2D,8,3              ## @GL_TEXTURE_2D
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RB_CapShadowMap                ; -- Begin function RB_CapShadowMap
	.p2align	2
_RB_CapShadowMap:                       ; @RB_CapShadowMap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _tess@GOTPAGE
Lloh1:
	ldr	x8, [x8, _tess@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	bl	_RB_EndSurface
LBB0_2:
	ldrsw	x8, [x19]
	cmn	w8, #1
	b.eq	LBB0_9
; %bb.3:
	ldrsw	x9, [x19, #4]
	cmn	w9, #1
	b.eq	LBB0_6
; %bb.4:
Lloh3:
	adrp	x10, _tr@GOTPAGE
Lloh4:
	ldr	x10, [x10, _tr@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10, #8]
	ldr	x8, [x10, x8, lsl #3]
	cbz	x8, LBB0_9
; %bb.5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _GL_TEXTURE_CUBE_MAP_POSITIVE_X@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GL_TEXTURE_CUBE_MAP_POSITIVE_X@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	add	x1, x8, x9
	b	LBB0_8
LBB0_6:
Lloh9:
	adrp	x9, _tr@GOTPAGE
Lloh10:
	ldr	x9, [x9, _tr@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	ldr	x8, [x9, x8, lsl #3]
	cbz	x8, LBB0_9
; %bb.7:
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _GL_TEXTURE_2D@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GL_TEXTURE_2D@GOTPAGEOFF]
Lloh14:
	ldr	x1, [x8]
LBB0_8:
Lloh15:
	adrp	x8, _backEnd@GOTPAGE
Lloh16:
	ldr	x8, [x8, _backEnd@GOTPAGEOFF]
	ldr	w5, [x8, #8]
Lloh17:
	adrp	x9, _glConfig@GOTPAGE
Lloh18:
	ldr	x9, [x9, _glConfig@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	ldr	x8, [x8]
Lloh20:
	adrp	x10, _PSHADOW_MAP_SIZE@GOTPAGE
Lloh21:
	ldr	x10, [x10, _PSHADOW_MAP_SIZE@GOTPAGEOFF]
Lloh22:
	ldr	x7, [x10]
	add	x8, x8, x7
	sub	x6, x9, x8
	str	x7, [sp]
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_qglCopyTextureSubImage2DEXT
LBB0_9:
	add	x0, x19, #8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_tess,8,3                       ; @tess
	.comm	_tr,16,3                        ; @tr
	.comm	_GL_TEXTURE_CUBE_MAP_POSITIVE_X,8,3 ; @GL_TEXTURE_CUBE_MAP_POSITIVE_X
	.comm	_backEnd,16,3                   ; @backEnd
	.comm	_glConfig,8,3                   ; @glConfig
	.comm	_PSHADOW_MAP_SIZE,8,3           ; @PSHADOW_MAP_SIZE
	.comm	_GL_TEXTURE_2D,8,3              ; @GL_TEXTURE_2D
.subsections_via_symbols
