	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_memguard_free                  ## -- Begin function memguard_free
	.p2align	4, 0x90
_memguard_free:                         ## @memguard_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
	movq	%rdi, %r13
	callq	_trunc_page
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_v2sizep
	movl	(%rax), %r14d
	movl	%r12d, %edi
	callq	_v2sizev
	movl	(%rax), %r15d
	movl	%r14d, %edi
	callq	_round_page
	movl	%eax, %ebx
	testl	%eax, %eax
	jle	LBB0_3
## %bb.1:
	xorl	%eax, %eax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cltq
	movb	$77, (%r13,%rax)
	addl	(%rcx), %eax
	cmpl	%ebx, %eax
	jl	LBB0_2
LBB0_3:
	movq	_kernel_object@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_kmem_unback
	xorl	%eax, %eax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r13
	cmpl	%ebx, %r15d
	jle	LBB0_5
## %bb.4:
	movl	(%r13), %eax
LBB0_5:
	subl	%eax, %r12d
	movq	_memguard_arena@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r12d, %esi
	movl	%r15d, %edx
	callq	_vmem_xfree
	subl	(%r13), %r14d
	jge	LBB0_7
## %bb.6:
	movq	_memguard_wasted@GOTPCREL(%rip), %rax
	addl	%r14d, (%rax)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_kernel_object,4,2              ## @kernel_object
	.comm	_memguard_arena,4,2             ## @memguard_arena
	.comm	_memguard_wasted,4,2            ## @memguard_wasted
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_memguard_free                  ; -- Begin function memguard_free
	.p2align	2
_memguard_free:                         ; @memguard_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
	mov	x22, x0
	bl	_trunc_page
	mov	x20, x0
	bl	_v2sizep
	ldr	w19, [x0]
	mov	x0, x20
	bl	_v2sizev
	ldr	w21, [x0]
	mov	x0, x19
	bl	_round_page
	mov	x23, x0
Lloh0:
	adrp	x24, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _PAGE_SIZE@GOTPAGEOFF]
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.1:
	mov	w8, #0
	mov	w9, #77
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	strb	w9, [x22, w8, sxtw]
	ldr	w10, [x24]
	add	w8, w10, w8
	cmp	w8, w23
	b.lt	LBB0_2
LBB0_3:
Lloh2:
	adrp	x8, _kernel_object@GOTPAGE
Lloh3:
	ldr	x8, [x8, _kernel_object@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	x1, x20
	mov	x2, x23
	bl	_kmem_unback
	ldr	w8, [x24]
	cmp	w21, w23
	csel	w8, w8, wzr, gt
	sub	w1, w20, w8
Lloh5:
	adrp	x8, _memguard_arena@GOTPAGE
Lloh6:
	ldr	x8, [x8, _memguard_arena@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	x2, x21
	bl	_vmem_xfree
	ldr	w8, [x24]
	subs	w8, w19, w8
	b.ge	LBB0_5
; %bb.4:
Lloh8:
	adrp	x9, _memguard_wasted@GOTPAGE
Lloh9:
	ldr	x9, [x9, _memguard_wasted@GOTPAGEOFF]
	ldr	w10, [x9]
	add	w8, w8, w10
	str	w8, [x9]
LBB0_5:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_kernel_object,4,2              ; @kernel_object
	.comm	_memguard_arena,4,2             ; @memguard_arena
	.comm	_memguard_wasted,4,2            ; @memguard_wasted
.subsections_via_symbols
