	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RE_AddRefEntityToScene         ## -- Begin function RE_AddRefEntityToScene
	.p2align	4, 0x90
_RE_AddRefEntityToScene:                ## @RE_AddRefEntityToScene
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_tr@GOTPCREL(%rip), %r15
	cmpl	$0, 8(%r15)
	je	LBB0_6
## %bb.1:
	movq	_r_numentities@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	_ENTITYNUM_WORLD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_6
## %bb.2:
	movq	%rdi, %rbx
	movq	(%rdi), %rdx
	testq	%rdx, %rdx
	js	LBB0_4
## %bb.3:
	movq	_RT_MAX_REF_ENTITY_TYPE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	jl	LBB0_5
LBB0_4:
	movq	_ri@GOTPCREL(%rip), %rax
	movq	_ERR_DROP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	callq	*(%rax)
	movq	(%r14), %rax
	movq	(%rbx), %rdx
LBB0_5:
	movq	_backEndData@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%r15), %rsi
	movq	(%rcx,%rsi,8), %rsi
	movq	(%rsi), %rsi
	shlq	$4, %rax
	movq	%rdx, 8(%rsi,%rax)
	movq	_qfalse@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r15), %rdx
	movq	(%rcx,%rdx,8), %rcx
	movq	(%rcx), %rcx
	movq	(%r14), %rdx
	movq	%rdx, %rsi
	shlq	$4, %rsi
	movl	%eax, (%rcx,%rsi)
	incq	%rdx
	movq	%rdx, (%r14)
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_tr,16,3                        ## @tr
	.comm	_r_numentities,8,3              ## @r_numentities
	.comm	_ENTITYNUM_WORLD,8,3            ## @ENTITYNUM_WORLD
	.comm	_RT_MAX_REF_ENTITY_TYPE,8,3     ## @RT_MAX_REF_ENTITY_TYPE
	.comm	_ri,8,3                         ## @ri
	.comm	_ERR_DROP,4,2                   ## @ERR_DROP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RE_AddRefEntityToScene: bad reType %i"

	.comm	_backEndData,8,3                ## @backEndData
	.comm	_qfalse,4,2                     ## @qfalse
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RE_AddRefEntityToScene         ; -- Begin function RE_AddRefEntityToScene
	.p2align	2
_RE_AddRefEntityToScene:                ; @RE_AddRefEntityToScene
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x21, _tr@GOTPAGE
Lloh1:
	ldr	x21, [x21, _tr@GOTPAGEOFF]
	ldr	w8, [x21, #8]
	cbz	w8, LBB0_6
; %bb.1:
Lloh2:
	adrp	x20, _r_numentities@GOTPAGE
Lloh3:
	ldr	x20, [x20, _r_numentities@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh4:
	adrp	x9, _ENTITYNUM_WORLD@GOTPAGE
Lloh5:
	ldr	x9, [x9, _ENTITYNUM_WORLD@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_6
; %bb.2:
	mov	x19, x0
	ldr	x2, [x0]
	tbnz	x2, #63, LBB0_4
; %bb.3:
Lloh7:
	adrp	x9, _RT_MAX_REF_ENTITY_TYPE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _RT_MAX_REF_ENTITY_TYPE@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x2, x9
	b.lt	LBB0_5
LBB0_4:
Lloh10:
	adrp	x8, _ri@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ri@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
Lloh13:
	adrp	x9, _ERR_DROP@GOTPAGE
Lloh14:
	ldr	x9, [x9, _ERR_DROP@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x9]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	blr	x8
	ldr	x8, [x20]
	ldr	x2, [x19]
LBB0_5:
Lloh18:
	adrp	x9, _backEndData@GOTPAGE
Lloh19:
	ldr	x9, [x9, _backEndData@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	ldr	x10, [x21]
	ldr	x10, [x9, x10, lsl #3]
	ldr	x10, [x10]
	add	x8, x10, x8, lsl #4
Lloh21:
	adrp	x10, _qfalse@GOTPAGE
Lloh22:
	ldr	x10, [x10, _qfalse@GOTPAGEOFF]
	str	x2, [x8, #8]
Lloh23:
	ldr	w8, [x10]
	ldr	x10, [x21]
	ldr	x9, [x9, x10, lsl #3]
	ldr	x9, [x9]
	ldr	x10, [x20]
	lsl	x11, x10, #4
	str	w8, [x9, x11]
	add	x8, x10, #1
	str	x8, [x20]
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_tr,16,3                        ; @tr
	.comm	_r_numentities,8,3              ; @r_numentities
	.comm	_ENTITYNUM_WORLD,8,3            ; @ENTITYNUM_WORLD
	.comm	_RT_MAX_REF_ENTITY_TYPE,8,3     ; @RT_MAX_REF_ENTITY_TYPE
	.comm	_ri,8,3                         ; @ri
	.comm	_ERR_DROP,4,2                   ; @ERR_DROP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RE_AddRefEntityToScene: bad reType %i"

	.comm	_backEndData,8,3                ; @backEndData
	.comm	_qfalse,4,2                     ; @qfalse
.subsections_via_symbols
