	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cnic_submit_bnx2_kwqes
_cnic_submit_bnx2_kwqes:                ## @cnic_submit_bnx2_kwqes
	.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
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	8(%rdi), %r12
	movq	_CNIC_F_CNIC_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	leaq	8(%r12), %r14
	movq	%r14, %rdi
	callq	_spin_lock_bh
	movq	%r12, %rdi
	callq	_cnic_kwq_avail
	cmpq	%r13, %rax
	jge	LBB0_5
## %bb.3:
	movq	_CNIC_LCL_FL_KWQ_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	24(%r12), %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_4
LBB0_5:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	_CNIC_LCL_FL_KWQ_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	24(%r12), %rsi
	callq	_clear_bit
	movq	(%r12), %r15
	testq	%r13, %r13
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	jle	LBB0_8
## %bb.6:
	movq	_MAX_KWQ_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	andq	%r15, %r14
	negq	%r13
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movl	$1, %r13d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rbx
	movq	%r14, %rdi
	callq	_KWQ_PG
	movq	(%rbx,%rax,8), %rbx
	movq	%r14, %rdi
	callq	_KWQ_IDX
	leaq	(%rbx,%rax,4), %rdi
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	-8(%rax,%r13,8), %rsi
	movl	$4, %edx
	callq	_memcpy
	incq	%r15
	movq	_MAX_KWQ_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	andq	%r15, %r14
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addq	%r13, %rax
	incq	%rax
	incq	%r13
	cmpq	$1, %rax
	jne	LBB0_7
LBB0_8:
	movq	%r15, (%r12)
	movl	12(%r12), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_CNIC_WR16
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_bh
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_4:
	movq	%r14, %rdi
	callq	_spin_unlock_bh
LBB0_1:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CNIC_F_CNIC_UP,4,2             ## @CNIC_F_CNIC_UP
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_CNIC_LCL_FL_KWQ_INIT,4,2       ## @CNIC_LCL_FL_KWQ_INIT
	.comm	_MAX_KWQ_IDX,8,3                ## @MAX_KWQ_IDX
	.no_dead_strip	_cnic_submit_bnx2_kwqes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cnic_submit_bnx2_kwqes
_cnic_submit_bnx2_kwqes:                ; @cnic_submit_bnx2_kwqes
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x0
	ldr	x20, [x0, #8]
Lloh0:
	adrp	x8, _CNIC_F_CNIC_UP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CNIC_F_CNIC_UP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_bit
	cbz	w0, LBB0_8
; %bb.1:
	add	x21, x20, #8
	mov	x0, x21
	bl	_spin_lock_bh
	mov	x0, x20
	bl	_cnic_kwq_avail
Lloh3:
	adrp	x24, _CNIC_LCL_FL_KWQ_INIT@GOTPAGE
Lloh4:
	ldr	x24, [x24, _CNIC_LCL_FL_KWQ_INIT@GOTPAGEOFF]
	cmp	x0, x22
	b.ge	LBB0_3
; %bb.2:
	ldr	w0, [x24]
	add	x1, x20, #24
	bl	_test_bit
	cbz	w0, LBB0_7
LBB0_3:
	ldr	w0, [x24]
	add	x1, x20, #24
	bl	_clear_bit
	ldr	x24, [x20]
	cmp	x22, #1
	b.lt	LBB0_6
; %bb.4:
Lloh5:
	adrp	x26, _MAX_KWQ_IDX@GOTPAGE
Lloh6:
	ldr	x26, [x26, _MAX_KWQ_IDX@GOTPAGEOFF]
	ldr	x8, [x26]
	and	x25, x8, x24
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x27, [x20, #16]
	mov	x0, x25
	bl	_KWQ_PG
	ldr	x27, [x27, x0, lsl #3]
	mov	x0, x25
	bl	_KWQ_IDX
	add	x0, x27, x0, lsl #2
	ldr	x1, [x23], #8
	mov	w2, #4
	bl	_memcpy
	add	x24, x24, #1
	ldr	x8, [x26]
	and	x25, x8, x24
	subs	x22, x22, #1
	b.ne	LBB0_5
LBB0_6:
	str	x24, [x20]
	ldr	w1, [x20, #12]
	mov	x0, x19
	mov	x2, x24
	bl	_CNIC_WR16
	mov	x0, x21
	bl	_spin_unlock_bh
	mov	w0, #0
	b	LBB0_9
LBB0_7:
	mov	x0, x21
	bl	_spin_unlock_bh
LBB0_8:
Lloh7:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_CNIC_F_CNIC_UP,4,2             ; @CNIC_F_CNIC_UP
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_CNIC_LCL_FL_KWQ_INIT,4,2       ; @CNIC_LCL_FL_KWQ_INIT
	.comm	_MAX_KWQ_IDX,8,3                ; @MAX_KWQ_IDX
	.no_dead_strip	_cnic_submit_bnx2_kwqes
.subsections_via_symbols
