	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_S_FreeOldestSound              ## -- Begin function S_FreeOldestSound
	.p2align	4, 0x90
_S_FreeOldestSound:                     ## @S_FreeOldestSound
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_Com_Milliseconds
	movq	_s_numSfx@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	_s_knownSfx@GOTPCREL(%rip), %rdx
	movq	(%rdx), %r14
	cmpl	$2, %r8d
	jl	LBB0_12
## %bb.1:
	movl	%r8d, %edx
	decq	%r8
	cmpl	$2, %edx
	jne	LBB0_3
## %bb.2:
	xorl	%ebx, %ebx
	movl	$1, %edx
LBB0_9:
	testb	$1, %r8b
	je	LBB0_12
## %bb.10:
	movq	%rdx, %rcx
	shlq	$5, %rcx
	cmpq	$0, 16(%r14,%rcx)
	je	LBB0_12
## %bb.11:
	cmpl	%eax, (%r14,%rcx)
	cmovll	%edx, %ebx
LBB0_12:
	movslq	%ebx, %r12
	shlq	$5, %r12
	movl	24(%r14,%r12), %esi
	leaq	L_.str(%rip), %rdi
	callq	_Com_DPrintf
	leaq	(%r14,%r12), %r15
	addq	$8, %r15
	movq	8(%r14,%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdi), %rbx
	callq	_SND_free
	movq	%rbx, %rdi
	testq	%rbx, %rbx
	jne	LBB0_13
LBB0_14:
	movq	_qfalse@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%r14,%r12)
	movq	$0, (%r15)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	80(%r14), %rsi
	movq	%r8, %r9
	andq	$-2, %r9
	negq	%r9
	xorl	%ebx, %ebx
	movl	$1, %edx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	addq	$64, %rsi
	leaq	(%r9,%rdx), %rcx
	addq	$2, %rcx
	addq	$2, %rdx
	cmpq	$1, %rcx
	je	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, -32(%rsi)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-48(%rsi), %ecx
	cmpl	%eax, %ecx
	cmovll	%ecx, %eax
	cmovll	%edx, %ebx
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, (%rsi)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-16(%rsi), %ecx
	leal	1(%rdx), %edi
	cmpl	%eax, %ecx
	cmovll	%ecx, %eax
	cmovll	%edi, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_s_numSfx,4,2                   ## @s_numSfx
	.comm	_s_knownSfx,8,3                 ## @s_knownSfx
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"S_FreeOldestSound: freeing sound %s\n"

	.comm	_qfalse,8,3                     ## @qfalse
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_S_FreeOldestSound              ; -- Begin function S_FreeOldestSound
	.p2align	2
_S_FreeOldestSound:                     ; @S_FreeOldestSound
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_Com_Milliseconds
Lloh0:
	adrp	x8, _s_numSfx@GOTPAGE
Lloh1:
	ldr	x8, [x8, _s_numSfx@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
Lloh3:
	adrp	x8, _s_knownSfx@GOTPAGE
Lloh4:
	ldr	x8, [x8, _s_knownSfx@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	w9, #2
	b.lt	LBB0_5
; %bb.1:
	mov	w10, #0
	add	x11, x8, #48
	mov	w12, #1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x12, x12, #1
	add	x11, x11, #32
	cmp	x9, x12
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x11]
	cbz	x13, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldur	w13, [x11, #-16]
	cmp	w13, w0
	csel	w0, w13, w0, lt
	csel	w10, w12, w10, lt
	b	LBB0_2
LBB0_5:
	mov	w10, #0
LBB0_6:
	sxtw	x9, w10
	add	x19, x8, x9, lsl #5
	ldr	w1, [x19, #24]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Com_DPrintf
	mov	x20, x19
	ldr	x0, [x20, #8]!
	cbz	x0, LBB0_8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x21, [x0]
	bl	_SND_free
	mov	x0, x21
	cbnz	x21, LBB0_7
LBB0_8:
Lloh8:
	adrp	x8, _qfalse@GOTPAGE
Lloh9:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	str	x8, [x19, #16]
	str	xzr, [x20]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_s_numSfx,4,2                   ; @s_numSfx
	.comm	_s_knownSfx,8,3                 ; @s_knownSfx
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"S_FreeOldestSound: freeing sound %s\n"

	.comm	_qfalse,8,3                     ; @qfalse
.subsections_via_symbols
