	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_NO_FCOE
	xorl	%ebx, %ebx
	testq	%rax, %rax
	sete	%bl
	movq	%r12, %rdi
	callq	_BNX2X_NUM_ETH_QUEUES
	movl	%eax, %r15d
	addl	%ebx, %r15d
	leal	(%rbx,%r15), %eax
	addl	$2, %eax
	movl	%eax, (%r12)
	movq	%r12, %rdi
	callq	_IS_SRIOV
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r12, %rdi
	callq	_bnx2x_vf_headroom
	movl	%eax, %ecx
	jmp	LBB0_3
LBB0_1:
	xorl	%ecx, %ecx
LBB0_3:
	movl	(%r12), %r8d
	leal	(%r8,%rcx), %eax
	movq	_STATS_QUERY_CMD_COUNT@GOTPCREL(%rip), %rsi
	cltd
	idivl	(%rsi)
	movl	%eax, %ebx
	cmpl	$1, %edx
	sbbl	$-1, %ebx
	movq	_BNX2X_MSG_SP@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movl	%r8d, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_DP
	leal	4(,%rbx,4), %eax
	movl	%eax, 4(%r12)
	movl	%r15d, %eax
	shll	$2, %eax
	leal	16(,%r15,4), %ecx
	movl	%ecx, 8(%r12)
	leaq	32(%r12), %rdi
	leal	(%rax,%rbx,4), %esi
	addl	$20, %esi
	callq	_BNX2X_PCI_ALLOC
	movq	%rax, 40(%r12)
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, 56(%r12)
	movq	32(%r12), %rdi
	movq	%rdi, 24(%r12)
	movslq	4(%r12), %rcx
	leaq	(%rax,%rcx,4), %rax
	movq	%rax, 48(%r12)
	addq	%rdi, %rcx
	movq	%rcx, 16(%r12)
	movl	(%r13), %r15d
	callq	_U64_HI
	movl	%eax, %ebx
	movq	24(%r12), %rdi
	callq	_U64_LO
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_DP
	movl	(%r13), %r15d
	movq	16(%r12), %rdi
	callq	_U64_HI
	movl	%eax, %ebx
	movq	16(%r12), %rdi
	callq	_U64_LO
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_DP
	jmp	LBB0_6
LBB0_5:
	movq	%r12, %rdi
	callq	_bnx2x_free_fw_stats_mem
	leaq	L_.str.3(%rip), %rdi
	callq	_BNX2X_ERR
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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"

L_.str.3:                               ## @.str.3
	.asciz	"Can't allocate FW stats memory\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]
	add	x0, x19, #32
	add	w1, w8, w9
	bl	_BNX2X_PCI_ALLOC
	str	x0, [x19, #40]
	cbz	x0, LBB0_5
; %bb.4:
	ldr	x8, [x19, #32]
	ldrsw	x9, [x19, #4]
	add	x10, x0, x9, lsl #2
	stp	x10, x0, [x19, #48]
	add	x9, x8, x9
	stp	x9, x8, [x19, #16]
	ldr	w20, [x22]
	mov	x0, x8
	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
	b	LBB0_6
LBB0_5:
	mov	x0, x19
	bl	_bnx2x_free_fw_stats_mem
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_BNX2X_ERR
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.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"

l_.str.3:                               ; @.str.3
	.asciz	"Can't allocate FW stats memory\n"

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