	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_AddBufferedSound            ## -- Begin function CG_AddBufferedSound
	.p2align	4, 0x90
_CG_AddBufferedSound:                   ## @CG_AddBufferedSound
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movq	_cg@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	movq	16(%rcx), %rdx
	movq	%rdi, (%rdx,%rax,8)
	movq	(%rcx), %rax
	incq	%rax
	movq	_MAX_SOUNDBUFFER@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rsi
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_2
## %bb.3:
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_4
LBB0_2:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $edx killed $edx def $rdx
LBB0_4:
	movq	%rdx, (%rcx)
	movslq	8(%rcx), %rax
	cmpq	%rax, %rdx
	jne	LBB0_6
## %bb.5:
	incl	%eax
	movl	%eax, 8(%rcx)
LBB0_6:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cg,24,3                        ## @cg
	.comm	_MAX_SOUNDBUFFER,4,2            ## @MAX_SOUNDBUFFER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_AddBufferedSound            ; -- Begin function CG_AddBufferedSound
	.p2align	2
_CG_AddBufferedSound:                   ; @CG_AddBufferedSound
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _cg@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cg@GOTPAGEOFF]
	ldr	x9, [x8, #16]
	ldr	x10, [x8]
	str	x0, [x9, x10, lsl #3]
	ldr	x9, [x8]
	add	x9, x9, #1
Lloh2:
	adrp	x10, _MAX_SOUNDBUFFER@GOTPAGE
Lloh3:
	ldr	x10, [x10, _MAX_SOUNDBUFFER@GOTPAGEOFF]
Lloh4:
	ldrsw	x10, [x10]
	udiv	x11, x9, x10
	msub	x10, x11, x10, x9
	str	x10, [x8]
	ldrsw	x9, [x8, #8]
	cmp	x10, x9
	b.ne	LBB0_3
; %bb.2:
	add	w9, w9, #1
	str	w9, [x8, #8]
LBB0_3:
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_cg,24,3                        ; @cg
	.comm	_MAX_SOUNDBUFFER,4,2            ; @MAX_SOUNDBUFFER
.subsections_via_symbols
