	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_alloc_fw_stats_mem
_bnx2x_alloc_fw_stats_mem:              ## @bnx2x_alloc_fw_stats_mem
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_NO_FCOE
	xorl	%r15d, %r15d
	testq	%rax, %rax
	sete	%r15b
	movq	%rbx, %rdi
	callq	_BNX2X_NUM_ETH_QUEUES
	movl	%eax, %r14d
	addl	%r15d, %r14d
	leal	(%r15,%r14), %eax
	addl	$2, %eax
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_IS_SRIOV
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	callq	_bnx2x_vf_headroom
	movl	%eax, %ecx
	jmp	LBB0_3
LBB0_1:
	xorl	%ecx, %ecx
LBB0_3:
	movl	(%rbx), %r8d
	leal	(%r8,%rcx), %eax
	movq	_STATS_QUERY_CMD_COUNT@GOTPCREL(%rip), %rsi
	cltd
	idivl	(%rsi)
	movl	%eax, %r15d
	cmpl	$1, %edx
	sbbl	$-1, %r15d
	movq	_BNX2X_MSG_SP@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r8d, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_DP
	leal	4(,%r15,4), %eax
	movl	%eax, 4(%rbx)
	movl	%r14d, %eax
	shll	$2, %eax
	leal	16(,%r14,4), %ecx
	movl	%ecx, 8(%rbx)
	movq	40(%rbx), %rdi
	leaq	32(%rbx), %rsi
	leal	(%rax,%r15,4), %edx
	addl	$20, %edx
	callq	_BNX2X_PCI_ALLOC
	movq	32(%rbx), %rdi
	movq	40(%rbx), %rax
	movq	%rax, 56(%rbx)
	movq	%rdi, 24(%rbx)
	movslq	4(%rbx), %rcx
	leaq	(%rax,%rcx,4), %rax
	movq	%rax, 48(%rbx)
	addq	%rdi, %rcx
	movq	%rcx, 16(%rbx)
	movl	(%r12), %r14d
	callq	_U64_HI
	movl	%eax, %r15d
	movq	24(%rbx), %rdi
	callq	_U64_LO
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	movl	%r15d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_DP
	movl	(%r12), %r14d
	movq	16(%rbx), %rdi
	callq	_U64_HI
	movl	%eax, %r15d
	movq	16(%rbx), %rdi
	callq	_U64_LO
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edi
	movl	%r15d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_DP
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STATS_QUERY_CMD_COUNT,4,2      ## @STATS_QUERY_CMD_COUNT
	.comm	_BNX2X_MSG_SP,4,2               ## @BNX2X_MSG_SP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stats fw_stats_num %d, vf headroom %d, num_groups %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"statistics request base address set to %x %x\n"

L_.str.2:                               ## @.str.2
	.asciz	"statistics data base address set to %x %x\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_bnx2x_alloc_fw_stats_mem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_alloc_fw_stats_mem
_bnx2x_alloc_fw_stats_mem:              ; @bnx2x_alloc_fw_stats_mem
	.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, x0
	bl	_NO_FCOE
	mov	x20, x0
	mov	x0, x19
	bl	_BNX2X_NUM_ETH_QUEUES
	cmp	x20, #0
	cinc	w20, w0, eq
	mov	w8, #2
	cinc	w8, w8, eq
	add	w8, w20, w8
	str	w8, [x19]
	mov	x0, x19
	bl	_IS_SRIOV
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_bnx2x_vf_headroom
	mov	x3, x0
	b	LBB0_3
LBB0_2:
	mov	w3, #0
LBB0_3:
	ldr	w2, [x19]
	add	w8, w2, w3
Lloh0:
	adrp	x9, _STATS_QUERY_CMD_COUNT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _STATS_QUERY_CMD_COUNT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	cmp	w8, #0
	cinc	w21, w10, ne
Lloh3:
	adrp	x22, _BNX2X_MSG_SP@GOTPAGE
Lloh4:
	ldr	x22, [x22, _BNX2X_MSG_SP@GOTPAGEOFF]
	ldr	w0, [x22]
	str	x21, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DP
	lsl	w8, w21, #2
	add	w8, w8, #4
	lsl	w9, w20, #2
	add	w9, w9, #16
	stp	w8, w9, [x19, #4]
	ldr	x0, [x19, #40]
	add	x1, x19, #32
	add	w2, w8, w9
	bl	_BNX2X_PCI_ALLOC
	ldp	x0, x8, [x19, #32]
	ldrsw	x9, [x19, #4]
	add	x10, x8, x9, lsl #2
	stp	x10, x8, [x19, #48]
	add	x8, x0, x9
	stp	x8, x0, [x19, #16]
	ldr	w20, [x22]
	bl	_U64_HI
	mov	x21, x0
	ldr	x0, [x19, #24]
	bl	_U64_LO
	mov	x3, x0
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_DP
	ldr	w20, [x22]
	ldr	x0, [x19, #16]
	bl	_U64_HI
	mov	x21, x0
	ldr	x0, [x19, #16]
	bl	_U64_LO
	mov	x3, x0
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_DP
	mov	w0, #0
	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 AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_STATS_QUERY_CMD_COUNT,4,2      ; @STATS_QUERY_CMD_COUNT
	.comm	_BNX2X_MSG_SP,4,2               ; @BNX2X_MSG_SP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stats fw_stats_num %d, vf headroom %d, num_groups %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"statistics request base address set to %x %x\n"

l_.str.2:                               ; @.str.2
	.asciz	"statistics data base address set to %x %x\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_bnx2x_alloc_fw_stats_mem
.subsections_via_symbols
