	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function libnx_audren_audio_get_free_wavebuf_idx
_libnx_audren_audio_get_free_wavebuf_idx: ## @libnx_audren_audio_get_free_wavebuf_idx
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_BUFFER_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$-1, %eax
	testq	%r8, %r8
	je	LBB0_6
## %bb.1:
	movq	(%rdi), %r9
	movq	_AudioDriverWaveBufState_Free@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movq	_AudioDriverWaveBufState_Done@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r9,%rdi,8), %rdx
	cmpq	%rsi, %rdx
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rcx, %rdx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rdi
	cmpq	%rdi, %r8
	jne	LBB0_2
LBB0_6:
	popq	%rbp
	retq
LBB0_5:
	movl	%edi, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BUFFER_COUNT,4,2               ## @BUFFER_COUNT
	.comm	_AudioDriverWaveBufState_Free,8,3 ## @AudioDriverWaveBufState_Free
	.comm	_AudioDriverWaveBufState_Done,8,3 ## @AudioDriverWaveBufState_Done
	.no_dead_strip	_libnx_audren_audio_get_free_wavebuf_idx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function libnx_audren_audio_get_free_wavebuf_idx
_libnx_audren_audio_get_free_wavebuf_idx: ; @libnx_audren_audio_get_free_wavebuf_idx
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x9, _BUFFER_COUNT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BUFFER_COUNT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cbz	w9, LBB0_4
; %bb.1:
	mov	x8, x0
	mov	x0, #0
	ldr	x8, [x8]
Lloh3:
	adrp	x10, _AudioDriverWaveBufState_Free@GOTPAGE
Lloh4:
	ldr	x10, [x10, _AudioDriverWaveBufState_Free@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
Lloh6:
	adrp	x11, _AudioDriverWaveBufState_Done@GOTPAGE
Lloh7:
	ldr	x11, [x11, _AudioDriverWaveBufState_Done@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x8, x0, lsl #3]
	cmp	x12, x10
	ccmp	x12, x11, #4, ne
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x0, x0, #1
	cmp	x9, x0
	b.ne	LBB0_2
LBB0_4:
	mov	w0, #-1
LBB0_5:
                                        ; kill: def $w0 killed $w0 killed $x0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_BUFFER_COUNT,4,2               ; @BUFFER_COUNT
	.comm	_AudioDriverWaveBufState_Free,8,3 ; @AudioDriverWaveBufState_Free
	.comm	_AudioDriverWaveBufState_Done,8,3 ; @AudioDriverWaveBufState_Done
	.no_dead_strip	_libnx_audren_audio_get_free_wavebuf_idx
.subsections_via_symbols
