	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_setup_tc                 ## -- Begin function bnx2x_setup_tc
	.p2align	4, 0x90
_bnx2x_setup_tc:                        ## @bnx2x_setup_tc
	.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	%esi, %r13d
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_netdev_priv
	movq	%rax, %r15
	movq	_BNX2X_MAX_PRIORITY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_ASSERT_RTNL
	testl	%r13d, %r13d
	je	LBB0_1
## %bb.2:
	movl	(%r15), %edx
	cmpl	%r13d, %edx
	jge	LBB0_5
## %bb.3:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r13d, %esi
	xorl	%eax, %eax
	callq	_BNX2X_ERR
	jmp	LBB0_4
LBB0_1:
	movq	%r14, %rdi
	callq	_netdev_reset_tc
	jmp	LBB0_14
LBB0_5:
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_netdev_set_num_tc
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r13d, %esi
	xorl	%eax, %eax
	callq	_BNX2X_ERR
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	-52(%rbp), %rdx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_bnx2x_get_c2s_mapping
	movq	_BNX2X_MAX_PRIORITY@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_10
## %bb.8:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%r12,%rbx,4), %r13
	movq	8(%r15), %rax
	movl	(%rax,%r13,4), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_netdev_set_prio_tc_map
	movq	_NETIF_MSG_IFUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_BNX2X_MSG_SP@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	8(%r15), %rax
	movl	(%rax,%r13,4), %ecx
	leaq	L_.str.2(%rip), %rsi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_DP
	incq	%rbx
	movq	_BNX2X_MAX_PRIORITY@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jl	LBB0_9
LBB0_10:
	cmpl	$0, (%r15)
	jle	LBB0_13
## %bb.11:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_BNX2X_NUM_ETH_QUEUES
	movl	%eax, %r13d
	movq	%r15, %rdi
	callq	_BNX2X_NUM_NON_CNIC_QUEUES
	movl	%eax, %r12d
	imull	%ebx, %r12d
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	movl	%r12d, %ecx
	callq	_netdev_set_tc_queue
	movq	_NETIF_MSG_IFUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_BNX2X_MSG_SP@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edx
	movl	%r12d, %ecx
	movl	%r13d, %r8d
	xorl	%eax, %eax
	callq	_DP
	incl	%ebx
	cmpl	(%r15), %ebx
	jl	LBB0_12
LBB0_13:
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BNX2X_MAX_PRIORITY,4,2         ## @BNX2X_MAX_PRIORITY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"support for too many traffic classes requested: %d. Max supported is %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"failed to declare %d traffic classes\n"

	.comm	_BNX2X_MSG_SP,4,2               ## @BNX2X_MSG_SP
	.comm	_NETIF_MSG_IFUP,4,2             ## @NETIF_MSG_IFUP
L_.str.2:                               ## @.str.2
	.asciz	"mapping priority %d to tc %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"mapping tc %d to offset %d count %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_setup_tc                 ; -- Begin function bnx2x_setup_tc
	.p2align	2
_bnx2x_setup_tc:                        ; @bnx2x_setup_tc
	.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
	sub	sp, sp, #16
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	bl	_netdev_priv
	mov	x20, x0
Lloh3:
	adrp	x27, _BNX2X_MAX_PRIORITY@GOTPAGE
Lloh4:
	ldr	x27, [x27, _BNX2X_MAX_PRIORITY@GOTPAGEOFF]
	ldr	w8, [x27]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	bl	_ASSERT_RTNL
	cbz	w22, LBB0_3
; %bb.1:
	ldr	w8, [x20]
	cmp	w8, w22
	b.ge	LBB0_5
; %bb.2:
	str	x8, [sp, #-16]!
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_BNX2X_ERR
	add	sp, sp, #16
	b	LBB0_7
LBB0_3:
	mov	x0, x19
	bl	_netdev_reset_tc
LBB0_4:
	mov	w0, #0
	b	LBB0_8
LBB0_5:
	mov	x0, x19
	mov	x1, x22
	bl	_netdev_set_num_tc
	cbz	x0, LBB0_10
; %bb.6:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	bl	_BNX2X_ERR
LBB0_7:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldur	x8, [x29, #-88]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.9:
	sub	sp, x29, #80
	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
LBB0_10:
	sub	x2, x29, #92
	mov	x0, x20
	mov	x1, x21
	bl	_bnx2x_get_c2s_mapping
	ldr	w8, [x27]
Lloh17:
	adrp	x25, _BNX2X_MSG_SP@GOTPAGE
Lloh18:
	ldr	x25, [x25, _BNX2X_MSG_SP@GOTPAGEOFF]
Lloh19:
	adrp	x26, _NETIF_MSG_IFUP@GOTPAGE
Lloh20:
	ldr	x26, [x26, _NETIF_MSG_IFUP@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.11:
	mov	x22, #0
Lloh21:
	adrp	x23, l_.str.2@PAGE
Lloh22:
	add	x23, x23, l_.str.2@PAGEOFF
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldrsw	x24, [x21, x22, lsl #2]
	ldr	x8, [x20, #8]
	lsl	x28, x24, #2
	ldr	w2, [x8, x28]
	mov	x0, x19
	mov	x1, x22
	bl	_netdev_set_prio_tc_map
	ldr	w8, [x25]
	ldr	w9, [x26]
	orr	w0, w9, w8
	ldr	x8, [x20, #8]
	ldr	w3, [x8, x28]
	mov	x1, x23
	mov	x2, x24
	bl	_DP
	add	x22, x22, #1
	ldrsw	x8, [x27]
	cmp	x22, x8
	b.lt	LBB0_12
LBB0_13:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.14:
	mov	w21, #0
Lloh23:
	adrp	x22, l_.str.3@PAGE
Lloh24:
	add	x22, x22, l_.str.3@PAGEOFF
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_BNX2X_NUM_ETH_QUEUES
	mov	x23, x0
	mov	x0, x20
	bl	_BNX2X_NUM_NON_CNIC_QUEUES
	mul	w24, w0, w21
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	mov	x3, x24
	bl	_netdev_set_tc_queue
	ldr	w8, [x25]
	ldr	w9, [x26]
	orr	w0, w9, w8
	str	x23, [sp, #-16]!
	mov	x1, x22
	mov	x2, x21
	mov	x3, x24
	bl	_DP
	add	sp, sp, #16
	add	w21, w21, #1
	ldr	w8, [x20]
	cmp	w21, w8
	b.lt	LBB0_15
	b	LBB0_4
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_BNX2X_MAX_PRIORITY,4,2         ; @BNX2X_MAX_PRIORITY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"support for too many traffic classes requested: %d. Max supported is %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"failed to declare %d traffic classes\n"

	.comm	_BNX2X_MSG_SP,4,2               ; @BNX2X_MSG_SP
	.comm	_NETIF_MSG_IFUP,4,2             ; @NETIF_MSG_IFUP
l_.str.2:                               ; @.str.2
	.asciz	"mapping priority %d to tc %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"mapping tc %d to offset %d count %d\n"

.subsections_via_symbols
