	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qlcnic_sriov_prepare_bc_hdr
_qlcnic_sriov_prepare_bc_hdr:           ## @qlcnic_sriov_prepare_bc_hdr
	.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	%rcx, %r13
	movl	%edx, %r14d
	movq	%rsi, %r8
	movq	%rdi, %r12
	movq	_QLC_BC_PAYLOAD_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_QLC_BC_COMMAND@GOTPCREL(%rip), %rax
	cmpq	%rcx, (%rax)
	jne	LBB0_5
## %bb.1:
	movq	24(%r8), %rcx
	movq	%rcx, 48(%r12)
	movq	8(%r8), %rax
	movq	%rax, 40(%r12)
	movl	32(%r8), %eax
	shll	$2, %eax
	movl	%eax, (%r12)
	movl	16(%r8), %edx
	shll	$2, %edx
	movl	%edx, 4(%r12)
	movzbl	(%rcx), %r15d
	cltd
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	idivl	%edi
	movslq	%eax, %rbx
	cmpl	$1, %edx
	sbbq	$-1, %rbx
	leaq	24(%r12), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rsi
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	callq	_qlcnic_sriov_alloc_bc_msg
	testq	%rax, %rax
	jne	LBB0_2
## %bb.3:
	movl	4(%r12), %eax
	cltd
	idivl	-44(%rbp)                       ## 4-byte Folded Reload
	movslq	%eax, %rsi
	cmpl	$1, %edx
	sbbq	$-1, %rsi
	leaq	32(%r12), %rdi
	callq	_qlcnic_sriov_alloc_bc_msg
	testq	%rax, %rax
	je	LBB0_4
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_5:
	movq	48(%r12), %rax
	movq	%rax, 24(%r8)
	movq	40(%r12), %rcx
	movq	%rcx, 8(%r8)
	movzbl	(%rax), %r15d
	movq	%r15, 40(%r8)
	movl	(%r12), %esi
	movl	4(%r12), %ecx
	movl	%ecx, %eax
	cltd
	idivl	%edi
	movslq	%eax, %rbx
	cmpl	$1, %edx
	sbbq	$-1, %rbx
	leal	3(%rsi), %eax
	testl	%esi, %esi
	cmovnsl	%esi, %eax
	sarl	$2, %eax
	movl	%eax, 32(%r8)
	leal	3(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$2, %eax
	movl	%eax, 16(%r8)
	movq	24(%r12), %rax
	movq	32(%r12), %rcx
	movl	32(%rax), %eax
	movl	%eax, (%r8)
LBB0_6:
	movl	%r14d, 8(%r12)
	movq	%r15, 16(%r12)
	testq	%rbx, %rbx
	jle	LBB0_7
## %bb.8:
	movl	(%r8), %edx
	xorl	%eax, %eax
	movabsq	$4294967298, %rsi               ## imm = 0x100000002
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rsi, (%rcx)
	movq	%r13, 40(%rcx)
	movl	%edx, 32(%rcx)
	movq	%rbx, 24(%rcx)
	incq	%rdi
	movl	%edi, 8(%rcx)
	movq	%r15, 16(%rcx)
	movl	%r14d, 12(%rcx)
	addq	$48, %rcx
	cmpq	%rdi, %rbx
	jne	LBB0_9
	jmp	LBB0_10
LBB0_7:
	xorl	%eax, %eax
LBB0_10:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rcx
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_QLC_BC_PAYLOAD_SZ,4,2          ## @QLC_BC_PAYLOAD_SZ
	.comm	_QLC_BC_COMMAND,8,3             ## @QLC_BC_COMMAND
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_qlcnic_sriov_prepare_bc_hdr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function qlcnic_sriov_prepare_bc_hdr
lCPI0_0:
	.long	2                               ; 0x2
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_qlcnic_sriov_prepare_bc_hdr:           ; @qlcnic_sriov_prepare_bc_hdr
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x23, x0
Lloh0:
	adrp	x8, _QLC_BC_PAYLOAD_SZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QLC_BC_PAYLOAD_SZ@GOTPAGEOFF]
Lloh2:
	ldr	w26, [x8]
Lloh3:
	adrp	x8, _QLC_BC_COMMAND@GOTPAGE
Lloh4:
	ldr	x8, [x8, _QLC_BC_COMMAND@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x3
	b.ne	LBB0_4
; %bb.1:
	ldr	x8, [x22, #24]
	ldr	x9, [x22, #8]
	stp	x9, x8, [x23, #40]
	ldr	w9, [x22, #32]
	lsl	w9, w9, #2
	ldr	w10, [x22, #16]
	lsl	w10, w10, #2
	stp	w9, w10, [x23]
	ldrb	w25, [x8]
	sdiv	w8, w9, w26
	msub	w9, w8, w26, w9
	sxtw	x8, w8
	cmp	w9, #0
	cinc	x21, x8, ne
	add	x24, x23, #24
	mov	x0, x24
	mov	x1, x21
	bl	_qlcnic_sriov_alloc_bc_msg
	cbnz	x0, LBB0_3
; %bb.2:
	ldr	w8, [x23, #4]
	sdiv	w9, w8, w26
	msub	w8, w9, w26, w8
	sxtw	x9, w9
	cmp	w8, #0
	cinc	x1, x9, ne
	add	x0, x23, #32
	bl	_qlcnic_sriov_alloc_bc_msg
	cbz	x0, LBB0_15
LBB0_3:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_4:
	ldp	x9, x8, [x23, #40]
	str	x8, [x22, #24]
	str	x9, [x22, #8]
	ldrb	w25, [x8]
	str	x25, [x22, #40]
	ldp	w9, w8, [x23]
	sdiv	w10, w8, w26
	msub	w11, w10, w26, w8
	sxtw	x10, w10
	cmp	w11, #0
	cinc	x21, x10, ne
	add	w10, w9, #3
	cmp	w9, #0
	csel	w9, w10, w9, lt
	asr	w9, w9, #2
	str	w9, [x22, #32]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #2
	str	w8, [x22, #16]
	ldp	x8, x9, [x23, #24]
	ldr	w8, [x8, #32]
	str	w8, [x22]
LBB0_5:
	str	w20, [x23, #8]
	str	x25, [x23, #16]
	cmp	x21, #1
	b.lt	LBB0_13
; %bb.6:
	ldr	w8, [x22]
	adrp	x11, lCPI0_0@PAGE
	cmp	x21, #4
	b.hs	LBB0_8
; %bb.7:
	mov	x10, #0
	b	LBB0_11
LBB0_8:
	mov	x12, #0
	and	x10, x21, #0xfffffffffffffffc
	add	x13, x9, #184
	ldr	d0, [x11, lCPI0_0@PAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	stur	x19, [x13, #-144]
	stur	x19, [x13, #-96]
	stur	x19, [x13, #-48]
	str	x19, [x13]
	stur	w8, [x13, #-152]
	stur	w8, [x13, #-104]
	stur	w8, [x13, #-56]
	stur	w8, [x13, #-8]
	stur	d0, [x13, #-184]
	stur	d0, [x13, #-136]
	stur	d0, [x13, #-88]
	stur	d0, [x13, #-40]
	add	w14, w12, #1
	add	w15, w12, #2
	add	w16, w12, #3
	add	x12, x12, #4
	stp	x25, x21, [x13, #-168]
	stp	x25, x21, [x13, #-120]
	stp	x25, x21, [x13, #-72]
	stp	x25, x21, [x13, #-24]
	stp	w14, w20, [x13, #-176]
	stp	w15, w20, [x13, #-128]
	stp	w16, w20, [x13, #-80]
	stp	w12, w20, [x13, #-32]
	add	x13, x13, #192
	cmp	x10, x12
	b.ne	LBB0_9
; %bb.10:
	cmp	x21, x10
	b.eq	LBB0_13
LBB0_11:
	mov	w12, #48
	madd	x9, x10, x12, x9
	ldr	d0, [x11, lCPI0_0@PAGEOFF]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	str	x19, [x9, #40]
	str	w8, [x9, #32]
	str	d0, [x9]
	add	x10, x10, #1
	stp	x25, x21, [x9, #16]
	stp	w10, w20, [x9, #8]
	add	x9, x9, #48
	cmp	x21, x10
	b.ne	LBB0_12
LBB0_13:
	mov	w0, #0
LBB0_14:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_15:
	ldr	x9, [x24]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_QLC_BC_PAYLOAD_SZ,4,2          ; @QLC_BC_PAYLOAD_SZ
	.comm	_QLC_BC_COMMAND,8,3             ; @QLC_BC_COMMAND
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_qlcnic_sriov_prepare_bc_hdr
.subsections_via_symbols
