	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vcos_generic_blockpool_free    ## -- Begin function vcos_generic_blockpool_free
	.p2align	4, 0x90
_vcos_generic_blockpool_free:           ## @vcos_generic_blockpool_free
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_VCOS_BLOCKPOOL_DEBUG_LOG
	testq	%r15, %r15
	je	LBB0_7
## %bb.1:
	leaq	-16(%r15), %r12
	movq	-8(%r15), %rbx
	movq	%rbx, %rdi
	callq	_ASSERT_SUBPOOL
	movq	40(%rbx), %r14
	movq	%r14, %rdi
	callq	_ASSERT_POOL
	movq	%r14, %rdi
	callq	_vcos_mutex_lock
	movl	8(%rbx), %eax
	xorl	%edi, %edi
	cmpl	(%rbx), %eax
	seta	%dil
	callq	_vcos_assert
	movq	32(%rbx), %rax
	movq	%rax, -16(%r15)
	movq	%r12, 32(%rbx)
	incq	(%rbx)
	movq	_VCOS_BLOCKPOOL_OVERWRITE_ON_FREE@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.2:
	movl	4(%r14), %edx
	movq	%r15, %rdi
	movl	$189, %esi
	callq	_memset
LBB0_3:
	movq	_VCOS_BLOCKPOOL_SUBPOOL_FLAG_EXTENSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 12(%rbx)
	je	LBB0_6
## %bb.4:
	movl	8(%rbx), %eax
	cmpq	%rax, (%rbx)
	jne	LBB0_6
## %bb.5:
	movq	_VCOS_FUNCTION@GOTPCREL(%rip), %rax
	movslq	(%rax), %rsi
	movq	24(%rbx), %rcx
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_VCOS_BLOCKPOOL_DEBUG_LOG
	movq	24(%rbx), %rdi
	callq	_vcos_free
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rbx)
LBB0_6:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vcos_mutex_unlock              ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"block %p"

	.comm	_VCOS_BLOCKPOOL_OVERWRITE_ON_FREE,8,3 ## @VCOS_BLOCKPOOL_OVERWRITE_ON_FREE
	.comm	_VCOS_BLOCKPOOL_SUBPOOL_FLAG_EXTENSION,4,2 ## @VCOS_BLOCKPOOL_SUBPOOL_FLAG_EXTENSION
L_.str.1:                               ## @.str.1
	.asciz	"%s: freeing subpool %p mem %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_free    ; -- Begin function vcos_generic_blockpool_free
	.p2align	2
_vcos_generic_blockpool_free:           ; @vcos_generic_blockpool_free
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_VCOS_BLOCKPOOL_DEBUG_LOG
	cbz	x21, LBB0_7
; %bb.1:
	ldur	x19, [x21, #-8]
	mov	x0, x19
	bl	_ASSERT_SUBPOOL
	ldr	x20, [x19, #40]
	mov	x0, x20
	bl	_ASSERT_POOL
	mov	x0, x20
	bl	_vcos_mutex_lock
	ldr	w8, [x19]
	ldr	w9, [x19, #8]
	cmp	w9, w8
	cset	w0, hi
	bl	_vcos_assert
	ldr	x8, [x19, #32]
	mov	x9, x21
	str	x8, [x9, #-16]!
	str	x9, [x19, #32]
	ldr	x8, [x19]
	add	x8, x8, #1
	str	x8, [x19]
Lloh2:
	adrp	x8, _VCOS_BLOCKPOOL_OVERWRITE_ON_FREE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VCOS_BLOCKPOOL_OVERWRITE_ON_FREE@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	w2, [x20, #4]
	mov	x0, x21
	mov	w1, #189
	bl	_memset
LBB0_3:
	ldr	w8, [x19, #12]
Lloh5:
	adrp	x9, _VCOS_BLOCKPOOL_SUBPOOL_FLAG_EXTENSION@GOTPAGE
Lloh6:
	ldr	x9, [x9, _VCOS_BLOCKPOOL_SUBPOOL_FLAG_EXTENSION@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.4:
	ldr	x8, [x19]
	ldr	w9, [x19, #8]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
Lloh8:
	adrp	x8, _VCOS_FUNCTION@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VCOS_FUNCTION@GOTPAGEOFF]
Lloh10:
	ldrsw	x1, [x8]
	ldr	x8, [x19, #24]
	stp	x19, x8, [sp]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_VCOS_BLOCKPOOL_DEBUG_LOG
	ldr	x0, [x19, #24]
	bl	_vcos_free
	stp	xzr, xzr, [x19, #16]
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_vcos_mutex_unlock
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"block %p"

	.comm	_VCOS_BLOCKPOOL_OVERWRITE_ON_FREE,8,3 ; @VCOS_BLOCKPOOL_OVERWRITE_ON_FREE
	.comm	_VCOS_BLOCKPOOL_SUBPOOL_FLAG_EXTENSION,4,2 ; @VCOS_BLOCKPOOL_SUBPOOL_FLAG_EXTENSION
l_.str.1:                               ; @.str.1
	.asciz	"%s: freeing subpool %p mem %p"

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