	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnad_set_ringparam
_bnad_set_ringparam:                    ## @bnad_set_ringparam
	.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	%rsi, %r13
	movq	%rdi, %rbx
	callq	_netdev_priv
	movq	%rax, %r15
	leaq	28(%rax), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%r13), %rdi
	cmpq	(%r15), %rdi
	jne	LBB0_3
## %bb.1:
	movq	8(%r13), %rax
	cmpq	8(%r15), %rax
	jne	LBB0_3
LBB0_2:
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%r12d, %r12d
	jmp	LBB0_28
LBB0_3:
	movq	_BNAD_MIN_Q_DEPTH@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rdi
	jl	LBB0_6
## %bb.4:
	movq	_BNAD_MAX_RXQ_DEPTH@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jg	LBB0_6
## %bb.5:
	callq	_BNA_POWER_OF_2
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movq	8(%r13), %rdi
	cmpq	(%r12), %rdi
	jl	LBB0_6
## %bb.8:
	movq	_BNAD_MAX_TXQ_DEPTH@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jg	LBB0_6
## %bb.9:
	callq	_BNA_POWER_OF_2
	testl	%eax, %eax
	je	LBB0_6
## %bb.10:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	(%r13), %rax
	xorl	%r12d, %r12d
	cmpq	(%r15), %rax
	je	LBB0_20
## %bb.11:
	movq	%rax, (%r15)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_netif_running
	testl	%eax, %eax
	je	LBB0_2
## %bb.12:
	movl	16(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_18
## %bb.13:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_14
LBB0_6:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_28:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_17
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	48(%r15), %rcx
	cmpq	$0, (%rcx,%rbx,8)
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_bnad_destroy_rx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_bnad_setup_rx
	testl	%r12d, %r12d
	movl	%eax, %ecx
	cmovnel	%r12d, %ecx
	testl	%eax, %eax
	cmovnel	%ecx, %r12d
	movl	16(%r15), %eax
	jmp	LBB0_16
LBB0_17:
	testl	%r12d, %r12d
	jne	LBB0_20
LBB0_18:
	movq	48(%r15), %rax
	cmpq	$0, (%rax)
	movl	$0, %r12d
	je	LBB0_20
## %bb.19:
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_bnad_restore_vlans
	movq	%r15, %rdi
	callq	_bnad_enable_default_bcast
	movq	%r15, %rbx
	addq	$40, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_bnad_mac_addr_set_locked
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	_BNAD_CF_ALLMULTI@GOTPCREL(%rip), %rax
	movq	_BNAD_CF_PROMISC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	notl	%ecx
	andl	%ecx, 20(%r15)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_bnad_set_rx_mode
LBB0_20:
	movq	8(%r13), %rax
	cmpq	8(%r15), %rax
	jne	LBB0_21
LBB0_27:
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_28
LBB0_21:
	movq	%rax, 8(%r15)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_netif_running
	testl	%eax, %eax
	je	LBB0_2
## %bb.22:
	movl	24(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_27
## %bb.23:
	xorl	%ebx, %ebx
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_24 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_27
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%r15), %rcx
	cmpl	$0, (%rcx,%rbx,4)
	je	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_bnad_destroy_tx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_bnad_setup_tx
	testl	%r12d, %r12d
	movl	%eax, %ecx
	cmovnel	%r12d, %ecx
	testl	%eax, %eax
	cmovnel	%ecx, %r12d
	movl	24(%r15), %eax
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_BNAD_MIN_Q_DEPTH,8,3           ## @BNAD_MIN_Q_DEPTH
	.comm	_BNAD_MAX_RXQ_DEPTH,8,3         ## @BNAD_MAX_RXQ_DEPTH
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BNAD_MAX_TXQ_DEPTH,8,3         ## @BNAD_MAX_TXQ_DEPTH
	.comm	_BNAD_CF_ALLMULTI,4,2           ## @BNAD_CF_ALLMULTI
	.comm	_BNAD_CF_PROMISC,4,2            ## @BNAD_CF_PROMISC
	.no_dead_strip	_bnad_set_ringparam
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnad_set_ringparam
_bnad_set_ringparam:                    ; @bnad_set_ringparam
	.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	x22, x1
	mov	x21, x0
	bl	_netdev_priv
	mov	x20, x0
	add	x19, x0, #28
	mov	x0, x19
	bl	_mutex_lock
	ldr	x0, [x22]
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x22, #8]
	ldr	x9, [x20, #8]
	cmp	x8, x9
	b.ne	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_mutex_unlock
	mov	w23, #0
	b	LBB0_12
LBB0_3:
Lloh0:
	adrp	x23, _BNAD_MIN_Q_DEPTH@GOTPAGE
Lloh1:
	ldr	x23, [x23, _BNAD_MIN_Q_DEPTH@GOTPAGEOFF]
	ldr	x8, [x23]
Lloh2:
	adrp	x9, _BNAD_MAX_RXQ_DEPTH@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BNAD_MAX_RXQ_DEPTH@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x0, x8
	ccmp	x0, x9, #0, ge
	b.gt	LBB0_11
; %bb.4:
	bl	_BNA_POWER_OF_2
	cbz	w0, LBB0_11
; %bb.5:
	ldr	x0, [x22, #8]
	ldr	x8, [x23]
Lloh5:
	adrp	x9, _BNAD_MAX_TXQ_DEPTH@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BNAD_MAX_TXQ_DEPTH@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x0, x8
	ccmp	x0, x9, #0, ge
	b.gt	LBB0_11
; %bb.6:
	bl	_BNA_POWER_OF_2
	cbz	w0, LBB0_11
; %bb.7:
	ldr	x8, [x22]
	ldr	x9, [x20]
	cmp	x8, x9
	b.eq	LBB0_19
; %bb.8:
	str	x8, [x20]
	mov	x0, x21
	bl	_netif_running
	cbz	w0, LBB0_2
; %bb.9:
	ldr	w8, [x20, #16]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.10:
	mov	x24, #0
	mov	w23, #0
	b	LBB0_14
LBB0_11:
	mov	x0, x19
	bl	_mutex_unlock
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_12:
	mov	x0, x23
	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
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x24, x24, #1
	cmp	x24, w8, sxtw
	b.ge	LBB0_16
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #48]
	ldr	x9, [x9, x24, lsl #3]
	cbz	x9, LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x20
	mov	x1, x24
	bl	_bnad_destroy_rx
	mov	x0, x20
	mov	x1, x24
	bl	_bnad_setup_rx
	cmp	w23, #0
	ccmp	w0, #0, #4, eq
	csel	w23, w23, w0, eq
	ldr	w8, [x20, #16]
	b	LBB0_13
LBB0_16:
	cbnz	w23, LBB0_20
LBB0_17:
	ldr	x8, [x20, #48]
	ldr	x8, [x8]
	cbz	x8, LBB0_19
; %bb.18:
	mov	x0, x20
	mov	w1, #0
	bl	_bnad_restore_vlans
	mov	x0, x20
	bl	_bnad_enable_default_bcast
	add	x23, x20, #40
	mov	x0, x23
	bl	_spin_lock_irqsave
	ldr	w1, [x21]
	mov	x0, x20
	bl	_bnad_mac_addr_set_locked
	mov	x0, x23
	bl	_spin_unlock_irqrestore
Lloh11:
	adrp	x8, _BNAD_CF_ALLMULTI@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BNAD_CF_ALLMULTI@GOTPAGEOFF]
Lloh13:
	adrp	x9, _BNAD_CF_PROMISC@GOTPAGE
Lloh14:
	ldr	x9, [x9, _BNAD_CF_PROMISC@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x20, #20]
	bic	w8, w9, w8
	str	w8, [x20, #20]
	mov	x0, x21
	bl	_bnad_set_rx_mode
LBB0_19:
	mov	w23, #0
LBB0_20:
	ldr	x8, [x22, #8]
	ldr	x9, [x20, #8]
	cmp	x8, x9
	b.ne	LBB0_22
LBB0_21:
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_12
LBB0_22:
	str	x8, [x20, #8]
	mov	x0, x21
	bl	_netif_running
	cbz	w0, LBB0_2
; %bb.23:
	ldr	w8, [x20, #24]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.24:
	mov	x21, #0
	b	LBB0_26
LBB0_25:                                ;   in Loop: Header=BB0_26 Depth=1
	add	x21, x21, #1
	cmp	x21, w8, sxtw
	b.ge	LBB0_21
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #32]
	ldr	w9, [x9, x21, lsl #2]
	cbz	w9, LBB0_25
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_bnad_destroy_tx
	mov	x0, x20
	mov	x1, x21
	bl	_bnad_setup_tx
	cmp	w23, #0
	ccmp	w0, #0, #4, eq
	csel	w23, w23, w0, eq
	ldr	w8, [x20, #24]
	b	LBB0_25
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_BNAD_MIN_Q_DEPTH,8,3           ; @BNAD_MIN_Q_DEPTH
	.comm	_BNAD_MAX_RXQ_DEPTH,8,3         ; @BNAD_MAX_RXQ_DEPTH
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BNAD_MAX_TXQ_DEPTH,8,3         ; @BNAD_MAX_TXQ_DEPTH
	.comm	_BNAD_CF_ALLMULTI,4,2           ; @BNAD_CF_ALLMULTI
	.comm	_BNAD_CF_PROMISC,4,2            ; @BNAD_CF_PROMISC
	.no_dead_strip	_bnad_set_ringparam
.subsections_via_symbols
