	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_send_unload_req          ## -- Begin function bnx2x_send_unload_req
	.p2align	4, 0x90
_bnx2x_send_unload_req:                 ## @bnx2x_send_unload_req
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r12
	callq	_BP_PORT
	movl	%eax, %r14d
	movq	_UNLOAD_NORMAL@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_1
LBB0_5:
	movq	_DRV_MSG_CODE_UNLOAD_REQ_WOL_DIS@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_1:
	movq	_NO_WOL_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_3
## %bb.2:
	movq	_DRV_MSG_CODE_UNLOAD_REQ_WOL_MCP@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_3:
	cmpq	$0, 32(%r12)
	je	LBB0_5
## %bb.4:
	movq	24(%r12), %rax
	movq	(%rax), %rbx
	movq	%r12, %rdi
	callq	_BP_VN
	movl	(%rbx), %edx
	shll	$8, %edx
	orl	4(%rbx), %edx
	movl	%eax, %r15d
	movq	_EMAC_REG_EMAC_MAC_MATCH@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	leal	(%rax,%r15,8), %esi
	addl	$8, %esi
	movq	%r12, %rdi
	callq	_EMAC_WR
	movl	8(%rbx), %eax
	movl	12(%rbx), %ecx
	shll	$24, %eax
	shll	$16, %ecx
	orl	%eax, %ecx
	movl	16(%rbx), %edx
	shll	$8, %edx
	orl	%ecx, %edx
	orl	20(%rbx), %edx
	movl	(%r13), %eax
	leal	(%rax,%r15,8), %esi
	addl	$12, %esi
	movq	%r12, %rdi
	callq	_EMAC_WR
	movl	16(%r12), %edi
	movq	_PCI_PM_CTRL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	addq	8(%r12), %rsi
	leaq	-44(%rbp), %rdx
	callq	_pci_read_config_word
	movq	_PCI_PM_CTRL_PME_ENABLE@GOTPCREL(%rip), %rax
	movq	_PCI_PM_CTRL_PME_STATUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	orl	-44(%rbp), %edx
	movl	%edx, -44(%rbp)
	movl	16(%r12), %edi
	movq	(%rbx), %rsi
	addq	8(%r12), %rsi
	callq	_pci_write_config_word
	movq	_DRV_MSG_CODE_UNLOAD_REQ_WOL_EN@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %r15d
	movq	%r12, %rdi
	callq	_BP_NOMCP
	movq	%r12, %rdi
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	callq	_BP_PATH
	movq	_NETIF_MSG_IFDOWN@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_load_count@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movslq	%eax, %rbx
	movq	(%rcx,%rbx,8), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %r8
	movq	16(%rax), %r9
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_DP
	movq	(%r15), %rax
	movq	(%rax,%rbx,8), %rax
	decq	(%rax)
	movslq	%r14d, %r14
	decq	8(%rax,%r14,8)
	movl	(%r12), %edi
	movq	(%rax), %rcx
	movq	8(%rax), %r8
	movq	16(%rax), %r9
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	callq	_DP
	movq	(%r15), %rax
	movq	(%rax,%rbx,8), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.10:
	incq	%r14
	cmpq	$0, (%rax,%r14,8)
	jne	LBB0_11
## %bb.12:
	movq	_FW_MSG_CODE_DRV_UNLOAD_PORT@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_7:
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_bnx2x_fw_command
	jmp	LBB0_14
LBB0_9:
	movq	_FW_MSG_CODE_DRV_UNLOAD_COMMON@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_11:
	movq	_FW_MSG_CODE_DRV_UNLOAD_FUNCTION@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UNLOAD_NORMAL,4,2              ## @UNLOAD_NORMAL
	.comm	_DRV_MSG_CODE_UNLOAD_REQ_WOL_DIS,4,2 ## @DRV_MSG_CODE_UNLOAD_REQ_WOL_DIS
	.comm	_NO_WOL_FLAG,4,2                ## @NO_WOL_FLAG
	.comm	_DRV_MSG_CODE_UNLOAD_REQ_WOL_MCP,4,2 ## @DRV_MSG_CODE_UNLOAD_REQ_WOL_MCP
	.comm	_GRCBASE_EMAC1,4,2              ## @GRCBASE_EMAC1
	.comm	_GRCBASE_EMAC0,4,2              ## @GRCBASE_EMAC0
	.comm	_EMAC_REG_EMAC_MAC_MATCH,4,2    ## @EMAC_REG_EMAC_MAC_MATCH
	.comm	_PCI_PM_CTRL,8,3                ## @PCI_PM_CTRL
	.comm	_PCI_PM_CTRL_PME_ENABLE,4,2     ## @PCI_PM_CTRL_PME_ENABLE
	.comm	_PCI_PM_CTRL_PME_STATUS,4,2     ## @PCI_PM_CTRL_PME_STATUS
	.comm	_DRV_MSG_CODE_UNLOAD_REQ_WOL_EN,4,2 ## @DRV_MSG_CODE_UNLOAD_REQ_WOL_EN
	.comm	_NETIF_MSG_IFDOWN,4,2           ## @NETIF_MSG_IFDOWN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NO MCP - load counts[%d]      %d, %d, %d\n"

	.comm	_load_count,8,3                 ## @load_count
L_.str.1:                               ## @.str.1
	.asciz	"NO MCP - new load counts[%d]  %d, %d, %d\n"

	.comm	_FW_MSG_CODE_DRV_UNLOAD_COMMON,4,2 ## @FW_MSG_CODE_DRV_UNLOAD_COMMON
	.comm	_FW_MSG_CODE_DRV_UNLOAD_PORT,4,2 ## @FW_MSG_CODE_DRV_UNLOAD_PORT
	.comm	_FW_MSG_CODE_DRV_UNLOAD_FUNCTION,4,2 ## @FW_MSG_CODE_DRV_UNLOAD_FUNCTION
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_send_unload_req          ; -- Begin function bnx2x_send_unload_req
	.p2align	2
_bnx2x_send_unload_req:                 ; @bnx2x_send_unload_req
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x1
	mov	x20, x0
	bl	_BP_PORT
	mov	x19, x0
Lloh0:
	adrp	x8, _UNLOAD_NORMAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UNLOAD_NORMAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_2
LBB0_1:
Lloh3:
	adrp	x8, _DRV_MSG_CODE_UNLOAD_REQ_WOL_DIS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRV_MSG_CODE_UNLOAD_REQ_WOL_DIS@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:
	ldr	w8, [x20]
Lloh5:
	adrp	x9, _NO_WOL_FLAG@GOTPAGE
Lloh6:
	ldr	x9, [x9, _NO_WOL_FLAG@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
Lloh8:
	adrp	x8, _DRV_MSG_CODE_UNLOAD_REQ_WOL_MCP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DRV_MSG_CODE_UNLOAD_REQ_WOL_MCP@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_1
; %bb.5:
	ldr	x8, [x20, #24]
	ldr	x21, [x8]
	mov	x0, x20
	bl	_BP_VN
	lsl	w22, w0, #3
Lloh10:
	adrp	x23, _EMAC_REG_EMAC_MAC_MATCH@GOTPAGE
Lloh11:
	ldr	x23, [x23, _EMAC_REG_EMAC_MAC_MATCH@GOTPAGEOFF]
	ldr	w8, [x23]
	add	w8, w22, w8
	ldp	w9, w10, [x21]
	orr	w2, w10, w9, lsl #8
	add	w1, w8, #8
	mov	x0, x20
	bl	_EMAC_WR
	ldp	w8, w9, [x21, #8]
	lsl	w9, w9, #16
	orr	w8, w9, w8, lsl #24
	ldp	w9, w10, [x21, #16]
	orr	w8, w8, w9, lsl #8
	orr	w2, w8, w10
	ldr	w8, [x23]
	add	w8, w22, w8
	add	w1, w8, #12
	mov	x0, x20
	bl	_EMAC_WR
	ldr	w0, [x20, #16]
	ldr	x8, [x20, #8]
Lloh12:
	adrp	x21, _PCI_PM_CTRL@GOTPAGE
Lloh13:
	ldr	x21, [x21, _PCI_PM_CTRL@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x1, x9, x8
	add	x2, sp, #12
	bl	_pci_read_config_word
Lloh14:
	adrp	x8, _PCI_PM_CTRL_PME_ENABLE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PCI_PM_CTRL_PME_ENABLE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _PCI_PM_CTRL_PME_STATUS@GOTPAGE
Lloh18:
	ldr	x9, [x9, _PCI_PM_CTRL_PME_STATUS@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [sp, #12]
	orr	w2, w8, w9
	str	w2, [sp, #12]
	ldr	w0, [x20, #16]
	ldr	x8, [x20, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_pci_write_config_word
Lloh20:
	adrp	x8, _DRV_MSG_CODE_UNLOAD_REQ_WOL_EN@GOTPAGE
Lloh21:
	ldr	x8, [x8, _DRV_MSG_CODE_UNLOAD_REQ_WOL_EN@GOTPAGEOFF]
LBB0_6:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_BP_NOMCP
	cbz	w0, LBB0_9
; %bb.7:
	mov	x0, x20
	bl	_BP_PATH
	mov	x20, x0
Lloh22:
	adrp	x21, _NETIF_MSG_IFDOWN@GOTPAGE
Lloh23:
	ldr	x21, [x21, _NETIF_MSG_IFDOWN@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh24:
	adrp	x22, _load_count@GOTPAGE
Lloh25:
	ldr	x22, [x22, _load_count@GOTPAGEOFF]
	ldr	x8, [x22]
	sbfiz	x23, x20, #3, #32
	ldr	x8, [x8, x23]
	ldp	x3, x4, [x8]
	ldr	x5, [x8, #16]
Lloh26:
	adrp	x1, l_.str@PAGE
Lloh27:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_DP
	ldr	x8, [x22]
	ldr	x8, [x8, x23]
	ldr	x9, [x8]
	sub	x9, x9, #1
	str	x9, [x8]
	add	w19, w19, #1
	sbfiz	x9, x19, #3, #32
	ldr	x10, [x8, x9]
	sub	x10, x10, #1
	str	x10, [x8, x9]
	ldr	w0, [x21]
	ldp	x3, x4, [x8]
	ldr	x5, [x8, #16]
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_DP
	ldr	x8, [x22]
	ldr	x8, [x8, x23]
	ldr	x9, [x8]
	cbz	x9, LBB0_10
; %bb.8:
	sxtw	x9, w19
	ldr	x8, [x8, x9, lsl #3]
Lloh30:
	adrp	x9, _FW_MSG_CODE_DRV_UNLOAD_FUNCTION@GOTPAGE
Lloh31:
	ldr	x9, [x9, _FW_MSG_CODE_DRV_UNLOAD_FUNCTION@GOTPAGEOFF]
Lloh32:
	adrp	x10, _FW_MSG_CODE_DRV_UNLOAD_PORT@GOTPAGE
Lloh33:
	ldr	x10, [x10, _FW_MSG_CODE_DRV_UNLOAD_PORT@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	b	LBB0_11
LBB0_9:
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	_bnx2x_fw_command
	b	LBB0_12
LBB0_10:
Lloh34:
	adrp	x8, _FW_MSG_CODE_DRV_UNLOAD_COMMON@GOTPAGE
Lloh35:
	ldr	x8, [x8, _FW_MSG_CODE_DRV_UNLOAD_COMMON@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_UNLOAD_NORMAL,4,2              ; @UNLOAD_NORMAL
	.comm	_DRV_MSG_CODE_UNLOAD_REQ_WOL_DIS,4,2 ; @DRV_MSG_CODE_UNLOAD_REQ_WOL_DIS
	.comm	_NO_WOL_FLAG,4,2                ; @NO_WOL_FLAG
	.comm	_DRV_MSG_CODE_UNLOAD_REQ_WOL_MCP,4,2 ; @DRV_MSG_CODE_UNLOAD_REQ_WOL_MCP
	.comm	_GRCBASE_EMAC1,4,2              ; @GRCBASE_EMAC1
	.comm	_GRCBASE_EMAC0,4,2              ; @GRCBASE_EMAC0
	.comm	_EMAC_REG_EMAC_MAC_MATCH,4,2    ; @EMAC_REG_EMAC_MAC_MATCH
	.comm	_PCI_PM_CTRL,8,3                ; @PCI_PM_CTRL
	.comm	_PCI_PM_CTRL_PME_ENABLE,4,2     ; @PCI_PM_CTRL_PME_ENABLE
	.comm	_PCI_PM_CTRL_PME_STATUS,4,2     ; @PCI_PM_CTRL_PME_STATUS
	.comm	_DRV_MSG_CODE_UNLOAD_REQ_WOL_EN,4,2 ; @DRV_MSG_CODE_UNLOAD_REQ_WOL_EN
	.comm	_NETIF_MSG_IFDOWN,4,2           ; @NETIF_MSG_IFDOWN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NO MCP - load counts[%d]      %d, %d, %d\n"

	.comm	_load_count,8,3                 ; @load_count
l_.str.1:                               ; @.str.1
	.asciz	"NO MCP - new load counts[%d]  %d, %d, %d\n"

	.comm	_FW_MSG_CODE_DRV_UNLOAD_COMMON,4,2 ; @FW_MSG_CODE_DRV_UNLOAD_COMMON
	.comm	_FW_MSG_CODE_DRV_UNLOAD_PORT,4,2 ; @FW_MSG_CODE_DRV_UNLOAD_PORT
	.comm	_FW_MSG_CODE_DRV_UNLOAD_FUNCTION,4,2 ; @FW_MSG_CODE_DRV_UNLOAD_FUNCTION
.subsections_via_symbols
