	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_fw_command               ## -- Begin function bnx2x_fw_command
	.p2align	4, 0x90
_bnx2x_fw_command:                      ## @bnx2x_fw_command
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_BP_FW_MB_IDX
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_CHIP_REV_IS_SLOW
	testq	%rax, %rax
	movl	$10, %eax
	movl	$100, %r12d
	cmovel	%eax, %r12d
	leaq	4(%rbx), %rdi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movl	(%rbx), %r13d
	incl	%r13d
	movl	%r13d, (%rbx)
	movq	_func_mb@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r15d, %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	leaq	(,%rcx,4), %rcx
	leaq	(%rcx,%rcx,2), %r15
	movl	8(%rax,%r15), %esi
	movq	%rbx, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_SHMEM_WR
	movq	_func_mb@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	4(%rax,%r15), %esi
	orl	%r13d, %r14d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_SHMEM_WR
	movq	_BNX2X_MSG_MCP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_DP
	movl	$1, %ebx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%rax,2), %r15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	callq	_msleep
	movq	_func_mb@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r15,4), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_SHMEM_RD
	movl	%eax, %r14d
	movq	_FW_MSG_SEQ_NUMBER_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r14d, %eax
	cmpl	%eax, %r13d
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	%ebx
	cmpl	$501, %ebx                      ## imm = 0x1F5
	jne	LBB0_1
## %bb.3:
	movl	$501, %ebx                      ## imm = 0x1F5
LBB0_4:
	movq	_BNX2X_MSG_MCP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	imull	%r12d, %ebx
	leaq	L_.str.1(%rip), %rsi
	xorl	%r12d, %r12d
	movl	%ebx, %edx
	movl	%r14d, %ecx
	movl	%r13d, %r8d
	xorl	%eax, %eax
	callq	_DP
	movq	_FW_MSG_SEQ_NUMBER_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r14d, %eax
	cmpl	%eax, %r13d
	jne	LBB0_6
## %bb.5:
	movq	_FW_MSG_CODE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r14d
	movl	%r14d, %r12d
	jmp	LBB0_7
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
	callq	_BNX2X_ERR
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_bnx2x_fw_dump
LBB0_7:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_func_mb,8,3                    ## @func_mb
	.comm	_BNX2X_MSG_MCP,4,2              ## @BNX2X_MSG_MCP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wrote command (%x) to FW MB param 0x%08x\n"

	.comm	_FW_MSG_SEQ_NUMBER_MASK,4,2     ## @FW_MSG_SEQ_NUMBER_MASK
L_.str.1:                               ## @.str.1
	.asciz	"[after %d ms] read (%x) seq is (%x) from FW MB\n"

	.comm	_FW_MSG_CODE_MASK,4,2           ## @FW_MSG_CODE_MASK
L_.str.2:                               ## @.str.2
	.asciz	"FW failed to respond!\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_fw_command               ; -- Begin function bnx2x_fw_command
	.p2align	2
_bnx2x_fw_command:                      ; @bnx2x_fw_command
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x2
	mov	x23, x1
	mov	x20, x0
	bl	_BP_FW_MB_IDX
	mov	x24, x0
	mov	x0, x20
	bl	_CHIP_REV_IS_SLOW
	cmp	x0, #0
	mov	w8, #100
	mov	w9, #10
	csel	w21, w9, w8, eq
	add	x19, x20, #4
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x20]
	add	w25, w8, #1
	str	w25, [x20]
Lloh0:
	adrp	x26, _func_mb@GOTPAGE
Lloh1:
	ldr	x26, [x26, _func_mb@GOTPAGEOFF]
	ldr	x8, [x26]
	sxtw	x28, w24
	add	x9, x28, w24, sxtw #1
	lsl	x24, x9, #2
	add	x8, x8, x24
	ldr	w1, [x8, #8]
	mov	x0, x20
	mov	x2, x22
	bl	_SHMEM_WR
	ldr	x8, [x26]
	add	x8, x8, x24
	ldr	w1, [x8, #4]
	orr	w23, w25, w23
	mov	x0, x20
	mov	x2, x23
	bl	_SHMEM_WR
Lloh2:
	adrp	x24, _BNX2X_MSG_MCP@GOTPAGE
Lloh3:
	ldr	x24, [x24, _BNX2X_MSG_MCP@GOTPAGEOFF]
	ldr	w0, [x24]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	mov	x3, x22
	bl	_DP
	mov	w27, #1
	mov	w8, #12
	mul	x28, x28, x8
Lloh6:
	adrp	x23, _FW_MSG_SEQ_NUMBER_MASK@GOTPAGE
Lloh7:
	ldr	x23, [x23, _FW_MSG_SEQ_NUMBER_MASK@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_msleep
	ldr	x8, [x26]
	ldr	w1, [x8, x28]
	mov	x0, x20
	bl	_SHMEM_RD
	mov	x22, x0
	ldr	w8, [x23]
	and	w8, w8, w0
	cmp	w25, w8
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w27, w27, #1
	cmp	w27, #501
	b.ne	LBB0_1
LBB0_3:
	ldr	w0, [x24]
	mul	w2, w27, w21
	str	x25, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, x22
	bl	_DP
	ldr	w8, [x23]
	and	w8, w8, w22
	cmp	w25, w8
	b.ne	LBB0_5
; %bb.4:
Lloh10:
	adrp	x8, _FW_MSG_CODE_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FW_MSG_CODE_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	and	w20, w8, w22
	b	LBB0_6
LBB0_5:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_BNX2X_ERR
	mov	x0, x20
	bl	_bnx2x_fw_dump
	mov	w20, #0
LBB0_6:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_func_mb,8,3                    ; @func_mb
	.comm	_BNX2X_MSG_MCP,4,2              ; @BNX2X_MSG_MCP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wrote command (%x) to FW MB param 0x%08x\n"

	.comm	_FW_MSG_SEQ_NUMBER_MASK,4,2     ; @FW_MSG_SEQ_NUMBER_MASK
l_.str.1:                               ; @.str.1
	.asciz	"[after %d ms] read (%x) seq is (%x) from FW MB\n"

	.comm	_FW_MSG_CODE_MASK,4,2           ; @FW_MSG_CODE_MASK
l_.str.2:                               ; @.str.2
	.asciz	"FW failed to respond!\n"

.subsections_via_symbols
