	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_waiter
_get_waiter:                            ## @get_waiter
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	addq	$16, %rdi
	callq	_vcos_semaphore_wait
	movq	%r15, %rdi
	callq	_vcos_mutex_lock
	movq	_MAX_WAITERS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movq	8(%r15), %rcx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rcx,%rbx,8)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	cmpq	%rbx, %rax
	jne	LBB0_3
## %bb.5:
	movl	%eax, %ebx
	jmp	LBB0_6
LBB0_1:
	xorl	%ebx, %ebx
LBB0_6:
	xorl	%edi, %edi
	cmpl	%eax, %ebx
	setne	%dil
	callq	_vcos_verify
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	8(%r15), %rax
	movl	%ebx, %ecx
	leaq	(%rax,%rcx,8), %r14
	movq	$1, (%rax,%rcx,8)
	jmp	LBB0_9
LBB0_7:
	xorl	%r14d, %r14d
LBB0_9:
	movq	%r15, %rdi
	callq	_vcos_mutex_unlock
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_WAITERS,4,2                ## @MAX_WAITERS
	.no_dead_strip	_get_waiter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_waiter
_get_waiter:                            ; @get_waiter
	.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
	mov	x19, x0
	add	x0, x0, #16
	bl	_vcos_semaphore_wait
	mov	x0, x19
	bl	_vcos_mutex_lock
Lloh0:
	adrp	x8, _MAX_WAITERS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_WAITERS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x20, #0
	ldr	x9, [x19, #8]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9, x20, lsl #3]
	cbz	x10, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x20, x20, #1
	cmp	x8, x20
	b.ne	LBB0_2
; %bb.4:
	mov	x20, x8
	b	LBB0_6
LBB0_5:
	mov	w20, #0
LBB0_6:
	cmp	w20, w8
	cset	w0, ne
	bl	_vcos_verify
	cbz	x0, LBB0_8
; %bb.7:
	ldr	x8, [x19, #8]
	add	x20, x8, w20, uxtw #3
	mov	w8, #1
	str	x8, [x20]
	b	LBB0_9
LBB0_8:
	mov	x20, #0
LBB0_9:
	mov	x0, x19
	bl	_vcos_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_WAITERS,4,2                ; @MAX_WAITERS
	.no_dead_strip	_get_waiter
.subsections_via_symbols
