	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __mlxsw_sp_dcbnl_ieee_setets
___mlxsw_sp_dcbnl_ieee_setets:          ## @__mlxsw_sp_dcbnl_ieee_setets
	.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	%rsi, %r12
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	movq	_IEEE_8021QAZ_MAX_TCS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_10
## %bb.1:
	movq	(%r14), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	xorl	%r8d, %r8d
	movq	_IEEE_8021QAZ_TSA_ETS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	8(%r12), %rax
	sete	%r8b
	movl	(%rax,%rbx,4), %r9d
	movq	_MLXSW_REG_QEEC_HIERARCY_SUBGROUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_mlxsw_sp_port_ets_set
	testl	%eax, %eax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movq	_IEEE_8021QAZ_MAX_TCS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
## %bb.5:
	testl	%eax, %eax
	jle	LBB0_10
## %bb.6:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rax
	movl	(%rax,%rbx,4), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_mlxsw_sp_port_prio_tc_set
	testl	%eax, %eax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	movq	_IEEE_8021QAZ_MAX_TCS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jl	LBB0_7
LBB0_10:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_mlxsw_sp_port_headroom_set
	testl	%eax, %eax
	je	LBB0_11
## %bb.12:
	movl	%eax, %r13d
	movq	_IEEE_8021QAZ_MAX_TCS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	jg	LBB0_14
	jmp	LBB0_16
LBB0_3:
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_netdev_err
	testl	%ebx, %ebx
	jg	LBB0_18
	jmp	LBB0_21
LBB0_11:
	xorl	%r13d, %r13d
	jmp	LBB0_21
LBB0_8:
	movl	%eax, %r13d
	movq	16(%r12), %rax
	movl	(%rax,%rbx,4), %ecx
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_netdev_err
	testl	%ebx, %ebx
	jle	LBB0_16
LBB0_14:
	movl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	leaq	-1(%rbx), %r12
	movq	16(%r15), %rax
	movl	%r12d, %ecx
	movl	(%rax,%rcx,4), %edx
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_mlxsw_sp_port_prio_tc_set
	cmpq	$1, %rbx
	movq	%r12, %rbx
	ja	LBB0_15
LBB0_16:
	movq	_IEEE_8021QAZ_MAX_TCS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	jle	LBB0_21
LBB0_18:
	movl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	leaq	-1(%rbx), %r12
	movl	%r12d, %eax
	movq	(%r15), %rcx
	movq	(%rcx,%rax,8), %rcx
	xorl	%r8d, %r8d
	movq	_IEEE_8021QAZ_TSA_ETS@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	movq	8(%r15), %rcx
	sete	%r8b
	movl	(%rcx,%rax,4), %r9d
	movq	_MLXSW_REG_QEEC_HIERARCY_SUBGROUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r12d, %edx
	xorl	%ecx, %ecx
	callq	_mlxsw_sp_port_ets_set
	cmpq	$1, %rbx
	movq	%r12, %rbx
	ja	LBB0_19
## %bb.20:
	movl	%eax, %r13d
LBB0_21:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE_8021QAZ_MAX_TCS,4,2       ## @IEEE_8021QAZ_MAX_TCS
	.comm	_IEEE_8021QAZ_TSA_ETS,8,3       ## @IEEE_8021QAZ_TSA_ETS
	.comm	_MLXSW_REG_QEEC_HIERARCY_SUBGROUP,4,2 ## @MLXSW_REG_QEEC_HIERARCY_SUBGROUP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to link subgroup ETS element %d to group\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to map prio %d to TC %d\n"

	.no_dead_strip	___mlxsw_sp_dcbnl_ieee_setets
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __mlxsw_sp_dcbnl_ieee_setets
___mlxsw_sp_dcbnl_ieee_setets:          ; @__mlxsw_sp_dcbnl_ieee_setets
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x21, x1
	mov	x19, x0
	ldr	x24, [x0, #8]
Lloh0:
	adrp	x27, _IEEE_8021QAZ_MAX_TCS@GOTPAGE
Lloh1:
	ldr	x27, [x27, _IEEE_8021QAZ_MAX_TCS@GOTPAGEOFF]
	ldr	w8, [x27]
Lloh2:
	adrp	x25, _IEEE_8021QAZ_TSA_ETS@GOTPAGE
Lloh3:
	ldr	x25, [x25, _IEEE_8021QAZ_TSA_ETS@GOTPAGEOFF]
Lloh4:
	adrp	x26, _MLXSW_REG_QEEC_HIERARCY_SUBGROUP@GOTPAGE
Lloh5:
	ldr	x26, [x26, _MLXSW_REG_QEEC_HIERARCY_SUBGROUP@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x23, #0
	ldr	x22, [x19]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x8, x9, [x21]
	ldr	x8, [x8, x23, lsl #3]
	ldr	x10, [x25]
	cmp	x8, x10
	cset	w4, eq
	ldr	w5, [x9, x23, lsl #2]
	ldr	w1, [x26]
	mov	x0, x19
	mov	x2, x23
	mov	w3, #0
	bl	_mlxsw_sp_port_ets_set
	cbnz	w0, LBB0_10
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x27]
	cmp	x23, x8
	b.lt	LBB0_2
; %bb.4:
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.5:
	mov	x23, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #16]
	ldr	w2, [x8, x23, lsl #2]
	mov	x0, x19
	mov	x1, x23
	bl	_mlxsw_sp_port_prio_tc_set
	cbnz	w0, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x27]
	cmp	x23, x8
	b.lt	LBB0_6
LBB0_8:
	mov	x0, x19
	mov	x1, x21
	bl	_mlxsw_sp_port_headroom_set
	mov	x20, x0
	cbz	w0, LBB0_18
; %bb.9:
	ldr	w23, [x27]
	cmp	w23, #1
	b.ge	LBB0_12
	b	LBB0_14
LBB0_10:
	mov	x20, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, x23
	bl	_netdev_err
	cmp	w23, #1
	b.ge	LBB0_15
	b	LBB0_18
LBB0_11:
	mov	x20, x0
	ldr	x8, [x21, #16]
	ldr	w8, [x8, x23, lsl #2]
	str	x8, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	x2, x23
	bl	_netdev_err
	cmp	w23, #1
	b.lt	LBB0_14
LBB0_12:
	mov	w21, w23
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	subs	x1, x21, #1
	ldr	x8, [x24, #16]
	ldr	w2, [x8, w1, uxtw #2]
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_mlxsw_sp_port_prio_tc_set
	subs	x21, x21, #1
	b.hi	LBB0_13
LBB0_14:
	ldr	w23, [x27]
	cmp	w23, #1
	b.lt	LBB0_18
LBB0_15:
	mov	w21, w23
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	subs	x2, x21, #1
	ldp	x8, x9, [x24]
	ldr	x8, [x8, w2, uxtw #3]
	ldr	x10, [x25]
	cmp	x8, x10
	cset	w4, eq
	ldr	w5, [x9, w2, uxtw #2]
	ldr	w1, [x26]
	mov	x0, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	w3, #0
	bl	_mlxsw_sp_port_ets_set
	subs	x21, x21, #1
	b.hi	LBB0_16
; %bb.17:
	mov	x20, x0
LBB0_18:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE_8021QAZ_MAX_TCS,4,2       ; @IEEE_8021QAZ_MAX_TCS
	.comm	_IEEE_8021QAZ_TSA_ETS,8,3       ; @IEEE_8021QAZ_TSA_ETS
	.comm	_MLXSW_REG_QEEC_HIERARCY_SUBGROUP,4,2 ; @MLXSW_REG_QEEC_HIERARCY_SUBGROUP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to link subgroup ETS element %d to group\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to map prio %d to TC %d\n"

	.no_dead_strip	___mlxsw_sp_dcbnl_ieee_setets
.subsections_via_symbols
