	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wil_rx_init
_wil_rx_init:                           ## @wil_rx_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	callq	_wil_dbg_misc
	cmpq	$0, 8(%rbx)
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_wil_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_7
LBB0_2:
	movq	%rbx, %rdi
	callq	_wil_rx_buf_len_init
	movl	$1, %eax
	movl	%r14d, %ecx
	shll	%cl, %eax
	movl	%eax, (%rbx)
	movl	$1, 4(%rbx)
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_wil_vring_alloc
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_wmi_rx_chain_add
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movl	(%rbx), %esi
	movq	%rbx, %rdi
	callq	_wil_rx_refill
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_5
LBB0_6:
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_wil_vring_free
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	xorl	%r14d, %r14d
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rx_init\n"

L_.str.1:                               ## @.str.1
	.asciz	"Rx ring already allocated\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_wil_rx_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wil_rx_init
_wil_rx_init:                           ; @wil_rx_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wil_dbg_misc
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_wil_err
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_6
LBB0_2:
	mov	x0, x19
	bl	_wil_rx_buf_len_init
	mov	w8, #1
	lsl	w9, w8, w20
	stp	w9, w8, [x19]
	mov	x0, x19
	mov	x1, x19
	bl	_wil_vring_alloc
	mov	x20, x0
	cbnz	w0, LBB0_6
; %bb.3:
	mov	x0, x19
	mov	x1, x19
	bl	_wmi_rx_chain_add
	mov	x20, x0
	cbnz	w0, LBB0_5
; %bb.4:
	ldr	w1, [x19]
	mov	x0, x19
	bl	_wil_rx_refill
	mov	x20, x0
	cbz	w0, LBB0_6
LBB0_5:
	mov	x0, x19
	mov	x1, x19
	bl	_wil_vring_free
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rx_init\n"

l_.str.1:                               ; @.str.1
	.asciz	"Rx ring already allocated\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_wil_rx_init
.subsections_via_symbols
