	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aq_get_rxpages
_aq_get_rxpages:                        ## @aq_get_rxpages
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	8(%rsi), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	callq	_page_ref_count
	cmpl	$2, %eax
	jl	LBB0_5
## %bb.2:
	movq	_AQ_CFG_RX_FRAME_MAX@GOTPCREL(%rip), %rax
	movl	(%rbx), %edx
	addl	(%rax), %edx
	movl	%edx, (%rbx)
	addl	(%rax), %edx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%r14d, %ecx
	shll	%cl, %eax
	cmpl	%eax, %edx
	jle	LBB0_3
## %bb.4:
	movl	(%r15), %edi
	callq	_aq_nic_get_dev
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_aq_free_rxpage
	leaq	8(%r15), %rax
	jmp	LBB0_6
LBB0_5:
	movl	$0, (%rbx)
	leaq	4(%r15), %rax
	jmp	LBB0_6
LBB0_3:
	leaq	12(%r15), %rax
LBB0_6:
	incl	(%rax)
	cmpq	$0, 8(%rbx)
	je	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	(%r15), %edi
	callq	_aq_nic_get_dev
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_aq_get_rxpage                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AQ_CFG_RX_FRAME_MAX,4,2        ## @AQ_CFG_RX_FRAME_MAX
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.no_dead_strip	_aq_get_rxpages
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aq_get_rxpages
_aq_get_rxpages:                        ; @aq_get_rxpages
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x0, [x1, #8]
	cbz	x0, LBB0_8
; %bb.1:
	bl	_page_ref_count
	cmp	w0, #2
	b.lt	LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _AQ_CFG_RX_FRAME_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AQ_CFG_RX_FRAME_MAX@GOTPAGEOFF]
	ldr	w9, [x8]
	ldr	w10, [x20]
	add	w9, w10, w9
	str	w9, [x20]
	ldr	w8, [x8]
	add	w8, w8, w9
Lloh2:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	lsl	w9, w9, w19
	cmp	w8, w9
	b.le	LBB0_5
; %bb.3:
	mov	x22, x21
	ldr	w0, [x22], #8
	bl	_aq_nic_get_dev
	mov	x1, x0
	mov	x0, x20
	bl	_aq_free_rxpage
	b	LBB0_6
LBB0_4:
	str	wzr, [x20]
	add	x22, x21, #4
	b	LBB0_6
LBB0_5:
	add	x22, x21, #12
LBB0_6:
	ldr	w8, [x22]
	add	w8, w8, #1
	str	w8, [x22]
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_8
; %bb.7:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldr	w0, [x21]
	bl	_aq_nic_get_dev
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_aq_get_rxpage
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_AQ_CFG_RX_FRAME_MAX,4,2        ; @AQ_CFG_RX_FRAME_MAX
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.no_dead_strip	_aq_get_rxpages
.subsections_via_symbols
