	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_sp_post                  ## -- Begin function bnx2x_sp_post
	.p2align	4, 0x90
_bnx2x_sp_post:                         ## @bnx2x_sp_post
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $r9d killed $r9d def $r9
                                        ## kill: def $r8d killed $r8d def $r8
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r14d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r12
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, %edi
	movq	%r9, %r13
	movl	%r9d, %esi
	callq	_bnx2x_is_contextless_ramrod
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_spin_lock_bh
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.1:
	leaq	4(%r12), %rdi
	callq	_atomic_read
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_3
LBB0_4:
	leaq	8(%r12), %rdi
	callq	_atomic_read
	testl	%eax, %eax
	je	LBB0_5
LBB0_6:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_bnx2x_sp_get_next
	movq	%rax, %r15
	movq	_SPE_HDR_CMD_ID_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	shll	%cl, %ebx
	movq	%r12, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_HW_CID
	orl	%eax, %ebx
	movl	%ebx, %edi
	callq	_cpu_to_le32
	movq	%rax, 24(%r15)
	movq	_SPE_HDR_FUNCTION_ID@GOTPCREL(%rip), %rbx
	testl	%r13d, (%rbx)
	jne	LBB0_8
## %bb.7:
	movq	_SPE_HDR_CONN_TYPE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r13d
	movq	_SPE_HDR_CONN_TYPE@GOTPCREL(%rip), %rax
	andl	(%rax), %r13d
	movq	%r12, %rdi
	callq	_BP_FUNC
	movq	_SPE_HDR_FUNCTION_ID_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	andl	(%rbx), %eax
	orl	%r13d, %eax
	movl	%eax, %r13d
LBB0_8:
	movq	%r13, -96(%rbp)                 ## 8-byte Spill
	movl	%r13d, %edi
	callq	_cpu_to_le16
	movl	%eax, 16(%r15)
	movl	%r14d, %edi
	callq	_cpu_to_le32
	movq	%rax, 8(%r15)
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_cpu_to_le32
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	leaq	8(%r12), %r14
	leaq	4(%r12), %r13
	cmpl	$0, -64(%rbp)                   ## 4-byte Folded Reload
	movq	%rax, (%r15)
	movq	%r13, %rdi
	cmoveq	%r14, %rdi
	callq	_atomic_dec
	movq	_BNX2X_MSG_SP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	32(%r12), %edi
	movl	36(%r12), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	callq	_U64_HI
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	32(%r12), %edi
	callq	_U64_LO
	movl	%eax, %ebx
	addl	24(%r12), %ebx
	subl	16(%r12), %ebx
	movq	%r12, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_HW_CID
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_atomic_read
	movl	%eax, %r14d
	movq	%r13, %rdi
	callq	_atomic_read
                                        ## kill: def $eax killed $eax def $rax
	subq	$8, %rsp
	leaq	L_.str.2(%rip), %rsi
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	%ebx, %r8d
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	pushq	%rax
	pushq	%r14
	pushq	-96(%rbp)                       ## 8-byte Folded Reload
	pushq	-72(%rbp)                       ## 8-byte Folded Reload
	pushq	-88(%rbp)                       ## 8-byte Folded Reload
	pushq	%r15
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	callq	_DP
	addq	$64, %rsp
	movq	%r12, %rdi
	callq	_bnx2x_sp_prod_update
	movq	%r12, %rdi
	callq	_spin_unlock_bh
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
LBB0_3:
	callq	_BNX2X_ERR
	movq	%r12, %rdi
	callq	_spin_unlock_bh
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_bnx2x_panic
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BUG! EQ ring full!\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.1:                               ## @.str.1
	.asciz	"BUG! SPQ ring full!\n"

	.comm	_SPE_HDR_CMD_ID_SHIFT,4,2       ## @SPE_HDR_CMD_ID_SHIFT
	.comm	_SPE_HDR_FUNCTION_ID,4,2        ## @SPE_HDR_FUNCTION_ID
	.comm	_SPE_HDR_CONN_TYPE_SHIFT,4,2    ## @SPE_HDR_CONN_TYPE_SHIFT
	.comm	_SPE_HDR_CONN_TYPE,4,2          ## @SPE_HDR_CONN_TYPE
	.comm	_SPE_HDR_FUNCTION_ID_SHIFT,4,2  ## @SPE_HDR_FUNCTION_ID_SHIFT
	.comm	_BNX2X_MSG_SP,4,2               ## @BNX2X_MSG_SP
L_.str.2:                               ## @.str.2
	.asciz	"SPQE[%x] (%x:%x)  (cmd, common?) (%d,%d)  hw_cid %x  data (%x:%x) type(0x%x) left (CQ, EQ) (%x,%x)\n"

	.comm	_EIO,4,2                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_sp_post                  ; -- Begin function bnx2x_sp_post
	.p2align	2
_bnx2x_sp_post:                         ; @bnx2x_sp_post
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x24, x5
	mov	x23, x4
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	mov	x1, x5
	bl	_bnx2x_is_contextless_ramrod
	mov	x28, x0
	mov	x0, x19
	bl	_spin_lock_bh
	cbz	w28, LBB0_3
; %bb.1:
	add	x0, x19, #4
	bl	_atomic_read
	cbnz	w0, LBB0_4
; %bb.2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_3:
	add	x0, x19, #8
	bl	_atomic_read
	cbz	w0, LBB0_7
LBB0_4:
	mov	x0, x19
	bl	_bnx2x_sp_get_next
	mov	x26, x0
Lloh2:
	adrp	x8, _SPE_HDR_CMD_ID_SHIFT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SPE_HDR_CMD_ID_SHIFT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	stp	w21, w20, [sp, #40]             ; 8-byte Folded Spill
	lsl	w20, w20, w8
	mov	x0, x19
	mov	x1, x21
	bl	_HW_CID
	orr	w0, w20, w0
	bl	_cpu_to_le32
	str	x0, [x26, #24]
Lloh5:
	adrp	x20, _SPE_HDR_FUNCTION_ID@GOTPAGE
Lloh6:
	ldr	x20, [x20, _SPE_HDR_FUNCTION_ID@GOTPAGEOFF]
	ldr	w8, [x20]
	tst	w8, w24
	b.ne	LBB0_6
; %bb.5:
Lloh7:
	adrp	x8, _SPE_HDR_CONN_TYPE_SHIFT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SPE_HDR_CONN_TYPE_SHIFT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	lsl	w8, w24, w8
Lloh10:
	adrp	x9, _SPE_HDR_CONN_TYPE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SPE_HDR_CONN_TYPE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	and	w21, w8, w9
	mov	x0, x19
	bl	_BP_FUNC
Lloh13:
	adrp	x8, _SPE_HDR_FUNCTION_ID_SHIFT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SPE_HDR_FUNCTION_ID_SHIFT@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	lsl	w8, w0, w8
	ldr	w9, [x20]
	and	w8, w8, w9
	orr	w24, w8, w21
LBB0_6:
	mov	x0, x24
	bl	_cpu_to_le16
	str	w0, [x26, #16]
	mov	x0, x22
	bl	_cpu_to_le32
	str	x0, [x26, #8]
	mov	x0, x23
	bl	_cpu_to_le32
	str	x0, [x26]
	add	x26, x19, #8
	add	x27, x19, #4
	cmp	w28, #0
	csel	x0, x26, x27, eq
	bl	_atomic_dec
Lloh16:
	adrp	x8, _BNX2X_MSG_SP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BNX2X_MSG_SP@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x8]
	ldp	w0, w8, [x19, #32]
	stp	w9, w8, [sp, #32]               ; 8-byte Folded Spill
	bl	_U64_HI
	mov	x21, x0
	ldr	w0, [x19, #32]
	bl	_U64_LO
	ldr	w8, [x19, #24]
	ldr	w9, [x19, #16]
	add	w8, w8, w0
	sub	w25, w8, w9
	mov	x0, x19
	ldr	w1, [sp, #40]                   ; 4-byte Folded Reload
	bl	_HW_CID
	mov	x20, x0
	mov	x0, x26
	bl	_atomic_read
	mov	x26, x0
	mov	x0, x27
	bl	_atomic_read
	stp	w26, w0, [sp, #12]
	stp	w23, w24, [sp, #4]
	str	w22, [sp]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	ldp	w0, w2, [sp, #32]               ; 8-byte Folded Reload
	mov	x3, x21
	mov	x4, x25
	ldr	w5, [sp, #44]                   ; 4-byte Folded Reload
	mov	x6, x28
	mov	x7, x20
	bl	_DP
	mov	x0, x19
	bl	_bnx2x_sp_prod_update
	mov	x0, x19
	bl	_spin_unlock_bh
	mov	w0, #0
	b	LBB0_9
LBB0_7:
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_8:
	bl	_BNX2X_ERR
	mov	x0, x19
	bl	_spin_unlock_bh
	bl	_bnx2x_panic
Lloh23:
	adrp	x8, _EBUSY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BUG! EQ ring full!\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.1:                               ; @.str.1
	.asciz	"BUG! SPQ ring full!\n"

	.comm	_SPE_HDR_CMD_ID_SHIFT,4,2       ; @SPE_HDR_CMD_ID_SHIFT
	.comm	_SPE_HDR_FUNCTION_ID,4,2        ; @SPE_HDR_FUNCTION_ID
	.comm	_SPE_HDR_CONN_TYPE_SHIFT,4,2    ; @SPE_HDR_CONN_TYPE_SHIFT
	.comm	_SPE_HDR_CONN_TYPE,4,2          ; @SPE_HDR_CONN_TYPE
	.comm	_SPE_HDR_FUNCTION_ID_SHIFT,4,2  ; @SPE_HDR_FUNCTION_ID_SHIFT
	.comm	_BNX2X_MSG_SP,4,2               ; @BNX2X_MSG_SP
l_.str.2:                               ; @.str.2
	.asciz	"SPQE[%x] (%x:%x)  (cmd, common?) (%d,%d)  hw_cid %x  data (%x:%x) type(0x%x) left (CQ, EQ) (%x,%x)\n"

	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
