	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vcos_generic_blockpool_is_valid_elem ## -- Begin function vcos_generic_blockpool_is_valid_elem
	.p2align	4, 0x90
_vcos_generic_blockpool_is_valid_elem:  ## @vcos_generic_blockpool_is_valid_elem
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r13
	callq	_ASSERT_POOL
	xorl	%eax, %eax
	testb	$3, %bl
	jne	LBB0_13
## %bb.1:
	leaq	12(%r13), %r12
	movq	%r12, %rdi
	callq	_vcos_mutex_lock
	cmpq	$0, (%r13)
	je	LBB0_2
## %bb.3:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	addq	$32, %r14
	cmpq	(%r13), %rbx
	jae	LBB0_11
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r13), %r15
	leaq	(%r15,%r14), %r12
	movq	%r12, %rdi
	callq	_ASSERT_SUBPOOL
	cmpq	$0, 24(%r15,%r14)
	je	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%r15,%r14), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	-48(%rbp), %rax                 ## 8-byte Folded Reload
	jae	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movslq	(%r15,%r14), %rcx
	movslq	8(%r13), %rdx
	imulq	%rcx, %rdx
	addq	%rdx, %rax
	cmpq	-48(%rbp), %rax                 ## 8-byte Folded Reload
	jbe	LBB0_10
## %bb.8:
	xorl	%ecx, %ecx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	-8(%rax), %r12
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jne	LBB0_12
## %bb.9:
	xorl	%ecx, %ecx
	cmpq	%r13, 8(%r15,%r14)
	sete	%cl
	jmp	LBB0_12
LBB0_11:
	xorl	%ecx, %ecx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_12
LBB0_2:
	xorl	%ecx, %ecx
LBB0_12:
	movq	%r12, %rdi
	movl	%ecx, %ebx
	callq	_vcos_mutex_unlock
	movl	%ebx, %eax
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vcos_generic_blockpool_is_valid_elem ; -- Begin function vcos_generic_blockpool_is_valid_elem
	.p2align	2
_vcos_generic_blockpool_is_valid_elem:  ; @vcos_generic_blockpool_is_valid_elem
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x1
	mov	x20, x0
	bl	_ASSERT_POOL
	tst	x21, #0x3
	b.eq	LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_11
LBB0_2:
	add	x19, x20, #12
	mov	x0, x19
	bl	_vcos_mutex_lock
	ldr	x8, [x20]
	cbz	x8, LBB0_9
; %bb.3:
	mov	x23, #0
	mov	x24, #0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x24, x24, #1
	ldr	x8, [x20]
	add	x23, x23, #32
	cmp	x24, x8
	b.hs	LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x25, [x20, #16]
	add	x22, x25, x23
	mov	x0, x22
	bl	_ASSERT_SUBPOOL
	ldr	x8, [x22, #24]
	cbz	x8, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x22, #16]
	cmp	x8, #0
	ccmp	x8, x21, #2, ne
	b.hs	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldrsw	x9, [x25, x23]
	ldrsw	x10, [x20, #8]
	madd	x8, x10, x9, x8
	cmp	x8, x21
	b.ls	LBB0_4
; %bb.8:
	ldur	x9, [x21, #-8]
	add	x8, x25, x23
	cmp	x8, x9
	b.eq	LBB0_12
LBB0_9:
	mov	w20, #0
LBB0_10:
	mov	x0, x19
	bl	_vcos_mutex_unlock
LBB0_11:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
	ldr	x8, [x8, #8]
	cmp	x8, x20
	cset	w20, eq
	b	LBB0_10
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
