	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_balloon_pages
_alloc_balloon_pages:                   ## @alloc_balloon_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r14d, %r14d
	cmpl	%ecx, %esi
	jb	LBB0_12
## %bb.1:
	testl	%esi, %esi
	je	LBB0_12
## %bb.2:
	movl	%ecx, %r13d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	(%rdx), %rax
	addq	$4, %rax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	ja	LBB0_12
## %bb.3:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %r15
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movq	___GFP_NORETRY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_GFP_HIGHUSER@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	___GFP_NOMEMALLOC@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	___GFP_NOWARN@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movb	(%r15), %cl
	movl	%r13d, %edi
	shll	%cl, %edi
	callq	_get_order
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_alloc_pages
	testq	%rax, %rax
	je	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %r12
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addl	%r13d, (%rax)
	cmpl	$1, %r13d
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movb	(%r15), %cl
	movl	%r13d, %edi
	shll	%cl, %edi
	callq	_get_order
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_split_page
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movb	(%r15), %cl
	movl	%r13d, %edi
	shll	%cl, %edi
	callq	_get_order
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leal	-1(%rbx), %eax
	leaq	(%r12,%rax,4), %rdi
	callq	___SetPageOffline
	movzbl	(%r15), %ecx
	movl	%r13d, %edi
	shll	%cl, %edi
	callq	_get_order
	movl	%ebx, %edx
	movl	%eax, %ecx
	shrl	%cl, %edx
	incl	%ebx
	testl	%edx, %edx
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	incl	16(%rbx)
	movq	%r12, %rdi
	callq	_page_to_pfn
	movq	8(%rbx), %rcx
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%esi, %edx
	movl	%eax, 4(%rcx,%rdx,8)
	movl	%r13d, (%rcx,%rdx,8)
	movq	(%rbx), %rax
	leaq	4(%rax), %rcx
	movq	%rcx, (%rbx)
	incl	%esi
	movl	%esi, %r14d
	imull	%r13d, %r14d
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, %r14d
	jae	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	addq	$8, %rax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jbe	LBB0_5
	jmp	LBB0_12
LBB0_11:
	movl	%ecx, %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_GFP_HIGHUSER,4,2               ## @GFP_HIGHUSER
	.comm	___GFP_NORETRY,4,2              ## @__GFP_NORETRY
	.comm	___GFP_NOMEMALLOC,4,2           ## @__GFP_NOMEMALLOC
	.comm	___GFP_NOWARN,4,2               ## @__GFP_NOWARN
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.no_dead_strip	_alloc_balloon_pages
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_balloon_pages
_alloc_balloon_pages:                   ; @alloc_balloon_pages
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cmp	w1, w3
	b.lo	LBB0_3
; %bb.1:
	mov	x20, x1
	cbz	w1, LBB0_3
; %bb.2:
	mov	x21, x2
	ldr	x8, [x2]
	add	x8, x8, #4
Lloh0:
	adrp	x25, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _PAGE_SIZE@GOTPAGEOFF]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ls	LBB0_5
LBB0_3:
	mov	w24, #0
LBB0_4:
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x19, x3
	mov	x22, x0
	mov	w26, #0
	mov	w24, #0
Lloh2:
	adrp	x28, ___GFP_NOWARN@GOTPAGE
Lloh3:
	ldr	x28, [x28, ___GFP_NOWARN@GOTPAGEOFF]
Lloh4:
	adrp	x27, _PAGE_SHIFT@GOTPAGE
Lloh5:
	ldr	x27, [x27, _PAGE_SHIFT@GOTPAGEOFF]
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
Lloh6:
	adrp	x8, _GFP_HIGHUSER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_HIGHUSER@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, ___GFP_NORETRY@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___GFP_NORETRY@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh12:
	adrp	x9, ___GFP_NOMEMALLOC@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___GFP_NOMEMALLOC@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x28]
	orr	w23, w8, w9
	ldr	w8, [x27]
	lsl	w0, w19, w8
	bl	_get_order
	mov	x1, x0
	mov	x0, x23
	bl	_alloc_pages
	cbz	x0, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x23, x0
	ldr	w8, [x22]
	add	w8, w8, w19
	str	w8, [x22]
	cmp	w19, #1
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x27]
	lsl	w0, w19, w8
	bl	_get_order
	mov	x1, x0
	mov	x0, x23
	bl	_split_page
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x27]
	lsl	w0, w19, w8
	bl	_get_order
	mov	w24, #1
LBB0_10:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	w8, w24, #1
	add	x0, x23, w8, uxtw #2
	bl	___SetPageOffline
	ldr	w8, [x27]
	lsl	w0, w19, w8
	bl	_get_order
	lsr	w8, w24, w0
	add	w24, w24, #1
	cbz	w8, LBB0_10
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x21, #16]
	add	w8, w8, #1
	str	w8, [x21, #16]
	mov	x0, x23
	bl	_page_to_pfn
	ldp	x8, x9, [x21]
	add	x9, x9, w26, uxtw #3
	stp	w19, w0, [x9]
	add	x9, x8, #4
	str	x9, [x21]
	add	w26, w26, #1
	mul	w24, w26, w19
	cmp	w24, w20
	b.hs	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	add	x8, x8, #8
	ldr	x9, [x25]
	cmp	x8, x9
	b.ls	LBB0_6
	b	LBB0_4
LBB0_13:
	mov	x24, x20
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_GFP_HIGHUSER,4,2               ; @GFP_HIGHUSER
	.comm	___GFP_NORETRY,4,2              ; @__GFP_NORETRY
	.comm	___GFP_NOMEMALLOC,4,2           ; @__GFP_NOMEMALLOC
	.comm	___GFP_NOWARN,4,2               ; @__GFP_NOWARN
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.no_dead_strip	_alloc_balloon_pages
.subsections_via_symbols
