	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnad_rxq_alloc_init
_bnad_rxq_alloc_init:                   ## @bnad_rxq_alloc_init
	.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
	movq	%rsi, %rbx
	movq	16(%rsi), %r15
	callq	_bnad_rxq_alloc_uninit
	movq	(%rbx), %rax
	movl	(%rax), %edi
	callq	_get_order
	movl	%eax, %r14d
	movq	_BNAD_RXBUF_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movl	8(%rbx), %edi
	callq	_bna_is_small_rxq
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	$0, (%r15)
	movq	(%rbx), %rax
	movl	(%rax), %esi
LBB0_5:
	movl	%esi, 4(%r15)
	jmp	LBB0_6
LBB0_2:
	movq	(%rbx), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_4
## %bb.3:
	movl	$0, (%r15)
	movl	(%rax), %esi
	movl	%esi, 4(%r15)
	movq	_BNAD_RXBUF_MULTI_BUFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
LBB0_6:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%r14d, %ecx
	shll	%cl, %eax
	cltd
	idivl	%esi
	movl	%edx, %edi
	callq	_BUG_ON
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	%r14d, (%r15)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%r14d, %ecx
	shll	%cl, %edx
	cmpl	$2049, (%rax)                   ## imm = 0x801
	movl	$2048, %esi                     ## imm = 0x800
	cmovgel	%edx, %esi
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_BNAD_RXBUF_PAGE,4,2            ## @BNAD_RXBUF_PAGE
	.comm	_BNAD_RXBUF_MULTI_BUFF,4,2      ## @BNAD_RXBUF_MULTI_BUFF
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.no_dead_strip	_bnad_rxq_alloc_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnad_rxq_alloc_init
_bnad_rxq_alloc_init:                   ; @bnad_rxq_alloc_init
	.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	x20, x1
	ldr	x21, [x1, #16]
	bl	_bnad_rxq_alloc_uninit
	ldr	x8, [x20]
	ldr	w0, [x8]
	bl	_get_order
	mov	x19, x0
Lloh0:
	adrp	x8, _BNAD_RXBUF_PAGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BNAD_RXBUF_PAGE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x21, #8]
	ldr	w0, [x20, #8]
	bl	_bna_is_small_rxq
Lloh3:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x9, [x20]
	ldr	w9, [x9]
	str	wzr, [x21]
LBB0_2:
	str	w9, [x21, #4]
	b	LBB0_5
LBB0_3:
	ldr	x9, [x20]
	ldr	x10, [x9, #8]
	cbz	x10, LBB0_6
; %bb.4:
	ldr	w9, [x9]
	stp	wzr, w9, [x21]
Lloh5:
	adrp	x10, _BNAD_RXBUF_MULTI_BUFF@GOTPAGE
Lloh6:
	ldr	x10, [x10, _BNAD_RXBUF_MULTI_BUFF@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	str	w10, [x21, #8]
LBB0_5:
	ldr	w8, [x8]
	lsl	w8, w8, w19
	sdiv	w10, w8, w9
	msub	w0, w10, w9, w8
	bl	_BUG_ON
	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_6:
	str	w19, [x21]
	ldr	w9, [x9]
	ldr	w10, [x8]
	lsl	w10, w10, w19
	mov	w11, #2048
	cmp	w9, #2048
	csel	w9, w10, w11, gt
	b	LBB0_2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_BNAD_RXBUF_PAGE,4,2            ; @BNAD_RXBUF_PAGE
	.comm	_BNAD_RXBUF_MULTI_BUFF,4,2      ; @BNAD_RXBUF_MULTI_BUFF
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.no_dead_strip	_bnad_rxq_alloc_init
.subsections_via_symbols
