	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_nic_net_down
_hns_nic_net_down:                      ## @hns_nic_net_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r15
	movq	_NIC_STATE_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	28(%r15), %rsi
	callq	_test_and_set_bit
	testq	%rax, %rax
	jne	LBB0_7
## %bb.1:
	movq	%r15, %rdi
	addq	$24, %rdi
	callq	_del_timer_sync
	movq	%r14, %rdi
	callq	_netif_tx_stop_all_queues
	movq	%r14, %rdi
	callq	_netif_carrier_off
	movq	%r14, %rdi
	callq	_netif_tx_disable
	movq	$0, 16(%r15)
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	callq	_phy_stop
LBB0_3:
	movq	8(%r15), %rdi
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	callq	*%rax
LBB0_5:
	movq	%r14, %rdi
	callq	_netif_tx_stop_all_queues
	movq	8(%r15), %rax
	movl	(%rax), %r12d
	testl	%r12d, %r12d
	jle	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	leaq	-1(%r12), %rbx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_hns_nic_ring_close
	movq	8(%r15), %rax
	movl	(%rax), %esi
	addl	%ebx, %esi
	movq	%r14, %rdi
	callq	_hns_nic_ring_close
	movl	%ebx, %edi
	addq	(%r15), %rdi
	callq	_hns_nic_tx_clr_all_bufs
	cmpq	$1, %r12
	movq	%rbx, %r12
	ja	LBB0_6
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NIC_STATE_DOWN,4,2             ## @NIC_STATE_DOWN
	.no_dead_strip	_hns_nic_net_down
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_nic_net_down
_hns_nic_net_down:                      ; @hns_nic_net_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	_netdev_priv
	mov	x20, x0
Lloh0:
	adrp	x8, _NIC_STATE_DOWN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NIC_STATE_DOWN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x20, #28
	bl	_test_and_set_bit
	cbnz	x0, LBB0_7
; %bb.1:
	add	x0, x20, #24
	bl	_del_timer_sync
	mov	x0, x19
	bl	_netif_tx_stop_all_queues
	mov	x0, x19
	bl	_netif_carrier_off
	mov	x0, x19
	bl	_netif_tx_disable
	str	xzr, [x20, #16]
	ldr	x0, [x19]
	cbz	x0, LBB0_3
; %bb.2:
	bl	_phy_stop
LBB0_3:
	ldr	x0, [x20, #8]
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.4:
	blr	x8
LBB0_5:
	mov	x0, x19
	bl	_netif_tx_stop_all_queues
	ldr	x8, [x20, #8]
	ldr	w22, [x8]
	cmp	w22, #1
	b.lt	LBB0_7
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	subs	x21, x22, #1
	mov	x0, x19
	mov	x1, x21
	bl	_hns_nic_ring_close
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	add	w1, w21, w8
	mov	x0, x19
	bl	_hns_nic_ring_close
	ldr	x8, [x20]
	add	x0, x8, w21, uxtw
	bl	_hns_nic_tx_clr_all_bufs
	subs	x22, x22, #1
	b.hi	LBB0_6
LBB0_7:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_NIC_STATE_DOWN,4,2             ; @NIC_STATE_DOWN
	.no_dead_strip	_hns_nic_net_down
.subsections_via_symbols
