	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_R_AddWorldSurfaces             ## -- Begin function R_AddWorldSurfaces
	.p2align	4, 0x90
_R_AddWorldSurfaces:                    ## @R_AddWorldSurfaces
	.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	_r_drawworld@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$0, (%rax)
	je	LBB0_5
## %bb.1:
	movq	_tr@GOTPCREL(%rip), %rbx
	movq	_RDF_NOWORLDMODEL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%rbx)
	je	LBB0_2
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_2:
	movq	_ENTITYNUM_WORLD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	_QSORT_ENTITYNUM_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movl	%eax, 4(%rbx)
	xorl	%eax, %eax
	callq	_R_MarkLeaves
	movq	24(%rbx), %rax
	movl	(%rax), %edi
	movl	4(%rax), %esi
	callq	_ClearBounds
	movl	12(%rbx), %ecx
	cmpl	$33, %ecx
	jl	LBB0_4
## %bb.3:
	movl	$32, 12(%rbx)
	movl	$32, %ecx
LBB0_4:
	movl	$-1, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	movq	16(%rbx), %rax
	movl	(%rax), %edi
	notl	%edx
	movl	$15, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_R_RecursiveWorldNode           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_r_drawworld,8,3                ## @r_drawworld
	.comm	_tr,32,3                        ## @tr
	.comm	_RDF_NOWORLDMODEL,4,2           ## @RDF_NOWORLDMODEL
	.comm	_ENTITYNUM_WORLD,4,2            ## @ENTITYNUM_WORLD
	.comm	_QSORT_ENTITYNUM_SHIFT,4,2      ## @QSORT_ENTITYNUM_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_R_AddWorldSurfaces             ; -- Begin function R_AddWorldSurfaces
	.p2align	2
_R_AddWorldSurfaces:                    ; @R_AddWorldSurfaces
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _r_drawworld@GOTPAGE
Lloh1:
	ldr	x8, [x8, _r_drawworld@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w8, [x8]
	cbz	w8, LBB0_2
; %bb.1:
Lloh3:
	adrp	x19, _tr@GOTPAGE
Lloh4:
	ldr	x19, [x19, _tr@GOTPAGEOFF]
	ldr	w8, [x19, #8]
Lloh5:
	adrp	x9, _RDF_NOWORLDMODEL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _RDF_NOWORLDMODEL@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh8:
	adrp	x8, _ENTITYNUM_WORLD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENTITYNUM_WORLD@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _QSORT_ENTITYNUM_SHIFT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _QSORT_ENTITYNUM_SHIFT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	lsl	w9, w8, w9
	stp	w8, w9, [x19]
	bl	_R_MarkLeaves
	ldr	x8, [x19, #24]
	ldp	w0, w1, [x8]
	bl	_ClearBounds
	ldr	w8, [x19, #12]
	cmp	w8, #33
	b.lt	LBB0_5
; %bb.4:
	mov	w8, #32
	str	w8, [x19, #12]
LBB0_5:
	ldr	x9, [x19, #16]
	ldr	w0, [x9]
	mov	w9, #-1
	lsl	w8, w9, w8
	mvn	w2, w8
	mov	w1, #15
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_R_RecursiveWorldNode
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_r_drawworld,8,3                ; @r_drawworld
	.comm	_tr,32,3                        ; @tr
	.comm	_RDF_NOWORLDMODEL,4,2           ; @RDF_NOWORLDMODEL
	.comm	_ENTITYNUM_WORLD,4,2            ; @ENTITYNUM_WORLD
	.comm	_QSORT_ENTITYNUM_SHIFT,4,2      ; @QSORT_ENTITYNUM_SHIFT
.subsections_via_symbols
