	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_nic_dev_remove
_hns_nic_dev_remove:                    ## @hns_nic_dev_remove
	.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
	callq	_platform_get_drvdata
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	(%r14), %rax
	movq	_NETREG_UNINITIALIZED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_unregister_netdev
LBB0_2:
	cmpq	$0, 32(%rbx)
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_hns_nic_uninit_ring_data
LBB0_4:
	movq	$0, 32(%rbx)
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_phy_disconnect
LBB0_6:
	movq	24(%rbx), %rdi
	callq	_IS_ERR_OR_NULL
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movq	24(%rbx), %rdi
	callq	_hnae_put_handle
LBB0_8:
	movq	$0, 24(%rbx)
	cmpq	$0, 16(%rbx)
	je	LBB0_10
## %bb.9:
	leaq	16(%rbx), %rdi
	callq	_hnae_unregister_notifier
LBB0_10:
	movq	$0, 16(%rbx)
	movq	_NIC_STATE_REMOVING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%rbx), %rsi
	callq	_set_bit
	movq	%rbx, %rdi
	addq	$4, %rdi
	callq	_cancel_work_sync
	movl	(%rbx), %edi
	callq	_to_of_node
	movl	%eax, %edi
	callq	_of_node_put
	movq	%r14, %rdi
	callq	_free_netdev
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NETREG_UNINITIALIZED,8,3       ## @NETREG_UNINITIALIZED
	.comm	_NIC_STATE_REMOVING,4,2         ## @NIC_STATE_REMOVING
	.no_dead_strip	_hns_nic_dev_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_nic_dev_remove
_hns_nic_dev_remove:                    ; @hns_nic_dev_remove
	.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
	bl	_platform_get_drvdata
	mov	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _NETREG_UNINITIALIZED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NETREG_UNINITIALIZED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_unregister_netdev
LBB0_2:
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_hns_nic_uninit_ring_data
LBB0_4:
	str	xzr, [x20, #32]
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_6
; %bb.5:
	bl	_phy_disconnect
LBB0_6:
	ldr	x0, [x20, #24]
	bl	_IS_ERR_OR_NULL
	cbnz	w0, LBB0_8
; %bb.7:
	ldr	x0, [x20, #24]
	bl	_hnae_put_handle
LBB0_8:
	mov	x0, x20
	ldr	x8, [x0, #16]!
	str	xzr, [x0, #8]
	cbz	x8, LBB0_10
; %bb.9:
	bl	_hnae_unregister_notifier
LBB0_10:
	str	xzr, [x20, #16]
Lloh3:
	adrp	x8, _NIC_STATE_REMOVING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NIC_STATE_REMOVING@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x1, x20, #8
	bl	_set_bit
	add	x0, x20, #4
	bl	_cancel_work_sync
	ldr	w0, [x20]
	bl	_to_of_node
	bl	_of_node_put
	mov	x0, x19
	bl	_free_netdev
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_NETREG_UNINITIALIZED,8,3       ; @NETREG_UNINITIALIZED
	.comm	_NIC_STATE_REMOVING,4,2         ; @NIC_STATE_REMOVING
	.no_dead_strip	_hns_nic_dev_remove
.subsections_via_symbols
