	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netxen_nic_remove
_netxen_nic_remove:                     ## @netxen_nic_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_pci_get_drvdata
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	movq	16(%rax), %r14
	movq	%rax, %rdi
	callq	_netxen_cancel_fw_work
	movq	%r14, %rdi
	callq	_unregister_netdev
	leaq	12(%rbx), %rdi
	callq	_cancel_work_sync
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_netxen_free_ip_list
	movq	%rbx, %rdi
	callq	_netxen_nic_detach
	movq	%rbx, %rdi
	callq	_nx_decr_dev_ref_cnt
	cmpq	$0, (%rbx)
	jne	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_netxen_free_dummy_dma
LBB0_3:
	movq	___NX_RESETTING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	addq	$8, %rsi
	callq	_clear_bit
	movq	%rbx, %rdi
	callq	_netxen_teardown_intr
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_netxen_set_interrupt_mode
	movq	%rbx, %rdi
	callq	_netxen_remove_diag_entries
	movq	%rbx, %rdi
	callq	_netxen_cleanup_pci_map
	movq	%rbx, %rdi
	callq	_netxen_release_firmware
	movl	(%r15), %edi
	callq	_NX_IS_REVISION_P3
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_netxen_cleanup_minidump
	movq	%r15, %rdi
	callq	_pci_disable_pcie_error_reporting
LBB0_5:
	movq	%r15, %rdi
	callq	_pci_release_regions
	movq	%r15, %rdi
	callq	_pci_disable_device
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free_netdev                    ## TAILCALL
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	___NX_RESETTING,4,2             ## @__NX_RESETTING
	.no_dead_strip	_netxen_nic_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netxen_nic_remove
_netxen_nic_remove:                     ; @netxen_nic_remove
	.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	_pci_get_drvdata
	cbz	x0, LBB0_6
; %bb.1:
	mov	x21, x0
	ldr	x20, [x0, #16]
	bl	_netxen_cancel_fw_work
	mov	x0, x20
	bl	_unregister_netdev
	add	x0, x21, #12
	bl	_cancel_work_sync
	mov	x0, x21
	mov	w1, #0
	bl	_netxen_free_ip_list
	mov	x0, x21
	bl	_netxen_nic_detach
	mov	x0, x21
	bl	_nx_decr_dev_ref_cnt
	ldr	x8, [x21]
	cbnz	x8, LBB0_3
; %bb.2:
	mov	x0, x21
	bl	_netxen_free_dummy_dma
LBB0_3:
Lloh0:
	adrp	x8, ___NX_RESETTING@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___NX_RESETTING@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x21, #8
	bl	_clear_bit
	mov	x0, x21
	bl	_netxen_teardown_intr
	mov	x0, x21
	mov	w1, #0
	bl	_netxen_set_interrupt_mode
	mov	x0, x21
	bl	_netxen_remove_diag_entries
	mov	x0, x21
	bl	_netxen_cleanup_pci_map
	mov	x0, x21
	bl	_netxen_release_firmware
	ldr	w0, [x19]
	bl	_NX_IS_REVISION_P3
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x21
	bl	_netxen_cleanup_minidump
	mov	x0, x19
	bl	_pci_disable_pcie_error_reporting
LBB0_5:
	mov	x0, x19
	bl	_pci_release_regions
	mov	x0, x19
	bl	_pci_disable_device
	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
	b	_free_netdev
LBB0_6:
	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	___NX_RESETTING,4,2             ; @__NX_RESETTING
	.no_dead_strip	_netxen_nic_remove
.subsections_via_symbols
