	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gve_alloc_qpls
_gve_alloc_qpls:                        ## @gve_alloc_qpls
	.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, %r14
	callq	_gve_num_tx_qpls
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_gve_num_rx_qpls
	movl	%eax, %r15d
	addl	%ebx, %r15d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	%r15d, %edi
	callq	_kvzalloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_17
## %bb.1:
	movq	%r14, %rdi
	callq	_gve_num_tx_qpls
	xorl	%r13d, %r13d
	testl	%eax, %eax
	jle	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	28(%r14), %edx
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_gve_alloc_queue_page_list
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_6 Depth=1
	incl	%r13d
	movq	%r14, %rdi
	callq	_gve_num_tx_qpls
	cmpl	%eax, %r13d
	jl	LBB0_6
LBB0_2:
	cmpl	%r15d, %r13d
	jge	LBB0_10
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	24(%r14), %edx
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_gve_alloc_queue_page_list
	testl	%eax, %eax
	jne	LBB0_4
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%r13d
	cmpl	%r13d, %r15d
	jne	LBB0_3
## %bb.9:
	movl	%r15d, %r13d
LBB0_10:
	movl	%r15d, %edi
	callq	_BITS_TO_LONGS
	movq	_BITS_PER_BYTE@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	shll	$3, %eax
	movl	%eax, 8(%r14)
	movl	%r15d, %edi
	callq	_BITS_TO_LONGS
                                        ## kill: def $eax killed $eax def $rax
	leal	(,%rax,8), %edi
	movl	(%rbx), %esi
	callq	_kvzalloc
	movq	%rax, 16(%r14)
	xorl	%r12d, %r12d
	testq	%rax, %rax
	jne	LBB0_16
## %bb.11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	testl	%r13d, %r13d
	jns	LBB0_13
	jmp	LBB0_15
LBB0_17:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_16
LBB0_7:
	movl	%eax, %r12d
	jmp	LBB0_13
LBB0_4:
	movl	%eax, %r12d
	testl	%r13d, %r13d
	js	LBB0_15
LBB0_13:
	incl	%r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_gve_free_queue_page_list
	incl	%ebx
	cmpl	%ebx, %r13d
	jne	LBB0_14
LBB0_15:
	movq	(%r14), %rdi
	callq	_kvfree
LBB0_16:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_BITS_PER_BYTE,4,2              ## @BITS_PER_BYTE
	.no_dead_strip	_gve_alloc_qpls
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gve_alloc_qpls
_gve_alloc_qpls:                        ; @gve_alloc_qpls
	.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	x19, x0
	bl	_gve_num_tx_qpls
	mov	x20, x0
	mov	x0, x19
	bl	_gve_num_rx_qpls
	add	w21, w0, w20
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x21
	bl	_kvzalloc
	str	x0, [x19]
	cbz	x0, LBB0_6
; %bb.1:
	mov	x0, x19
	bl	_gve_num_tx_qpls
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.2:
	mov	w20, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x19, #28]
	mov	x0, x19
	mov	x1, x20
	bl	_gve_alloc_queue_page_list
	cbnz	w0, LBB0_13
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w20, w20, #1
	mov	x0, x19
	bl	_gve_num_tx_qpls
	cmp	w20, w0
	b.lt	LBB0_3
; %bb.5:
	cmp	w20, w21
	b.lt	LBB0_8
	b	LBB0_11
LBB0_6:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_19
LBB0_7:
	mov	w20, #0
	cmp	w20, w21
	b.ge	LBB0_11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x19, #24]
	mov	x0, x19
	mov	x1, x20
	bl	_gve_alloc_queue_page_list
	cbnz	w0, LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	w20, w20, #1
	cmp	w21, w20
	b.ne	LBB0_8
; %bb.10:
	mov	x20, x21
LBB0_11:
	mov	x0, x21
	bl	_BITS_TO_LONGS
Lloh5:
	adrp	x8, _BITS_PER_BYTE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BITS_PER_BYTE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	mul	w8, w0, w8
	lsl	w8, w8, #3
	str	w8, [x19, #8]
	mov	x0, x21
	bl	_BITS_TO_LONGS
	lsl	w0, w0, #3
	ldr	w1, [x23]
	bl	_kvzalloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_14
; %bb.12:
	mov	w22, #0
	b	LBB0_19
LBB0_13:
	mov	x22, x0
	b	LBB0_16
LBB0_14:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w22, w8
	tbz	w20, #31, LBB0_16
	b	LBB0_18
LBB0_15:
	mov	x22, x0
	tbnz	w20, #31, LBB0_18
LBB0_16:
	mov	w21, #0
	add	w20, w20, #1
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_gve_free_queue_page_list
	add	w21, w21, #1
	cmp	w20, w21
	b.ne	LBB0_17
LBB0_18:
	ldr	x0, [x19]
	bl	_kvfree
LBB0_19:
	mov	x0, x22
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_BITS_PER_BYTE,4,2              ; @BITS_PER_BYTE
	.no_dead_strip	_gve_alloc_qpls
.subsections_via_symbols
