	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CG_RegisterItemSounds
_CG_RegisterItemSounds:                 ## @CG_RegisterItemSounds
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_QPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	_bg_itemlist@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movslq	%r15d, %rax
	leaq	(%rax,%rax,2), %r15
	movq	(%rbx,%r15,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	_qfalse@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_trap_S_RegisterSound
LBB0_2:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rbx,%r15,8), %r15
	testq	%r15, %r15
	je	LBB0_14
## %bb.3:
	movb	(%r15), %al
	testb	%al, %al
	je	LBB0_14
## %bb.4:
	movabsq	$4294967296, %r13               ## imm = 0x100000000
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	movb	(%r15), %al
	testb	%al, %al
	je	LBB0_14
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	xorl	%edx, %edx
	xorl	%r12d, %r12d
	movq	%r15, %rbx
	testb	$-33, %al
	je	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	1(%rbx), %eax
	incq	%rbx
	addq	%r13, %r12
	incl	%edx
	testb	$-33, %al
	jne	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$5, %edx
	jl	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_MAX_QPATH@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jle	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	movq	%r15, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	sarq	$32, %r12
	movb	$0, (%r14,%r12)
	cmpb	$1, (%rbx)
	movq	%rbx, %r15
	sbbq	$-1, %r15
	leaq	(%r14,%r12), %rdi
	addq	$-3, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_qfalse@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_trap_S_RegisterSound
	jmp	LBB0_13
LBB0_10:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	16(%rax,%rcx,8), %esi
	leaq	L_.str(%rip), %rdi
	callq	_CG_Error
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_QPATH,4,2                  ## @MAX_QPATH
	.comm	_bg_itemlist,8,3                ## @bg_itemlist
	.comm	_qfalse,4,2                     ## @qfalse
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PrecacheItem: %s has bad precache string"

L_.str.1:                               ## @.str.1
	.asciz	"wav"

	.no_dead_strip	_CG_RegisterItemSounds
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CG_RegisterItemSounds
_CG_RegisterItemSounds:                 ; @CG_RegisterItemSounds
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x23, _MAX_QPATH@GOTPAGE
Lloh4:
	ldr	x23, [x23, _MAX_QPATH@GOTPAGEOFF]
	ldr	w8, [x23]
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x19, x9, x8
	mov	sp, x19
Lloh7:
	adrp	x8, _bg_itemlist@GOTPAGE
Lloh8:
	ldr	x8, [x8, _bg_itemlist@GOTPAGEOFF]
Lloh9:
	ldr	x24, [x8]
	sxtw	x25, w0
	mov	w8, #24
	smull	x8, w0, w8
	ldr	x0, [x24, x8]
Lloh10:
	adrp	x26, _qfalse@GOTPAGE
Lloh11:
	ldr	x26, [x26, _qfalse@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w1, [x26]
	bl	_trap_S_RegisterSound
LBB0_2:
	mov	w8, #24
	madd	x8, x25, x8, x24
	ldr	x21, [x8, #8]
	cbz	x21, LBB0_14
; %bb.3:
	ldrb	w8, [x21]
	cbz	w8, LBB0_14
; %bb.4:
Lloh12:
	adrp	x20, l_.str.1@PAGE
Lloh13:
	add	x20, x20, l_.str.1@PAGEOFF
	mov	x27, #4294967296
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x21, x28, x22
	ldrb	w8, [x28, x22]
	cbz	w8, LBB0_14
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	mov	x28, #0
	mov	x22, #0
LBB0_7:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	orr	w8, w8, #0x20
	cmp	w8, #32
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	add	x8, x21, x22
	ldrb	w8, [x8, #1]
	add	x22, x22, #1
	add	x28, x28, x27
	b	LBB0_7
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	cmp	w22, #5
	b.lt	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x23]
	cmp	w8, w22
	b.le	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_memcpy
	add	x0, x19, x28, asr #32
	strb	wzr, [x0], #-3
	ldrb	w8, [x21, x22]
	cmp	w8, #0
	cinc	x28, x21, ne
	mov	x1, x20
	bl	_strcmp
	cbnz	w0, LBB0_5
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x26]
	mov	x0, x19
	bl	_trap_S_RegisterSound
	b	LBB0_5
LBB0_13:
	mov	w8, #24
	mul	x8, x25, x8
	add	x8, x24, x8
	ldr	w1, [x8, #16]
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_CG_Error
LBB0_14:
	ldur	x8, [x29, #-88]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_QPATH,4,2                  ; @MAX_QPATH
	.comm	_bg_itemlist,8,3                ; @bg_itemlist
	.comm	_qfalse,4,2                     ; @qfalse
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PrecacheItem: %s has bad precache string"

l_.str.1:                               ; @.str.1
	.asciz	"wav"

	.no_dead_strip	_CG_RegisterItemSounds
.subsections_via_symbols
