	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_func_state_change_comp
_bnx2x_func_state_change_comp:          ## @bnx2x_func_state_change_comp
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	(%rsi), %rax
	movq	%rax, -40(%rbp)
	leaq	-40(%rbp), %rsi
	movl	%edx, %edi
	callq	_test_and_clear_bit
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_BNX2X_MSG_SP@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r15, %rdi
	callq	_BP_FUNC
	movl	8(%rbx), %r8d
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_DP
	movl	8(%rbx), %eax
	movl	%eax, 12(%rbx)
	movq	_BNX2X_F_STATE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_wmb
	movl	%r14d, %edi
	movq	%rbx, %rsi
	callq	_clear_bit
	xorl	%eax, %eax
	callq	_smp_mb__after_atomic
	jmp	LBB0_3
LBB0_1:
	movq	%r15, %rdi
	callq	_BP_FUNC
	movl	8(%rbx), %r9d
	movl	12(%rbx), %ecx
	movq	-40(%rbp), %r8
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_BNX2X_ERR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_3:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Bad MC reply %d for func %d in state %d pending 0x%lx, next_state %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BNX2X_MSG_SP,4,2               ## @BNX2X_MSG_SP
L_.str.1:                               ## @.str.1
	.asciz	"Completing command %d for func %d, setting state to %d\n"

	.comm	_BNX2X_F_STATE_MAX,4,2          ## @BNX2X_F_STATE_MAX
	.no_dead_strip	_bnx2x_func_state_change_comp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_func_state_change_comp
_bnx2x_func_state_change_comp:          ; @bnx2x_func_state_change_comp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x8, [x1]
	str	x8, [sp, #8]
	add	x1, sp, #8
	mov	x0, x2
	bl	_test_and_clear_bit
	cbz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _BNX2X_MSG_SP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BNX2X_MSG_SP@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	mov	x0, x21
	bl	_BP_FUNC
	mov	x3, x0
	ldr	w4, [x20, #8]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	x2, x19
	bl	_DP
	ldr	w8, [x20, #8]
Lloh5:
	adrp	x9, _BNX2X_F_STATE_MAX@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BNX2X_F_STATE_MAX@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #8]
	bl	_wmb
	mov	x0, x19
	mov	x1, x20
	bl	_clear_bit
	bl	_smp_mb__after_atomic
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	mov	x0, x21
	bl	_BP_FUNC
	mov	x2, x0
	ldr	x4, [sp, #8]
	ldp	w5, w3, [x20, #8]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_BNX2X_ERR
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Bad MC reply %d for func %d in state %d pending 0x%lx, next_state %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BNX2X_MSG_SP,4,2               ; @BNX2X_MSG_SP
l_.str.1:                               ; @.str.1
	.asciz	"Completing command %d for func %d, setting state to %d\n"

	.comm	_BNX2X_F_STATE_MAX,4,2          ; @BNX2X_F_STATE_MAX
	.no_dead_strip	_bnx2x_func_state_change_comp
.subsections_via_symbols
