	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vcos_generic_blockpool_elem_from_handle ## -- Begin function vcos_generic_blockpool_elem_from_handle
	.p2align	4, 0x90
_vcos_generic_blockpool_elem_from_handle: ## @vcos_generic_blockpool_elem_from_handle
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	callq	_ASSERT_POOL
	leaq	16(%r13), %r15
	movq	%r15, %rdi
	callq	_vcos_mutex_lock
	movq	%r14, %rdi
	callq	_VCOS_BLOCKPOOL_HANDLE_GET_SUBPOOL
	cmpq	(%r13), %rax
	jae	LBB0_8
## %bb.1:
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_VCOS_BLOCKPOOL_HANDLE_GET_INDEX
	movq	24(%r13), %rcx
	shlq	$5, %rbx
	movq	(%rcx,%rbx), %rdx
	movq	_VCOS_BLOCKPOOL_SUBPOOL_MAGIC@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_8
## %bb.2:
	cmpq	$0, 24(%rcx,%rbx)
	je	LBB0_8
## %bb.3:
	cmpq	8(%rcx,%rbx), %rax
	jae	LBB0_8
## %bb.4:
	leaq	(%rcx,%rbx), %rdx
	imulq	8(%r13), %rax
	movq	16(%rcx,%rbx), %rcx
	xorl	%r12d, %r12d
	cmpq	%rdx, (%rax,%rcx)
	leaq	8(%rax,%rcx), %rax
	cmoveq	%rax, %r12
	jmp	LBB0_9
LBB0_8:
	xorl	%r12d, %r12d
LBB0_9:
	movq	%r15, %rdi
	callq	_vcos_mutex_unlock
	movq	_VCOS_FUNCTION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rdx
	movq	%r14, %rcx
	movq	%r12, %r8
	callq	_vcos_log_trace
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VCOS_BLOCKPOOL_SUBPOOL_MAGIC,8,3 ## @VCOS_BLOCKPOOL_SUBPOOL_MAGIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: pool %p handle 0x%08x elem %p"

	.comm	_VCOS_FUNCTION,4,2              ## @VCOS_FUNCTION
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vcos_generic_blockpool_elem_from_handle ; -- Begin function vcos_generic_blockpool_elem_from_handle
	.p2align	2
_vcos_generic_blockpool_elem_from_handle: ; @vcos_generic_blockpool_elem_from_handle
	.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
	mov	x19, x1
	mov	x20, x0
	bl	_ASSERT_POOL
	add	x21, x20, #16
	mov	x0, x21
	bl	_vcos_mutex_lock
	mov	x0, x19
	bl	_VCOS_BLOCKPOOL_HANDLE_GET_SUBPOOL
	ldr	x8, [x20]
	cmp	x0, x8
	b.hs	LBB0_5
; %bb.1:
	mov	x22, x0
	mov	x0, x19
	bl	_VCOS_BLOCKPOOL_HANDLE_GET_INDEX
	ldr	x9, [x20, #24]
	add	x8, x9, x22, lsl #5
	ldr	x10, [x8]
Lloh0:
	adrp	x11, _VCOS_BLOCKPOOL_SUBPOOL_MAGIC@GOTPAGE
Lloh1:
	ldr	x11, [x11, _VCOS_BLOCKPOOL_SUBPOOL_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_5
; %bb.2:
	ldr	x10, [x8, #24]
	cbz	x10, LBB0_5
; %bb.3:
	add	x9, x9, x22, lsl #5
	ldr	x10, [x9, #8]
	cmp	x0, x10
	b.hs	LBB0_5
; %bb.4:
	ldr	x9, [x9, #16]
	ldr	x10, [x20, #8]
	madd	x9, x10, x0, x9
	ldr	x10, [x9], #8
	cmp	x10, x8
	csel	x22, x9, xzr, eq
	b	LBB0_6
LBB0_5:
	mov	x22, #0
LBB0_6:
	mov	x0, x21
	bl	_vcos_mutex_unlock
Lloh3:
	adrp	x8, _VCOS_FUNCTION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VCOS_FUNCTION@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x19
	mov	x4, x22
	bl	_vcos_log_trace
	mov	x0, x22
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_VCOS_BLOCKPOOL_SUBPOOL_MAGIC,8,3 ; @VCOS_BLOCKPOOL_SUBPOOL_MAGIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: pool %p handle 0x%08x elem %p"

	.comm	_VCOS_FUNCTION,4,2              ; @VCOS_FUNCTION
.subsections_via_symbols
