	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmballoon_reserve_page
_vmballoon_reserve_page:                ## @vmballoon_reserve_page
	.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
	movl	%esi, %r14d
	movq	%rdi, %r12
	xorl	%eax, %eax
	testl	%esi, %esi
	sete	%al
	leaq	16(%rdi), %r15
	leaq	44(,%rax,4), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%r13), %edi
	callq	_STATS_INC
	movq	_VMW_PAGE_ALLOC_CANSLEEP@GOTPCREL(%rip), %rax
	testl	%r14d, %r14d
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_VMW_PAGE_ALLOC_NOSLEEP@GOTPCREL(%rip), %rax
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rax), %edi
	callq	_alloc_page
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_page_to_pfn
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_vmballoon_send_lock_page
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	32(%r12), %edi
	callq	_STATS_INC
	cmpq	$0, 24(%r12)
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_list_add
	movq	(%r12), %rax
	incq	%rax
	movq	%rax, (%r12)
	movq	_VMW_BALLOON_MAX_REFUSED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_1
	jmp	LBB0_9
LBB0_4:
	xorl	%eax, %eax
	testl	%r14d, %r14d
	sete	%al
	movl	36(%r12,%rax,4), %edi
	callq	_STATS_INC
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_11:
	leaq	12(%r12), %rsi
	movq	%rbx, %rdi
	callq	_list_add
	incl	8(%r12)
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_7:
	movq	%rbx, %rdi
	callq	___free_page
LBB0_9:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_10:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VMW_PAGE_ALLOC_CANSLEEP,4,2    ## @VMW_PAGE_ALLOC_CANSLEEP
	.comm	_VMW_PAGE_ALLOC_NOSLEEP,4,2     ## @VMW_PAGE_ALLOC_NOSLEEP
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EIO,4,2                        ## @EIO
	.comm	_VMW_BALLOON_MAX_REFUSED,8,3    ## @VMW_BALLOON_MAX_REFUSED
	.no_dead_strip	_vmballoon_reserve_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmballoon_reserve_page
_vmballoon_reserve_page:                ; @vmballoon_reserve_page
	.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, x1
	mov	x19, x0
	add	x21, x0, #16
	cmp	w1, #0
	mov	w8, #44
	mov	w9, #48
	csel	x23, x9, x8, eq
Lloh0:
	adrp	x24, _VMW_PAGE_ALLOC_CANSLEEP@GOTPAGE
Lloh1:
	ldr	x24, [x24, _VMW_PAGE_ALLOC_CANSLEEP@GOTPAGEOFF]
Lloh2:
	adrp	x25, _VMW_PAGE_ALLOC_NOSLEEP@GOTPAGE
Lloh3:
	ldr	x25, [x25, _VMW_PAGE_ALLOC_NOSLEEP@GOTPAGEOFF]
Lloh4:
	adrp	x26, _VMW_BALLOON_MAX_REFUSED@GOTPAGE
Lloh5:
	ldr	x26, [x26, _VMW_BALLOON_MAX_REFUSED@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, x23]
	bl	_STATS_INC
	cmp	w20, #0
	csel	x8, x25, x24, eq
	ldr	w0, [x8]
	bl	_alloc_page
	cbz	x0, LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x22, x0
	bl	_page_to_pfn
	mov	x1, x0
	mov	x0, x19
	bl	_vmballoon_send_lock_page
	cbnz	w0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x19, #32]
	bl	_STATS_INC
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x22
	mov	x1, x21
	bl	_list_add
	ldr	x8, [x19]
	add	x8, x8, #1
	str	x8, [x19]
	ldr	x9, [x26]
	cmp	x8, x9
	b.lt	LBB0_1
	b	LBB0_8
LBB0_5:
	cmp	w20, #0
	mov	w8, #36
	mov	w9, #40
	csel	x8, x9, x8, eq
	ldr	w0, [x19, x8]
	bl	_STATS_INC
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
	add	x1, x19, #12
	mov	x0, x22
	bl	_list_add
	mov	w0, #0
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
	b	LBB0_10
LBB0_7:
	mov	x0, x22
	bl	___free_page
LBB0_8:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_VMW_PAGE_ALLOC_CANSLEEP,4,2    ; @VMW_PAGE_ALLOC_CANSLEEP
	.comm	_VMW_PAGE_ALLOC_NOSLEEP,4,2     ; @VMW_PAGE_ALLOC_NOSLEEP
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EIO,4,2                        ; @EIO
	.comm	_VMW_BALLOON_MAX_REFUSED,8,3    ; @VMW_BALLOON_MAX_REFUSED
	.no_dead_strip	_vmballoon_reserve_page
.subsections_via_symbols
