	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ctr_free_pages                 ## -- Begin function ctr_free_pages
	.p2align	4, 0x90
_ctr_free_pages:                        ## @ctr_free_pages
	.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
	testl	%edi, %edi
	je	LBB0_10
## %bb.1:
	movl	%edi, %ebx
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_ctr_get_linear_free
	movl	%eax, %r14d
	xorl	%eax, %eax
	callq	_ctr_get_linear_unused
	sarl	$12, %eax
	leal	256(%rbx), %ecx
	cmpl	%ecx, %eax
	jle	LBB0_2
## %bb.11:
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ctr_linear_free_pages          ## TAILCALL
LBB0_2:
	sarl	$12, %r14d
	xorl	%eax, %eax
	callq	_ctr_get_stack_free
	movq	___stacksize__@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	movl	%ecx, %edx
	subl	%eax, %edx
	sarl	$12, %edx
	cmpl	%eax, %ecx
	movq	___stack_size_extra@GOTPCREL(%rip), %r13
	cmovlel	%r15d, %edx
	movl	(%r13), %ecx
	cmpl	%ecx, %eax
	cmovll	%eax, %ecx
	sarl	$12, %ecx
	movl	%ecx, %r15d
	subl	%edx, %r15d
	leal	(%r15,%r14), %eax
	cmpl	%ebx, %eax
	jle	LBB0_4
## %bb.3:
	cmpl	%ebx, %r15d
	cmovgel	%ebx, %r15d
	subl	%r15d, %ebx
	movl	%ebx, %r14d
	testl	%r14d, %r14d
	je	LBB0_8
LBB0_7:
	movl	%r14d, %edi
	callq	_ctr_linear_free_pages
LBB0_8:
	testl	%r15d, %r15d
	je	LBB0_10
## %bb.9:
	movq	___stack_bottom@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	shll	$12, %r15d
	movq	_MEMOP_FREE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_MEMPERM_READ@GOTPCREL(%rip), %rax
	movq	_MEMPERM_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	orl	(%rax), %r9d
	leaq	-44(%rbp), %rdi
	xorl	%edx, %edx
	movl	%r15d, %ecx
	callq	_svcControlMemory
	addl	%r15d, (%rbx)
	subl	%r15d, (%r13)
	subl	%r15d, (%r12)
	jmp	LBB0_10
LBB0_4:
	addl	%r14d, %ecx
	cmpl	%ebx, %ecx
	jle	LBB0_10
## %bb.5:
	subl	%r14d, %ebx
	movl	%ebx, %r15d
	testl	%r14d, %r14d
	jne	LBB0_7
	jmp	LBB0_8
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	___stacksize__,4,2              ## @__stacksize__
	.comm	___stack_size_extra,4,2         ## @__stack_size_extra
	.comm	___stack_bottom,4,2             ## @__stack_bottom
	.comm	_MEMOP_FREE,4,2                 ## @MEMOP_FREE
	.comm	_MEMPERM_READ,4,2               ## @MEMPERM_READ
	.comm	_MEMPERM_WRITE,4,2              ## @MEMPERM_WRITE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ctr_free_pages                 ; -- Begin function ctr_free_pages
	.p2align	2
_ctr_free_pages:                        ; @ctr_free_pages
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	cbz	w0, LBB0_10
; %bb.1:
	mov	x19, x0
	bl	_ctr_get_linear_free
	mov	x20, x0
	bl	_ctr_get_linear_unused
	add	w8, w19, #256
	cmp	w8, w0, asr #12
	b.ge	LBB0_3
; %bb.2:
	mov	x0, x19
	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
	add	sp, sp, #80
	b	_ctr_linear_free_pages
LBB0_3:
	asr	w20, w20, #12
	bl	_ctr_get_stack_free
Lloh0:
	adrp	x21, ___stacksize__@GOTPAGE
Lloh1:
	ldr	x21, [x21, ___stacksize__@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh2:
	adrp	x22, ___stack_size_extra@GOTPAGE
Lloh3:
	ldr	x22, [x22, ___stack_size_extra@GOTPAGEOFF]
	ldr	w9, [x22]
	cmp	w0, w9
	csel	w9, w0, w9, lt
	subs	w10, w8, w0
	asr	w8, w9, #12
	asr	w9, w10, #12
	csel	w9, w9, wzr, gt
	sub	w9, w8, w9
	add	w10, w9, w20
	cmp	w10, w19
	b.le	LBB0_8
; %bb.4:
	cmp	w9, w19
	csel	w23, w9, w19, lt
	sub	w20, w19, w23
	cbz	w20, LBB0_6
LBB0_5:
	mov	x0, x20
	bl	_ctr_linear_free_pages
LBB0_6:
	cbz	w23, LBB0_10
; %bb.7:
Lloh4:
	adrp	x20, ___stack_bottom@GOTPAGE
Lloh5:
	ldr	x20, [x20, ___stack_bottom@GOTPAGEOFF]
	ldr	w1, [x20]
	lsl	w19, w23, #12
Lloh6:
	adrp	x8, _MEMOP_FREE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MEMOP_FREE@GOTPAGEOFF]
Lloh8:
	adrp	x9, _MEMPERM_READ@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MEMPERM_READ@GOTPAGEOFF]
Lloh10:
	ldr	w4, [x8]
Lloh11:
	ldr	w8, [x9]
Lloh12:
	adrp	x9, _MEMPERM_WRITE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MEMPERM_WRITE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w5, w9, w8
	add	x0, sp, #12
	mov	w2, #0
	mov	x3, x19
	bl	_svcControlMemory
	ldr	w8, [x20]
	add	w8, w8, w19
	str	w8, [x20]
	ldr	w8, [x22]
	sub	w8, w8, w19
	str	w8, [x22]
	ldr	w8, [x21]
	sub	w8, w8, w19
	str	w8, [x21]
	b	LBB0_10
LBB0_8:
	add	w8, w8, w20
	cmp	w8, w19
	b.le	LBB0_10
; %bb.9:
	sub	w23, w19, w20
	cbnz	w20, LBB0_5
	b	LBB0_6
LBB0_10:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	___stacksize__,4,2              ; @__stacksize__
	.comm	___stack_size_extra,4,2         ; @__stack_size_extra
	.comm	___stack_bottom,4,2             ; @__stack_bottom
	.comm	_MEMOP_FREE,4,2                 ; @MEMOP_FREE
	.comm	_MEMPERM_READ,4,2               ; @MEMPERM_READ
	.comm	_MEMPERM_WRITE,4,2              ; @MEMPERM_WRITE
.subsections_via_symbols
