	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_CustomSound                 ## -- Begin function CG_CustomSound
	.p2align	4, 0x90
_CG_CustomSound:                        ## @CG_CustomSound
	.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
	movq	%rsi, %rbx
	cmpb	$42, (%rsi)
	jne	LBB0_9
## %bb.1:
	movq	_MAX_CLIENTS@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	%edi, (%rax)
	movl	%edi, %r15d
	cmovleq	%rcx, %r15
	testl	%edi, %edi
	cmovsq	%rcx, %r15
	movq	_MAX_CUSTOM_SOUNDS@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_7
## %bb.2:
	movq	_cgs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	_cg_customSoundNames@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movq	(%rax,%r13,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%r13
	movslq	(%r12), %rax
	cmpq	%rax, %r13
	jl	LBB0_3
LBB0_7:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_CG_Error
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_9:
	movq	_qfalse@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_trap_S_RegisterSound           ## TAILCALL
LBB0_5:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r15,8), %rax
	movl	(%rax,%r13,4), %eax
LBB0_8:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_qfalse,4,2                     ## @qfalse
	.comm	_MAX_CLIENTS,4,2                ## @MAX_CLIENTS
	.comm	_cgs,8,3                        ## @cgs
	.comm	_MAX_CUSTOM_SOUNDS,4,2          ## @MAX_CUSTOM_SOUNDS
	.comm	_cg_customSoundNames,8,3        ## @cg_customSoundNames
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown custom sound: %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_CustomSound                 ; -- Begin function CG_CustomSound
	.p2align	2
_CG_CustomSound:                        ; @CG_CustomSound
	.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, x1
	ldrb	w8, [x1]
	cmp	w8, #42
	b.ne	LBB0_7
; %bb.1:
Lloh0:
	adrp	x8, _MAX_CLIENTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_CLIENTS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	mov	w8, #-1
	ccmp	w0, w8, #4, gt
	mov	w8, w0
	csel	x20, x8, xzr, gt
Lloh3:
	adrp	x21, _MAX_CUSTOM_SOUNDS@GOTPAGE
Lloh4:
	ldr	x21, [x21, _MAX_CUSTOM_SOUNDS@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x22, #0
Lloh5:
	adrp	x8, _cgs@GOTPAGE
Lloh6:
	ldr	x8, [x8, _cgs@GOTPAGEOFF]
Lloh7:
	ldr	x23, [x8]
Lloh8:
	adrp	x24, _cg_customSoundNames@GOTPAGE
Lloh9:
	ldr	x24, [x24, _cg_customSoundNames@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	x1, [x8, x22, lsl #3]
	cbz	x1, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_strcmp
	cbz	w0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x21]
	cmp	x22, x8
	b.lt	LBB0_3
LBB0_6:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_CG_Error
	mov	w0, #0
	b	LBB0_9
LBB0_7:
Lloh12:
	adrp	x8, _qfalse@GOTPAGE
Lloh13:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	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
	b	_trap_S_RegisterSound
LBB0_8:
	ldr	x8, [x23, x20, lsl #3]
	ldr	w0, [x8, x22, lsl #2]
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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_qfalse,4,2                     ; @qfalse
	.comm	_MAX_CLIENTS,4,2                ; @MAX_CLIENTS
	.comm	_cgs,8,3                        ; @cgs
	.comm	_MAX_CUSTOM_SOUNDS,4,2          ; @MAX_CUSTOM_SOUNDS
	.comm	_cg_customSoundNames,8,3        ; @cg_customSoundNames
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown custom sound: %s"

.subsections_via_symbols
