	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mspace_free                    ## -- Begin function mspace_free
	.p2align	4, 0x90
_mspace_free:                           ## @mspace_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	%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
	testq	%rsi, %rsi
	je	LBB0_37
## %bb.1:
	movl	%edi, %ebx
	movq	%rsi, %rdi
	callq	_mem2chunk
	movq	%rax, %r14
	movslq	%ebx, %rbx
	movq	%rbx, %rdi
	callq	_ok_magic
	testl	%eax, %eax
	je	LBB0_38
## %bb.2:
	movq	%rbx, %rdi
	callq	_PREACTION
	testl	%eax, %eax
	je	LBB0_3
LBB0_37:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_38:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_USAGE_ERROR_ACTION             ## TAILCALL
LBB0_3:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_check_inuse_chunk
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ok_address
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	%r14, %rdi
	callq	_ok_cinuse
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	jmp	LBB0_6
LBB0_4:
	xorl	%edi, %edi
LBB0_6:
	callq	_RTCHECK
	testq	%rax, %rax
	je	LBB0_35
## %bb.7:
	movq	%r14, %rdi
	callq	_chunksize
	movq	%rax, %r15
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_chunk_plus_offset
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_pinuse
	testl	%eax, %eax
	je	LBB0_8
LBB0_14:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_ok_next
	testq	%rax, %rax
	je	LBB0_15
## %bb.18:
	movq	%r12, %rdi
	callq	_ok_pinuse
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	jmp	LBB0_19
LBB0_8:
	movq	(%r14), %r13
	movq	_IS_MMAPPED_BIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%r13, %rax
	je	LBB0_11
## %bb.9:
	notq	%rax
	andq	%rax, %r13
	movq	_MMAP_FOOT_PAD@GOTPCREL(%rip), %rax
	addq	%r13, %r15
	addq	(%rax), %r15
	subq	%r13, %r14
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_CALL_MUNMAP
	testq	%rax, %rax
	jne	LBB0_36
## %bb.10:
	subq	%r15, (%rbx)
	jmp	LBB0_36
LBB0_15:
	xorl	%edi, %edi
LBB0_19:
	callq	_RTCHECK
	testq	%rax, %rax
	je	LBB0_35
## %bb.20:
	movq	%r12, %rdi
	callq	_cinuse
	testl	%eax, %eax
	je	LBB0_21
## %bb.30:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_set_free_with_pinuse
LBB0_31:
	movq	%r15, %rdi
	callq	_is_small
	movq	%rbx, %rdi
	testq	%rax, %rax
	je	LBB0_33
## %bb.32:
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_insert_small_chunk
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_check_free_chunk
	jmp	LBB0_36
LBB0_21:
	cmpq	40(%rbx), %r12
	je	LBB0_22
## %bb.26:
	cmpq	32(%rbx), %r12
	je	LBB0_27
## %bb.28:
	movq	%r12, %rdi
	callq	_chunksize
	addq	%rax, %r15
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%rax, %rdx
	callq	_unlink_chunk
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_set_size_and_pinuse_of_free_chunk
	cmpq	32(%rbx), %r14
	jne	LBB0_31
## %bb.29:
	movq	%r15, 8(%rbx)
	jmp	LBB0_36
LBB0_11:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_chunk_minus_offset
	movq	%rax, %r14
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_ok_address
	movl	%eax, %edi
	callq	_RTCHECK
	testq	%rax, %rax
	je	LBB0_35
## %bb.12:
	addq	%r13, %r15
	cmpq	32(%rbx), %r14
	je	LBB0_16
## %bb.13:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_unlink_chunk
	jmp	LBB0_14
LBB0_35:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_USAGE_ERROR_ACTION
LBB0_36:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_POSTACTION                     ## TAILCALL
LBB0_33:
	movl	%r14d, %esi
	movq	%r15, %rdx
	callq	_insert_large_chunk
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_check_free_chunk
	decq	24(%rbx)
	jne	LBB0_36
## %bb.34:
	movq	%rbx, %rdi
	callq	_release_unused_segments
	jmp	LBB0_36
LBB0_22:
	addq	16(%rbx), %r15
	movq	%r15, 16(%rbx)
	movq	%r14, 40(%rbx)
	movq	_PINUSE_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%r15d, %eax
	movl	%eax, 8(%r14)
	cmpq	32(%rbx), %r14
	jne	LBB0_24
## %bb.23:
	movq	$0, 32(%rbx)
	movq	$0, 8(%rbx)
LBB0_24:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_should_trim
	testq	%rax, %rax
	je	LBB0_36
## %bb.25:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_sys_trim
	jmp	LBB0_36
LBB0_27:
	addq	8(%rbx), %r15
	movq	%r15, 8(%rbx)
	movq	%r14, 32(%rbx)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_set_size_and_pinuse_of_free_chunk
	jmp	LBB0_36
LBB0_16:
	movl	8(%r12), %eax
	movq	_INUSE_BITS@GOTPCREL(%rip), %rcx
	notl	%eax
	testl	%eax, (%rcx)
	jne	LBB0_14
## %bb.17:
	movq	%r15, 8(%rbx)
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_set_free_with_pinuse
	jmp	LBB0_36
	.cfi_endproc
                                        ## -- End function
	.comm	_IS_MMAPPED_BIT,8,3             ## @IS_MMAPPED_BIT
	.comm	_MMAP_FOOT_PAD,8,3              ## @MMAP_FOOT_PAD
	.comm	_INUSE_BITS,4,2                 ## @INUSE_BITS
	.comm	_PINUSE_BIT,8,3                 ## @PINUSE_BIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mspace_free                    ; -- Begin function mspace_free
	.p2align	2
_mspace_free:                           ; @mspace_free
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cbz	x1, LBB0_3
; %bb.1:
	mov	x19, x0
	mov	x0, x1
	bl	_mem2chunk
	mov	x20, x0
	sxtw	x19, w19
	mov	x0, x19
	bl	_ok_magic
	cbz	w0, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_PREACTION
	cbz	w0, LBB0_5
LBB0_3:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x0, x19
	mov	x1, 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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_USAGE_ERROR_ACTION
LBB0_5:
	mov	x0, x19
	mov	x1, x20
	bl	_check_inuse_chunk
	mov	x0, x19
	mov	x1, x20
	bl	_ok_address
	cbz	w0, LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_ok_cinuse
	cmp	x0, #0
	cset	w0, ne
LBB0_7:
	bl	_RTCHECK
	cbz	x0, LBB0_26
; %bb.8:
	mov	x0, x20
	bl	_chunksize
	mov	x21, x0
	mov	x0, x20
	mov	x1, x21
	bl	_chunk_plus_offset
	mov	x22, x0
	mov	x0, x20
	bl	_pinuse
	cbz	w0, LBB0_16
LBB0_9:
	mov	x0, x20
	mov	x1, x22
	bl	_ok_next
	cbz	x0, LBB0_11
; %bb.10:
	mov	x0, x22
	bl	_ok_pinuse
	cmp	x0, #0
	cset	w0, ne
LBB0_11:
	bl	_RTCHECK
	cbz	x0, LBB0_26
; %bb.12:
	mov	x0, x22
	bl	_cinuse
	cbz	w0, LBB0_19
; %bb.13:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_set_free_with_pinuse
LBB0_14:
	mov	x0, x21
	bl	_is_small
	cbz	x0, LBB0_28
; %bb.15:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_insert_small_chunk
	mov	x0, x19
	mov	x1, x20
	bl	_check_free_chunk
	b	LBB0_27
LBB0_16:
	ldr	x23, [x20]
Lloh0:
	adrp	x8, _IS_MMAPPED_BIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IS_MMAPPED_BIT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	tst	x8, x23
	b.eq	LBB0_23
; %bb.17:
	bic	x8, x23, x8
Lloh3:
	adrp	x9, _MMAP_FOOT_PAD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MMAP_FOOT_PAD@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x10, x8, x21
	add	x21, x10, x9
	sub	x0, x20, x8
	mov	x1, x21
	bl	_CALL_MUNMAP
	cbnz	x0, LBB0_27
; %bb.18:
	ldr	x8, [x19]
	sub	x8, x8, x21
	str	x8, [x19]
	b	LBB0_27
LBB0_19:
	ldr	x8, [x19, #40]
	cmp	x22, x8
	b.eq	LBB0_30
; %bb.20:
	ldr	x8, [x19, #32]
	cmp	x22, x8
	b.eq	LBB0_34
; %bb.21:
	mov	x0, x22
	bl	_chunksize
	mov	x2, x0
	add	x21, x0, x21
	mov	x0, x19
	mov	x1, x22
	bl	_unlink_chunk
	mov	x0, x20
	mov	x1, x21
	bl	_set_size_and_pinuse_of_free_chunk
	ldr	x8, [x19, #32]
	cmp	x20, x8
	b.ne	LBB0_14
; %bb.22:
	str	x21, [x19, #8]
	b	LBB0_27
LBB0_23:
	mov	x0, x20
	mov	x1, x23
	bl	_chunk_minus_offset
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_ok_address
	bl	_RTCHECK
	cbz	x0, LBB0_26
; %bb.24:
	add	x21, x23, x21
	ldr	x8, [x19, #32]
	cmp	x20, x8
	b.eq	LBB0_35
; %bb.25:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x23
	bl	_unlink_chunk
	b	LBB0_9
LBB0_26:
	mov	x0, x19
	mov	x1, x20
	bl	_USAGE_ERROR_ACTION
LBB0_27:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_POSTACTION
LBB0_28:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_insert_large_chunk
	mov	x0, x19
	mov	x1, x20
	bl	_check_free_chunk
	ldr	x8, [x19, #24]
	subs	x8, x8, #1
	str	x8, [x19, #24]
	b.ne	LBB0_27
; %bb.29:
	mov	x0, x19
	bl	_release_unused_segments
	b	LBB0_27
LBB0_30:
	ldr	x8, [x19, #16]
Lloh6:
	adrp	x9, _PINUSE_BIT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PINUSE_BIT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	add	x1, x8, x21
	orr	w8, w9, w1
	str	x1, [x19, #16]
	str	x20, [x19, #40]
	str	w8, [x20, #8]
	ldr	x8, [x19, #32]
	cmp	x20, x8
	b.ne	LBB0_32
; %bb.31:
	str	xzr, [x19, #32]
	str	xzr, [x19, #8]
LBB0_32:
	mov	x0, x19
	bl	_should_trim
	cbz	x0, LBB0_27
; %bb.33:
	mov	x0, x19
	mov	w1, #0
	bl	_sys_trim
	b	LBB0_27
LBB0_34:
	ldr	x8, [x19, #8]
	add	x1, x8, x21
	str	x1, [x19, #8]
	str	x20, [x19, #32]
	mov	x0, x20
	bl	_set_size_and_pinuse_of_free_chunk
	b	LBB0_27
LBB0_35:
	ldr	w8, [x22, #8]
Lloh9:
	adrp	x9, _INUSE_BITS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _INUSE_BITS@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	bics	wzr, w9, w8
	b.ne	LBB0_9
; %bb.36:
	str	x21, [x19, #8]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_set_free_with_pinuse
	b	LBB0_27
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_IS_MMAPPED_BIT,8,3             ; @IS_MMAPPED_BIT
	.comm	_MMAP_FOOT_PAD,8,3              ; @MMAP_FOOT_PAD
	.comm	_INUSE_BITS,4,2                 ; @INUSE_BITS
	.comm	_PINUSE_BIT,8,3                 ; @PINUSE_BIT
.subsections_via_symbols
