	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_port_ets_validate
_mlxsw_sp_port_ets_validate:            ## @mlxsw_sp_port_ets_validate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_IEEE_8021QAZ_MAX_TCS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_1
## %bb.2:
	movq	(%rdi), %rdi
	movq	(%rsi), %r9
	xorl	%eax, %eax
	leaq	L_.str(%rip), %r8
	leaq	L_.str.1(%rip), %r10
	xorl	%edx, %edx
	xorl	%r11d, %r11d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r9,%rax,4), %ebx
	cmpl	$128, %ebx
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$129, %ebx
	jne	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%rsi), %rbx
	addl	(%rbx,%rax,4), %edx
	movl	$1, %r11d
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%rsi), %rbx
	cmpl	%ecx, (%rbx,%rax,4)
	jge	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%rax
	cmpq	%rax, %rcx
	jne	LBB0_4
## %bb.9:
	xorl	%eax, %eax
	testl	%r11d, %r11d
	je	LBB0_13
## %bb.10:
	cmpl	$100, %edx
	je	LBB0_13
## %bb.11:
	leaq	L_.str.2(%rip), %r8
	jmp	LBB0_12
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_8:
	movq	%r10, %r8
LBB0_12:
	movq	%r8, %rsi
	callq	_netdev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE_8021QAZ_MAX_TCS,4,2       ## @IEEE_8021QAZ_MAX_TCS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Only strict priority and ETS are supported\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Invalid TC\n"

L_.str.2:                               ## @.str.2
	.asciz	"Total ETS bandwidth should equal 100\n"

	.no_dead_strip	_mlxsw_sp_port_ets_validate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_sp_port_ets_validate
_mlxsw_sp_port_ets_validate:            ; @mlxsw_sp_port_ets_validate
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _IEEE_8021QAZ_MAX_TCS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE_8021QAZ_MAX_TCS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x11, #0
	mov	w10, #0
	mov	w14, #0
	ldr	x0, [x0]
	ldr	x12, [x1]
	lsl	x13, x9, #2
Lloh3:
	adrp	x8, l_.str@PAGE
Lloh4:
	add	x8, x8, l_.str@PAGEOFF
Lloh5:
	adrp	x15, l_.str.1@PAGE
Lloh6:
	add	x15, x15, l_.str.1@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w16, [x12, x11]
	cmp	w16, #128
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w16, #129
	b.ne	LBB0_12
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x14, [x1, #8]
	ldr	w14, [x14, x11]
	add	w10, w14, w10
	mov	w14, #1
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x16, [x1, #16]
	ldr	w16, [x16, x11]
	cmp	w16, w9
	b.ge	LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x11, x11, #4
	cmp	x13, x11
	b.ne	LBB0_2
; %bb.7:
	mov	w8, #0
	cbz	w14, LBB0_13
; %bb.8:
	cmp	w10, #100
	b.eq	LBB0_13
; %bb.9:
Lloh7:
	adrp	x8, l_.str.2@PAGE
Lloh8:
	add	x8, x8, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_10:
	mov	w8, #0
	b	LBB0_13
LBB0_11:
	mov	x8, x15
LBB0_12:
	mov	x1, x8
	bl	_netdev_err
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w8, w8
LBB0_13:
	mov	x0, x8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE_8021QAZ_MAX_TCS,4,2       ; @IEEE_8021QAZ_MAX_TCS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Only strict priority and ETS are supported\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Invalid TC\n"

l_.str.2:                               ; @.str.2
	.asciz	"Total ETS bandwidth should equal 100\n"

	.no_dead_strip	_mlxsw_sp_port_ets_validate
.subsections_via_symbols
