	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __bnx2x_remove
___bnx2x_remove:                        ## @__bnx2x_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	%rdx, %rdi
	callq	_NO_FCOE
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_rtnl_lock
	movl	32(%rbx), %esi
	movl	36(%rbx), %edi
	movq	_NETDEV_HW_ADDR_T_SAN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_dev_addr_del
	xorl	%eax, %eax
	callq	_rtnl_unlock
LBB0_2:
	movq	%rbx, %rdi
	callq	_IS_PF
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	%rbx, %rdi
	callq	_BP_NOMCP
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movq	_BC_SUPPORTS_RMMOD_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_6
## %bb.5:
	movq	_DRV_MSG_CODE_RMMOD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_bnx2x_fw_command
LBB0_6:
	testl	%r12d, %r12d
	je	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	callq	_unregister_netdev
	jmp	LBB0_9
LBB0_8:
	xorl	%eax, %eax
	callq	_rtnl_lock
	movq	%r14, %rdi
	callq	_dev_close
	xorl	%eax, %eax
	callq	_rtnl_unlock
LBB0_9:
	movq	%rbx, %rdi
	callq	_bnx2x_iov_remove_one
	movq	%rbx, %rdi
	callq	_IS_PF
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_PCI_D0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bnx2x_set_power_state
	movq	_OS_DRIVER_STATE_NOT_LOADED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bnx2x_set_os_driver_state
	movq	%rbx, %rdi
	callq	_bnx2x_reset_endianity
LBB0_11:
	movq	%rbx, %rdi
	callq	_bnx2x_disable_msi
	movq	%rbx, %rdi
	callq	_IS_PF
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	_PCI_D3hot@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bnx2x_set_power_state
LBB0_13:
	leaq	28(%rbx), %rdi
	callq	_cancel_delayed_work_sync
	movq	%rbx, %rdi
	callq	_IS_VF
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	%rbx, %rdi
	callq	_bnx2x_vfpf_release
LBB0_15:
	movq	_system_state@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_SYSTEM_POWER_OFF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.16:
	movl	24(%rbx), %esi
	movq	%r15, %rdi
	callq	_pci_wake_from_d3
	movq	_PCI_D3hot@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_pci_set_power_state
LBB0_17:
	movq	%rbx, %rdi
	callq	_bnx2x_disable_pcie_error_reporting
	testl	%r12d, %r12d
	je	LBB0_28
## %bb.18:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.19:
	callq	_iounmap
LBB0_20:
	movq	%rbx, %rdi
	callq	_IS_PF
	testq	%rax, %rax
	je	LBB0_24
## %bb.21:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_23
## %bb.22:
	callq	_iounmap
LBB0_23:
	movq	%rbx, %rdi
	callq	_bnx2x_release_firmware
	jmp	LBB0_25
LBB0_28:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	movq	%rbx, %rdi
	callq	_bnx2x_vf_pci_dealloc
LBB0_25:
	movq	%rbx, %rdi
	callq	_bnx2x_free_mem_bp
	movq	%r14, %rdi
	callq	_free_netdev
	movq	%r15, %rdi
	callq	_atomic_read
	cmpl	$1, %eax
	jne	LBB0_27
## %bb.26:
	movq	%r15, %rdi
	callq	_pci_release_regions
LBB0_27:
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pci_disable_device             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NETDEV_HW_ADDR_T_SAN,4,2       ## @NETDEV_HW_ADDR_T_SAN
	.comm	_BC_SUPPORTS_RMMOD_CMD,4,2      ## @BC_SUPPORTS_RMMOD_CMD
	.comm	_DRV_MSG_CODE_RMMOD,4,2         ## @DRV_MSG_CODE_RMMOD
	.comm	_PCI_D0,4,2                     ## @PCI_D0
	.comm	_OS_DRIVER_STATE_NOT_LOADED,4,2 ## @OS_DRIVER_STATE_NOT_LOADED
	.comm	_PCI_D3hot,4,2                  ## @PCI_D3hot
	.comm	_system_state,8,3               ## @system_state
	.comm	_SYSTEM_POWER_OFF,8,3           ## @SYSTEM_POWER_OFF
	.no_dead_strip	___bnx2x_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __bnx2x_remove
___bnx2x_remove:                        ; @__bnx2x_remove
	.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, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	mov	x0, x2
	bl	_NO_FCOE
	cbnz	w0, LBB0_2
; %bb.1:
	bl	_rtnl_lock
	ldp	w1, w0, [x21, #32]
Lloh0:
	adrp	x8, _NETDEV_HW_ADDR_T_SAN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NETDEV_HW_ADDR_T_SAN@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_dev_addr_del
	bl	_rtnl_unlock
LBB0_2:
	mov	x0, x21
	bl	_IS_PF
	cbz	x0, LBB0_6
; %bb.3:
	mov	x0, x21
	bl	_BP_NOMCP
	cbnz	w0, LBB0_6
; %bb.4:
	ldr	w8, [x21]
Lloh3:
	adrp	x9, _BC_SUPPORTS_RMMOD_CMD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BC_SUPPORTS_RMMOD_CMD@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
Lloh6:
	adrp	x8, _DRV_MSG_CODE_RMMOD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DRV_MSG_CODE_RMMOD@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_bnx2x_fw_command
LBB0_6:
	cbz	w22, LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_unregister_netdev
	b	LBB0_9
LBB0_8:
	bl	_rtnl_lock
	mov	x0, x20
	bl	_dev_close
	bl	_rtnl_unlock
LBB0_9:
	mov	x0, x21
	bl	_bnx2x_iov_remove_one
	mov	x0, x21
	bl	_IS_PF
	cbz	x0, LBB0_11
; %bb.10:
Lloh9:
	adrp	x8, _PCI_D0@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PCI_D0@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_bnx2x_set_power_state
Lloh12:
	adrp	x8, _OS_DRIVER_STATE_NOT_LOADED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _OS_DRIVER_STATE_NOT_LOADED@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_bnx2x_set_os_driver_state
	mov	x0, x21
	bl	_bnx2x_reset_endianity
LBB0_11:
	mov	x0, x21
	bl	_bnx2x_disable_msi
	mov	x0, x21
	bl	_IS_PF
Lloh15:
	adrp	x23, _PCI_D3hot@GOTPAGE
Lloh16:
	ldr	x23, [x23, _PCI_D3hot@GOTPAGEOFF]
	cbz	x0, LBB0_13
; %bb.12:
	ldr	w1, [x23]
	mov	x0, x21
	bl	_bnx2x_set_power_state
LBB0_13:
	add	x0, x21, #28
	bl	_cancel_delayed_work_sync
	mov	x0, x21
	bl	_IS_VF
	cbz	x0, LBB0_15
; %bb.14:
	mov	x0, x21
	bl	_bnx2x_vfpf_release
LBB0_15:
Lloh17:
	adrp	x8, _system_state@GOTPAGE
Lloh18:
	ldr	x8, [x8, _system_state@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
Lloh20:
	adrp	x9, _SYSTEM_POWER_OFF@GOTPAGE
Lloh21:
	ldr	x9, [x9, _SYSTEM_POWER_OFF@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.16:
	ldr	w1, [x21, #24]
	mov	x0, x19
	bl	_pci_wake_from_d3
	ldr	w1, [x23]
	mov	x0, x19
	bl	_pci_set_power_state
LBB0_17:
	mov	x0, x21
	bl	_bnx2x_disable_pcie_error_reporting
	cbz	w22, LBB0_24
; %bb.18:
	ldr	x0, [x21, #16]
	cbz	x0, LBB0_20
; %bb.19:
	bl	_iounmap
LBB0_20:
	mov	x0, x21
	bl	_IS_PF
	cbz	x0, LBB0_25
; %bb.21:
	ldr	x0, [x21, #8]
	cbz	x0, LBB0_23
; %bb.22:
	bl	_iounmap
LBB0_23:
	mov	x0, x21
	bl	_bnx2x_release_firmware
	b	LBB0_26
LBB0_24:
	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_25:
	mov	x0, x21
	bl	_bnx2x_vf_pci_dealloc
LBB0_26:
	mov	x0, x21
	bl	_bnx2x_free_mem_bp
	mov	x0, x20
	bl	_free_netdev
	mov	x0, x19
	bl	_atomic_read
	cmp	w0, #1
	b.ne	LBB0_28
; %bb.27:
	mov	x0, x19
	bl	_pci_release_regions
LBB0_28:
	mov	x0, x19
	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
	b	_pci_disable_device
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_NETDEV_HW_ADDR_T_SAN,4,2       ; @NETDEV_HW_ADDR_T_SAN
	.comm	_BC_SUPPORTS_RMMOD_CMD,4,2      ; @BC_SUPPORTS_RMMOD_CMD
	.comm	_DRV_MSG_CODE_RMMOD,4,2         ; @DRV_MSG_CODE_RMMOD
	.comm	_PCI_D0,4,2                     ; @PCI_D0
	.comm	_OS_DRIVER_STATE_NOT_LOADED,4,2 ; @OS_DRIVER_STATE_NOT_LOADED
	.comm	_PCI_D3hot,4,2                  ; @PCI_D3hot
	.comm	_system_state,8,3               ; @system_state
	.comm	_SYSTEM_POWER_OFF,8,3           ; @SYSTEM_POWER_OFF
	.no_dead_strip	___bnx2x_remove
.subsections_via_symbols
