	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ql_adapter_down
_ql_adapter_down:                       ## @ql_adapter_down
	.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	%rdi, %r15
	callq	_ql_link_off
	movq	%r15, %rdi
	callq	_ql_cancel_all_work_sync
	cmpl	$0, (%r15)
	jle	LBB0_3
## %bb.1:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rdi
	addq	%r14, %rdi
	callq	_napi_disable
	incq	%rbx
	movslq	(%r15), %rax
	addq	$4, %r14
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_3:
	movq	_QL_ADAPTER_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	24(%r15), %rsi
	callq	_clear_bit
	movq	%r15, %rdi
	callq	_ql_disable_interrupts
	movq	%r15, %rdi
	callq	_ql_tx_ring_clean
	cmpl	$0, (%r15)
	jle	LBB0_6
## %bb.4:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rdi
	addq	%r14, %rdi
	callq	_netif_napi_del
	incq	%rbx
	movslq	(%r15), %rax
	addq	$4, %r14
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_6:
	movq	%r15, %rdi
	callq	_ql_adapter_reset
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movq	_ifdown@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r15), %r8d
	movl	8(%r15), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r15, %rdi
	callq	_netif_err
LBB0_8:
	movq	%r15, %rdi
	callq	_ql_free_rx_buffers
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QL_ADAPTER_UP,4,2              ## @QL_ADAPTER_UP
	.comm	_ifdown,4,2                     ## @ifdown
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reset(func #%d) FAILED!\n"

	.no_dead_strip	_ql_adapter_down
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ql_adapter_down
_ql_adapter_down:                       ; @ql_adapter_down
	.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, x0
	bl	_ql_link_off
	mov	x0, x19
	bl	_ql_cancel_all_work_sync
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x20, #0
	mov	x21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	add	x0, x8, x20
	bl	_napi_disable
	add	x21, x21, #1
	ldrsw	x8, [x19]
	add	x20, x20, #4
	cmp	x21, x8
	b.lt	LBB0_2
LBB0_3:
Lloh0:
	adrp	x8, _QL_ADAPTER_UP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QL_ADAPTER_UP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x19, #24
	bl	_clear_bit
	mov	x0, x19
	bl	_ql_disable_interrupts
	mov	x0, x19
	bl	_ql_tx_ring_clean
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x20, #0
	mov	x21, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	add	x0, x8, x20
	bl	_netif_napi_del
	add	x21, x21, #1
	ldrsw	x8, [x19]
	add	x20, x20, #4
	cmp	x21, x8
	b.lt	LBB0_5
LBB0_6:
	mov	x0, x19
	bl	_ql_adapter_reset
	mov	x20, x0
	cbz	w0, LBB0_8
; %bb.7:
Lloh3:
	adrp	x8, _ifdown@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ifdown@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldp	w4, w2, [x19, #4]
Lloh6:
	adrp	x3, l_.str@PAGE
Lloh7:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_err
LBB0_8:
	mov	x0, x19
	bl	_ql_free_rx_buffers
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_QL_ADAPTER_UP,4,2              ; @QL_ADAPTER_UP
	.comm	_ifdown,4,2                     ; @ifdown
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reset(func #%d) FAILED!\n"

	.no_dead_strip	_ql_adapter_down
.subsections_via_symbols
