	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vcos_generic_blockpool_create_on_heap ## -- Begin function vcos_generic_blockpool_create_on_heap
	.p2align	4, 0x90
_vcos_generic_blockpool_create_on_heap: ## @vcos_generic_blockpool_create_on_heap
	.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	%r9, %rbx
                                        ## kill: def $r8d killed $r8d def $r8
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %edi
	movl	%edx, %esi
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %edx
	callq	_VCOS_BLOCKPOOL_SIZE
	movq	%rax, %r12
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_vcos_malloc
	movq	%rax, %r13
	movq	_VCOS_FUNCTION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	movq	%rbx, %r8
	callq	_vcos_log_trace
	testq	%r13, %r13
	je	LBB0_1
## %bb.2:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	movl	%r14d, %edx
	movq	%r13, %rcx
	movq	%r12, %r8
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	pushq	%rbx
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	callq	_vcos_generic_blockpool_init
	addq	$16, %rsp
	movq	%rax, %rbx
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_4
## %bb.3:
	movq	_VCOS_BLOCKPOOL_SUBPOOL_FLAG_OWNS_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	orl	%eax, (%rcx)
	jmp	LBB0_5
LBB0_1:
	movq	_VCOS_ENOMEM@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_5
LBB0_4:
	movq	%r13, %rdi
	callq	_vcos_free
LBB0_5:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VCOS_SUCCESS,8,3               ## @VCOS_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: num_blocks %d block_size %d name %s"

	.comm	_VCOS_FUNCTION,4,2              ## @VCOS_FUNCTION
	.comm	_VCOS_ENOMEM,8,3                ## @VCOS_ENOMEM
	.comm	_VCOS_BLOCKPOOL_SUBPOOL_FLAG_OWNS_MEM,4,2 ## @VCOS_BLOCKPOOL_SUBPOOL_FLAG_OWNS_MEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vcos_generic_blockpool_create_on_heap ; -- Begin function vcos_generic_blockpool_create_on_heap
	.p2align	2
_vcos_generic_blockpool_create_on_heap: ; @vcos_generic_blockpool_create_on_heap
	.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	x20, x5
	mov	x21, x4
	mov	x22, x3
	mov	x24, x2
	mov	x25, x1
	mov	x19, x0
	mov	x0, x1
	mov	x1, x2
	mov	x2, x3
	bl	_VCOS_BLOCKPOOL_SIZE
	mov	x26, x0
	mov	x1, x20
	bl	_vcos_malloc
	mov	x23, x0
Lloh0:
	adrp	x8, _VCOS_FUNCTION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VCOS_FUNCTION@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x25
	mov	x3, x24
	mov	x4, x20
	bl	_vcos_log_trace
	cbz	x23, LBB0_3
; %bb.1:
	mov	x0, x19
	mov	x1, x25
	mov	x2, x24
	mov	x3, x23
	mov	x4, x26
	mov	x5, x22
	mov	x6, x21
	mov	x7, x20
	bl	_vcos_generic_blockpool_init
	mov	x20, x0
Lloh5:
	adrp	x8, _VCOS_SUCCESS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VCOS_SUCCESS@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.2:
Lloh8:
	adrp	x8, _VCOS_BLOCKPOOL_SUBPOOL_FLAG_OWNS_MEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VCOS_BLOCKPOOL_SUBPOOL_FLAG_OWNS_MEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	x9, [x19]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
	b	LBB0_5
LBB0_3:
Lloh11:
	adrp	x8, _VCOS_ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VCOS_ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	x20, [x8]
	b	LBB0_5
LBB0_4:
	mov	x0, x23
	bl	_vcos_free
LBB0_5:
	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
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_VCOS_SUCCESS,8,3               ; @VCOS_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: num_blocks %d block_size %d name %s"

	.comm	_VCOS_FUNCTION,4,2              ; @VCOS_FUNCTION
	.comm	_VCOS_ENOMEM,8,3                ; @VCOS_ENOMEM
	.comm	_VCOS_BLOCKPOOL_SUBPOOL_FLAG_OWNS_MEM,4,2 ; @VCOS_BLOCKPOOL_SUBPOOL_FLAG_OWNS_MEM
.subsections_via_symbols
