	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qlcnic_sriov_handle_bc_cmd
_qlcnic_sriov_handle_bc_cmd:            ## @qlcnic_sriov_handle_bc_cmd
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	16(%rdx), %r12
	cmpq	$0, (%r12)
	je	LBB0_1
LBB0_17:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_QLC_BC_VF_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	24(%rdx), %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	movq	(%r15), %rax
	movq	_QLC_BC_CMD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movq	8(%r15), %rax
	movq	_QLCNIC_BC_CMD_CHANNEL_INIT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
LBB0_4:
	cmpl	$2, 16(%r15)
	jl	LBB0_5
## %bb.18:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_qlcnic_sriov_handle_pending_trans ## TAILCALL
LBB0_5:
	leaq	-56(%rbp), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	8(%r15), %r13
	leaq	-48(%rbp), %rdi
	callq	_qlcnic_sriov_alloc_bc_trans
	testq	%rax, %rax
	jne	LBB0_17
## %bb.6:
	movq	(%r15), %rax
	movq	_QLC_BC_CMD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	leaq	-56(%rbp), %rdi
	movq	%r13, %rsi
	callq	_qlcnic_sriov_alloc_bc_mbx_args
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_11
LBB0_8:
	leaq	-56(%rbp), %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_qlcnic_alloc_mbx_args
	testl	%eax, %eax
	jne	LBB0_10
LBB0_11:
	movq	(%r15), %rax
	movq	%rax, -56(%rbp)
	movq	-48(%rbp), %rdi
	movl	20(%r15), %edx
	movq	_QLC_BC_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-56(%rbp), %rsi
	callq	_qlcnic_sriov_prepare_bc_hdr
	testq	%rax, %rax
	je	LBB0_13
LBB0_12:
	leaq	-56(%rbp), %rdi
	callq	_qlcnic_free_mbx_args
LBB0_10:
	movq	-48(%rbp), %rdi
	callq	_qlcnic_sriov_cleanup_transaction
	jmp	LBB0_17
LBB0_13:
	movq	-48(%rbp), %rax
	movl	(%rax), %esi
	movl	44(%rax), %edi
	callq	_qlcnic_sriov_get_bc_paysize
	movq	16(%rbx), %rdi
	movq	-48(%rbp), %rcx
	movslq	(%rcx), %r8
	leaq	(,%r8,8), %rsi
	addq	16(%rcx), %rsi
	movslq	4(%rcx), %rdx
	addq	%r8, %rdx
	movl	%eax, %ecx
	callq	_qlcnic_sriov_pull_bc_msg
	movl	12(%rbx), %eax
	movq	-48(%rbp), %rsi
	movl	%eax, 40(%rsi)
	movq	%rbx, 32(%rsi)
	movl	20(%r15), %eax
	movl	%eax, 24(%rsi)
	incl	(%rsi)
	movq	%r12, %rdi
	movq	%rbx, %rdx
	callq	_qlcnic_sriov_soft_flr_check
	testq	%rax, %rax
	jne	LBB0_17
## %bb.14:
	movq	-48(%rbp), %rdx
	movslq	(%rdx), %rax
	movq	16(%rdx), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_16
## %bb.15:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_qlcnic_sriov_add_act_list
	testq	%rax, %rax
	jne	LBB0_12
	jmp	LBB0_17
LBB0_16:
	movq	%rbx, %rdi
	callq	_spin_lock
	movq	-48(%rbp), %rdi
	addq	$8, %rdi
	leaq	8(%rbx), %rsi
	callq	_list_add_tail
	incl	4(%rbx)
	movq	%rbx, %rdi
	callq	_spin_unlock
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_QLC_BC_VF_STATE,4,2            ## @QLC_BC_VF_STATE
	.comm	_QLC_BC_CMD,8,3                 ## @QLC_BC_CMD
	.comm	_QLCNIC_BC_CMD_CHANNEL_INIT,8,3 ## @QLCNIC_BC_CMD_CHANNEL_INIT
	.comm	_QLC_BC_COMMAND,4,2             ## @QLC_BC_COMMAND
	.no_dead_strip	_qlcnic_sriov_handle_bc_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qlcnic_sriov_handle_bc_cmd
_qlcnic_sriov_handle_bc_cmd:            ; @qlcnic_sriov_handle_bc_cmd
	.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
	ldr	x21, [x2, #16]
	ldr	x8, [x21]
	cbz	x8, LBB0_2
LBB0_1:
	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
LBB0_2:
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _QLC_BC_VF_STATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QLC_BC_VF_STATE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x2, #24
	bl	_test_bit
	cbnz	w0, LBB0_5
; %bb.3:
	ldr	x8, [x22]
Lloh3:
	adrp	x9, _QLC_BC_CMD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _QLC_BC_CMD@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.4:
	ldr	x8, [x22, #8]
Lloh6:
	adrp	x9, _QLCNIC_BC_CMD_CHANNEL_INIT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _QLCNIC_BC_CMD_CHANNEL_INIT@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_1
LBB0_5:
	ldr	w8, [x22, #16]
	cmp	w8, #2
	b.lt	LBB0_7
; %bb.6:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	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
	b	_qlcnic_sriov_handle_pending_trans
LBB0_7:
	mov	x0, sp
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	x23, [x22, #8]
	add	x0, sp, #8
	bl	_qlcnic_sriov_alloc_bc_trans
	cbnz	x0, LBB0_1
; %bb.8:
	ldr	x8, [x22]
Lloh9:
	adrp	x9, _QLC_BC_CMD@GOTPAGE
Lloh10:
	ldr	x9, [x9, _QLC_BC_CMD@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	mov	x0, sp
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:
	mov	x1, x23
	bl	_qlcnic_sriov_alloc_bc_mbx_args
	cbnz	w0, LBB0_13
	b	LBB0_11
LBB0_10:
	mov	x1, x21
	mov	x2, x23
	bl	_qlcnic_alloc_mbx_args
	cbnz	w0, LBB0_13
LBB0_11:
	ldr	x8, [x22]
	str	x8, [sp]
	ldr	x0, [sp, #8]
	ldr	w2, [x22, #20]
Lloh12:
	adrp	x8, _QLC_BC_COMMAND@GOTPAGE
Lloh13:
	ldr	x8, [x8, _QLC_BC_COMMAND@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	mov	x1, sp
	bl	_qlcnic_sriov_prepare_bc_hdr
	cbz	x0, LBB0_14
LBB0_12:
	mov	x0, sp
	bl	_qlcnic_free_mbx_args
LBB0_13:
	ldr	x0, [sp, #8]
	bl	_qlcnic_sriov_cleanup_transaction
	b	LBB0_1
LBB0_14:
	ldr	x8, [sp, #8]
	ldr	w0, [x8, #44]
	ldr	w1, [x8]
	bl	_qlcnic_sriov_get_bc_paysize
	mov	x3, x0
	ldr	x0, [x19, #16]
	ldr	x8, [sp, #8]
	ldr	x9, [x8, #16]
	ldpsw	x10, x8, [x8]
	add	x1, x9, x10, lsl #3
	add	x2, x8, x10
	bl	_qlcnic_sriov_pull_bc_msg
	ldr	w8, [x19, #12]
	ldr	x1, [sp, #8]
	str	w8, [x1, #40]
	str	x19, [x1, #32]
	ldr	w8, [x22, #20]
	str	w8, [x1, #24]
	ldr	w8, [x1]
	add	w8, w8, #1
	str	w8, [x1]
	mov	x0, x21
	mov	x2, x19
	bl	_qlcnic_sriov_soft_flr_check
	cbnz	x0, LBB0_1
; %bb.15:
	ldr	x2, [sp, #8]
	ldrsw	x8, [x2]
	ldr	x9, [x2, #16]
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	mov	x0, x20
	mov	x1, x19
	bl	_qlcnic_sriov_add_act_list
	cbnz	x0, LBB0_12
	b	LBB0_1
LBB0_17:
	mov	x0, x19
	bl	_spin_lock
	ldr	x8, [sp, #8]
	add	x0, x8, #8
	add	x1, x19, #8
	bl	_list_add_tail
	ldr	w8, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_spin_unlock
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_QLC_BC_VF_STATE,4,2            ; @QLC_BC_VF_STATE
	.comm	_QLC_BC_CMD,8,3                 ; @QLC_BC_CMD
	.comm	_QLCNIC_BC_CMD_CHANNEL_INIT,8,3 ; @QLCNIC_BC_CMD_CHANNEL_INIT
	.comm	_QLC_BC_COMMAND,4,2             ; @QLC_BC_COMMAND
	.no_dead_strip	_qlcnic_sriov_handle_bc_cmd
.subsections_via_symbols
