	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function R_AddWorldSurface
_R_AddWorldSurface:                     ## @R_AddWorldSurface
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_tr@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, (%rdi)
	je	LBB0_6
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	%rax, (%rdi)
	movl	12(%rdi), %esi
	movl	16(%rdi), %edi
	callq	_R_CullSurface
	testq	%rax, %rax
	je	LBB0_2
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.4:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_R_DlightSurface
	xorl	%ecx, %ecx
	testl	%eax, %eax
	setne	%cl
	jmp	LBB0_5
LBB0_3:
	xorl	%ecx, %ecx
LBB0_5:
	movl	16(%rbx), %edi
	movl	8(%rbx), %edx
	movl	12(%rbx), %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_R_AddDrawSurf                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_tr,8,3                         ## @tr
	.no_dead_strip	_R_AddWorldSurface
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function R_AddWorldSurface
_R_AddWorldSurface:                     ; @R_AddWorldSurface
	.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
	ldr	x9, [x0]
Lloh0:
	adrp	x8, _tr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _tr@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x9, x8
	b.eq	LBB0_2
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	str	x8, [x0]
	ldr	w0, [x0, #16]
	ldr	w1, [x19, #12]
	bl	_R_CullSurface
	cbz	x0, 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:
	cbz	w20, LBB0_5
; %bb.4:
	mov	x0, x19
	mov	x1, x20
	bl	_R_DlightSurface
	cmp	w0, #0
	cset	w3, ne
	b	LBB0_6
LBB0_5:
	mov	w3, #0
LBB0_6:
	ldp	w1, w0, [x19, #12]
	ldr	w2, [x19, #8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_R_AddDrawSurf
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_tr,8,3                         ; @tr
	.no_dead_strip	_R_AddWorldSurface
.subsections_via_symbols
