	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CG_PlayBufferedSounds
_CG_PlayBufferedSounds:                 ## @CG_PlayBufferedSounds
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_cg@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	cmpq	8(%rbx), %rax
	jge	LBB0_7
## %bb.1:
	movq	16(%rbx), %rax
	cmpq	24(%rbx), %rax
	je	LBB0_7
## %bb.2:
	movq	32(%rbx), %rcx
	movq	(%rcx,%rax,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.3:
	movq	_CHAN_ANNOUNCER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_trap_S_StartLocalSound
	movq	16(%rbx), %rax
	movq	32(%rbx), %rcx
	movq	$0, (%rcx,%rax,8)
	movq	16(%rbx), %rax
	incq	%rax
	movq	_MAX_SOUNDBUFFER@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_4
## %bb.5:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_6
LBB0_4:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_6:
	movq	%rdx, 16(%rbx)
	movl	$750, %eax                      ## imm = 0x2EE
	addq	8(%rbx), %rax
	movq	%rax, (%rbx)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cg,40,3                        ## @cg
	.comm	_CHAN_ANNOUNCER,4,2             ## @CHAN_ANNOUNCER
	.comm	_MAX_SOUNDBUFFER,4,2            ## @MAX_SOUNDBUFFER
	.no_dead_strip	_CG_PlayBufferedSounds
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CG_PlayBufferedSounds
_CG_PlayBufferedSounds:                 ; @CG_PlayBufferedSounds
	.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
Lloh0:
	adrp	x19, _cg@GOTPAGE
Lloh1:
	ldr	x19, [x19, _cg@GOTPAGEOFF]
	ldp	x8, x9, [x19]
	cmp	x8, x9
	b.ge	LBB0_4
; %bb.1:
	ldp	x8, x9, [x19, #16]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.2:
	ldr	x9, [x19, #32]
	ldr	x0, [x9, x8, lsl #3]
	cbz	x0, LBB0_4
; %bb.3:
Lloh2:
	adrp	x8, _CHAN_ANNOUNCER@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CHAN_ANNOUNCER@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_trap_S_StartLocalSound
	ldr	x8, [x19, #32]
	ldr	x9, [x19, #16]
	str	xzr, [x8, x9, lsl #3]
	ldp	x9, x8, [x19, #8]
	add	x8, x8, #1
Lloh5:
	adrp	x10, _MAX_SOUNDBUFFER@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MAX_SOUNDBUFFER@GOTPAGEOFF]
Lloh7:
	ldrsw	x10, [x10]
	udiv	x11, x8, x10
	msub	x8, x11, x10, x8
	str	x8, [x19, #16]
	add	x8, x9, #750
	str	x8, [x19]
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_cg,40,3                        ; @cg
	.comm	_CHAN_ANNOUNCER,4,2             ; @CHAN_ANNOUNCER
	.comm	_MAX_SOUNDBUFFER,4,2            ; @MAX_SOUNDBUFFER
	.no_dead_strip	_CG_PlayBufferedSounds
.subsections_via_symbols
