	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_map_q_cos
_bnx2x_map_q_cos:                       ## @bnx2x_map_q_cos
	.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
	movl	%edx, %ebx
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rdi, %r13
	movq	_QM_REG_QVOQIDX_0@GOTPCREL(%rip), %rax
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	leal	(,%rsi,4), %esi
	addl	(%rax), %esi
	callq	_REG_RD
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	cmpl	%ebx, %eax
	je	LBB0_9
## %bb.1:
	movq	_BNX2X_PORT2_MODE_NUM_VNICS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r13, %rdi
	callq	_INIT_MODE_FLAGS
	movq	_MODE_PORT4@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.2:
	movq	_BNX2X_PORT4_MODE_NUM_VNICS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r13, %rdi
	callq	_BP_PORT
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_BNX2X_E3B0_PORT1_COS_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, -48(%rbp)                 ## 4-byte Folded Spill
	addl	%eax, -44(%rbp)                 ## 4-byte Folded Spill
LBB0_4:
	testl	%ebx, %ebx
	jle	LBB0_9
## %bb.5:
	xorl	%r15d, %r15d
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	incl	%r15d
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	cmpl	%r15d, %ebx
	je	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_BP_PORT
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	movq	%rax, %rsi
	movl	%r15d, %edx
	callq	_BNX2X_PF_Q_NUM
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_BNX2X_Q_VOQ_REG_ADDR
	movq	%r13, %rdi
	movl	%eax, %esi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edx
	callq	_REG_WR
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movl	%r14d, %esi
	callq	_BNX2X_VOQ_Q_REG_ADDR
	movl	%eax, %r12d
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_REG_RD
	btrl	%r14d, %eax
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_REG_WR
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_BNX2X_VOQ_Q_REG_ADDR
	movl	%eax, %ebx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_REG_RD
	btsl	%r14d, %eax
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_REG_WR
	movq	%r13, %rdi
	callq	_INIT_MODE_FLAGS
	movq	_MODE_E3_B0@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%r14d, %edi
	callq	_BNX2X_Q_CMDQ_REG_ADDR
	movl	%eax, %ebx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_REG_RD
	addl	%r14d, %r14d
	movl	%eax, %edx
	btsl	%r14d, %edx
	btrl	%r14d, %eax
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	cmovel	%eax, %edx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_REG_WR
	jmp	LBB0_8
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QM_REG_QVOQIDX_0,4,2           ## @QM_REG_QVOQIDX_0
	.comm	_BNX2X_PORT2_MODE_NUM_VNICS,4,2 ## @BNX2X_PORT2_MODE_NUM_VNICS
	.comm	_MODE_PORT4,4,2                 ## @MODE_PORT4
	.comm	_BNX2X_PORT4_MODE_NUM_VNICS,4,2 ## @BNX2X_PORT4_MODE_NUM_VNICS
	.comm	_BNX2X_E3B0_PORT1_COS_OFFSET,4,2 ## @BNX2X_E3B0_PORT1_COS_OFFSET
	.comm	_MODE_E3_B0,4,2                 ## @MODE_E3_B0
	.no_dead_strip	_bnx2x_map_q_cos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_map_q_cos
_bnx2x_map_q_cos:                       ; @bnx2x_map_q_cos
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _QM_REG_QVOQIDX_0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QM_REG_QVOQIDX_0@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	w1, w8, w1, lsl #2
	bl	_REG_RD
	cmp	w0, w19
	b.eq	LBB0_9
; %bb.1:
	mov	x22, x0
Lloh3:
	adrp	x8, _BNX2X_PORT2_MODE_NUM_VNICS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BNX2X_PORT2_MODE_NUM_VNICS@GOTPAGEOFF]
Lloh5:
	ldr	w26, [x8]
	mov	x0, x21
	bl	_INIT_MODE_FLAGS
Lloh6:
	adrp	x8, _MODE_PORT4@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MODE_PORT4@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.2:
Lloh9:
	adrp	x8, _BNX2X_PORT4_MODE_NUM_VNICS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BNX2X_PORT4_MODE_NUM_VNICS@GOTPAGEOFF]
Lloh11:
	ldr	w26, [x8]
	mov	x0, x21
	bl	_BP_PORT
	cbz	x0, LBB0_4
; %bb.3:
Lloh12:
	adrp	x8, _BNX2X_E3B0_PORT1_COS_OFFSET@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BNX2X_E3B0_PORT1_COS_OFFSET@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	add	w22, w8, w22
	add	w19, w8, w19
LBB0_4:
	cmp	w26, #1
	b.lt	LBB0_9
; %bb.5:
	mov	w23, #0
	mov	w27, #1
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w23, w23, #1
	cmp	w26, w23
	b.eq	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_BP_PORT
	mov	x1, x0
	mov	x0, x20
	mov	x2, x23
	bl	_BNX2X_PF_Q_NUM
	mov	x24, x0
	lsl	w28, w27, w0
	bl	_BNX2X_Q_VOQ_REG_ADDR
	mov	x1, x0
	mov	x0, x21
	mov	x2, x19
	bl	_REG_WR
	mov	x0, x22
	mov	x1, x24
	bl	_BNX2X_VOQ_Q_REG_ADDR
	mov	x25, x0
	mov	x0, x21
	mov	x1, x25
	bl	_REG_RD
	bic	w2, w0, w28
	mov	x0, x21
	mov	x1, x25
	bl	_REG_WR
	mov	x0, x19
	mov	x1, x24
	bl	_BNX2X_VOQ_Q_REG_ADDR
	mov	x25, x0
	mov	x0, x21
	mov	x1, x25
	bl	_REG_RD
	orr	w2, w0, w28
	mov	x0, x21
	mov	x1, x25
	bl	_REG_WR
	mov	x0, x21
	bl	_INIT_MODE_FLAGS
Lloh15:
	adrp	x8, _MODE_E3_B0@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MODE_E3_B0@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x24
	bl	_BNX2X_Q_CMDQ_REG_ADDR
	mov	x25, x0
	mov	x0, x21
	mov	x1, x25
	bl	_REG_RD
	ubfiz	w8, w24, #1, #4
	lsl	w8, w27, w8
	orr	w9, w0, w8
	bic	w8, w0, w8
	cmp	w19, #0
	csel	w2, w8, w9, eq
	mov	x0, x21
	mov	x1, x25
	bl	_REG_WR
	b	LBB0_6
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 AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_QM_REG_QVOQIDX_0,4,2           ; @QM_REG_QVOQIDX_0
	.comm	_BNX2X_PORT2_MODE_NUM_VNICS,4,2 ; @BNX2X_PORT2_MODE_NUM_VNICS
	.comm	_MODE_PORT4,4,2                 ; @MODE_PORT4
	.comm	_BNX2X_PORT4_MODE_NUM_VNICS,4,2 ; @BNX2X_PORT4_MODE_NUM_VNICS
	.comm	_BNX2X_E3B0_PORT1_COS_OFFSET,4,2 ; @BNX2X_E3B0_PORT1_COS_OFFSET
	.comm	_MODE_E3_B0,4,2                 ; @MODE_E3_B0
	.no_dead_strip	_bnx2x_map_q_cos
.subsections_via_symbols
