	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_RegisterItemVisuals         ## -- Begin function CG_RegisterItemVisuals
	.p2align	4, 0x90
_CG_RegisterItemVisuals:                ## @CG_RegisterItemVisuals
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movq	_bg_numItems@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%edi, %edi
	js	LBB0_2
## %bb.1:
	cmpl	%ebx, %edx
	jg	LBB0_3
LBB0_2:
	decl	%edx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_CG_Error
LBB0_3:
	movq	_cg_items@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movslq	%ebx, %rax
	leaq	(%rax,%rax,2), %rbx
	cmpq	$0, 16(%r13,%rbx,8)
	jne	LBB0_12
## %bb.4:
	leaq	16(,%rbx,8), %r14
	addq	%r13, %r14
	shlq	$3, %rax
	leaq	(%rax,%rax,2), %r12
	leaq	(%r12,%r13), %rdi
	movq	_bg_itemlist@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	movq	8(%r15,%r12), %rax
	movq	(%rax), %rdi
	callq	_trap_R_RegisterModel
	movq	(%r13,%r12), %rcx
	movq	%rax, (%rcx)
	movl	20(%r15,%r12), %edi
	callq	_trap_R_RegisterShader
	movl	%eax, 8(%r13,%r12)
	movq	(%r15,%r12), %rax
	movq	_IT_WEAPON@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	leaq	(%r15,%r12), %r14
	movl	16(%r15,%rbx,8), %edi
	callq	_CG_RegisterWeapon
	movq	(%r14), %rax
LBB0_6:
	movq	_IT_POWERUP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.7:
	movq	_IT_HEALTH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.8:
	movq	_IT_ARMOR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.9:
	movq	_IT_HOLDABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
LBB0_10:
	leaq	(%r15,%r12), %rax
	addq	$8, %rax
	movq	(%rax), %rax
	movq	8(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.11:
	callq	_trap_R_RegisterModel
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movq	%rax, 8(%rcx)
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bg_numItems,4,2                ## @bg_numItems
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CG_RegisterItemVisuals: itemNum %d out of range [0-%d]"

	.comm	_cg_items,8,3                   ## @cg_items
	.comm	_bg_itemlist,8,3                ## @bg_itemlist
	.comm	_qtrue,8,3                      ## @qtrue
	.comm	_IT_WEAPON,8,3                  ## @IT_WEAPON
	.comm	_IT_POWERUP,8,3                 ## @IT_POWERUP
	.comm	_IT_HEALTH,8,3                  ## @IT_HEALTH
	.comm	_IT_ARMOR,8,3                   ## @IT_ARMOR
	.comm	_IT_HOLDABLE,8,3                ## @IT_HOLDABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_RegisterItemVisuals         ; -- Begin function CG_RegisterItemVisuals
	.p2align	2
_CG_RegisterItemVisuals:                ; @CG_RegisterItemVisuals
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x8, _bg_numItems@GOTPAGE
Lloh1:
	ldr	x8, [x8, _bg_numItems@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tbnz	w0, #31, LBB0_2
; %bb.1:
	cmp	w8, w19
	b.gt	LBB0_3
LBB0_2:
	sub	w2, w8, #1
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_CG_Error
LBB0_3:
Lloh5:
	adrp	x8, _cg_items@GOTPAGE
Lloh6:
	ldr	x8, [x8, _cg_items@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	mov	w9, #24
	smaddl	x20, w19, w9, x8
	ldr	x9, [x20, #16]!
	cbnz	x9, LBB0_9
; %bb.4:
	sxtw	x21, w19
	add	x9, x21, x21, lsl #1
	lsl	x23, x9, #3
	add	x19, x8, x23
Lloh8:
	adrp	x8, _bg_itemlist@GOTPAGE
Lloh9:
	ldr	x8, [x8, _bg_itemlist@GOTPAGEOFF]
Lloh10:
	ldr	x22, [x8]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh11:
	adrp	x8, _qtrue@GOTPAGE
Lloh12:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	str	x8, [x20]
	add	x23, x22, x23
	mov	x20, x23
	ldr	x8, [x20, #8]!
	ldr	x0, [x8]
	bl	_trap_R_RegisterModel
	ldr	x8, [x19]
	str	x0, [x8]
	ldr	w0, [x23, #20]
	bl	_trap_R_RegisterShader
	str	w0, [x19, #8]
	ldr	x8, [x23]
Lloh14:
	adrp	x9, _IT_WEAPON@GOTPAGE
Lloh15:
	ldr	x9, [x9, _IT_WEAPON@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	mov	w8, #24
	madd	x8, x21, x8, x22
	ldr	w0, [x8, #16]
	bl	_CG_RegisterWeapon
	ldr	x8, [x23]
LBB0_6:
Lloh17:
	adrp	x9, _IT_POWERUP@GOTPAGE
Lloh18:
	ldr	x9, [x9, _IT_POWERUP@GOTPAGEOFF]
Lloh19:
	adrp	x10, _IT_HEALTH@GOTPAGE
Lloh20:
	ldr	x10, [x10, _IT_HEALTH@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
Lloh22:
	ldr	x10, [x10]
Lloh23:
	adrp	x11, _IT_ARMOR@GOTPAGE
Lloh24:
	ldr	x11, [x11, _IT_ARMOR@GOTPAGEOFF]
Lloh25:
	adrp	x12, _IT_HOLDABLE@GOTPAGE
Lloh26:
	ldr	x12, [x12, _IT_HOLDABLE@GOTPAGEOFF]
Lloh27:
	ldr	x11, [x11]
Lloh28:
	ldr	x12, [x12]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	ccmp	x8, x11, #4, ne
	ccmp	x8, x12, #4, ne
	b.ne	LBB0_9
; %bb.7:
	ldr	x8, [x20]
	ldr	x0, [x8, #8]
	cbz	x0, LBB0_9
; %bb.8:
	bl	_trap_R_RegisterModel
	ldr	x8, [x19]
	str	x0, [x8, #8]
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh27
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_bg_numItems,4,2                ; @bg_numItems
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CG_RegisterItemVisuals: itemNum %d out of range [0-%d]"

	.comm	_cg_items,8,3                   ; @cg_items
	.comm	_bg_itemlist,8,3                ; @bg_itemlist
	.comm	_qtrue,8,3                      ; @qtrue
	.comm	_IT_WEAPON,8,3                  ; @IT_WEAPON
	.comm	_IT_POWERUP,8,3                 ; @IT_POWERUP
	.comm	_IT_HEALTH,8,3                  ; @IT_HEALTH
	.comm	_IT_ARMOR,8,3                   ; @IT_ARMOR
	.comm	_IT_HOLDABLE,8,3                ; @IT_HOLDABLE
.subsections_via_symbols
