	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wavefront_find_free_sample
_wavefront_find_free_sample:            ## @wavefront_find_free_sample
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_WF_MAX_SAMPLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_4
## %bb.1:
	movq	(%rdi), %rdx
	movq	_WF_SLOT_FILLED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	testl	%esi, (%rdx,%rax,4)
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rax
	cmpq	%rax, %rcx
	jne	LBB0_2
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_snd_printk
	movl	$-1, %eax
LBB0_5:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WF_MAX_SAMPLE,4,2              ## @WF_MAX_SAMPLE
	.comm	_WF_SLOT_FILLED,4,2             ## @WF_SLOT_FILLED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no free sample slots!\n"

	.no_dead_strip	_wavefront_find_free_sample
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wavefront_find_free_sample
_wavefront_find_free_sample:            ; @wavefront_find_free_sample
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x9, _WF_MAX_SAMPLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WF_MAX_SAMPLE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w9, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x8, x0
	mov	x0, #0
	ldr	x8, [x8]
Lloh3:
	adrp	x10, _WF_SLOT_FILLED@GOTPAGE
Lloh4:
	ldr	x10, [x10, _WF_SLOT_FILLED@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x8, x0, lsl #2]
	tst	w10, w11
	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:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_snd_printk
	mov	w0, #-1
LBB0_5:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_WF_MAX_SAMPLE,4,2              ; @WF_MAX_SAMPLE
	.comm	_WF_SLOT_FILLED,4,2             ; @WF_SLOT_FILLED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no free sample slots!\n"

	.no_dead_strip	_wavefront_find_free_sample
.subsections_via_symbols
