	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_en_ets_validate
_mlx4_en_ets_validate:                  ## @mlx4_en_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), %r11d
	testl	%r11d, %r11d
	jle	LBB0_1
## %bb.2:
	movq	(%rsi), %r9
	movq	_MLX4_EN_NUM_UP_HIGH@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%edx, %edx
	xorl	%r10d, %r10d
	xorl	%r8d, %r8d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rdx
	cmpq	%rdx, %r11
	je	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r9,%rdx,8), %rcx
	cmpq	%rax, %rcx
	jge	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rsi), %rcx
	movl	(%rcx,%rdx,4), %ecx
	leal	-128(%rcx), %ebx
	cmpl	$2, %ebx
	jb	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$130, %ecx
	jne	LBB0_15
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%rsi), %rcx
	addl	(%rcx,%rdx,4), %r8d
	movl	$1, %r10d
	jmp	LBB0_8
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_4:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_en_err
	jmp	LBB0_12
LBB0_9:
	xorl	%ebx, %ebx
	testl	%r10d, %r10d
	je	LBB0_14
## %bb.10:
	movq	_MLX4_EN_BW_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r8d
	je	LBB0_14
## %bb.11:
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%r8d, %edx
	xorl	%eax, %eax
	callq	_en_err
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_13:
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_15:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
                                        ## kill: def $edx killed $edx killed $rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%eax, %eax
	callq	_en_err
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE_8021QAZ_MAX_TCS,4,2       ## @IEEE_8021QAZ_MAX_TCS
	.comm	_MLX4_EN_NUM_UP_HIGH,8,3        ## @MLX4_EN_NUM_UP_HIGH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Bad priority in UP <=> TC mapping. TC: %d, UP: %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"TC[%d]: Not supported TSA: %d\n"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_MLX4_EN_BW_MAX,4,2             ## @MLX4_EN_BW_MAX
L_.str.2:                               ## @.str.2
	.asciz	"Bad ETS BW sum: %d. Should be exactly 100%%\n"

	.no_dead_strip	_mlx4_en_ets_validate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_en_ets_validate
_mlx4_en_ets_validate:                  ; @mlx4_en_ets_validate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.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_7
; %bb.1:
	mov	x2, #0
	mov	w12, #0
	mov	w8, #0
	ldr	x10, [x1]
Lloh3:
	adrp	x11, _MLX4_EN_NUM_UP_HIGH@GOTPAGE
Lloh4:
	ldr	x11, [x11, _MLX4_EN_NUM_UP_HIGH@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x11]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x2, x2, #1
	cmp	x9, x2
	b.eq	LBB0_9
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x10, x2, lsl #3]
	cmp	x13, x11
	b.ge	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x13, [x1, #8]
	ldr	w13, [x13, x2, lsl #2]
	sub	w14, w13, #128
	cmp	w14, #2
	b.lo	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w13, #130
	b.ne	LBB0_15
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x12, [x1, #16]
	ldr	w12, [x12, x2, lsl #2]
	add	w8, w12, w8
	mov	w12, #1
	b	LBB0_2
LBB0_7:
	mov	w9, #0
	b	LBB0_14
LBB0_8:
	str	x13, [sp]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	b	LBB0_12
LBB0_9:
	mov	w9, #0
	cbz	w12, LBB0_14
; %bb.10:
Lloh8:
	adrp	x10, _MLX4_EN_BW_MAX@GOTPAGE
Lloh9:
	ldr	x10, [x10, _MLX4_EN_BW_MAX@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	cmp	w8, w10
	b.eq	LBB0_14
; %bb.11:
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x8
LBB0_12:
	bl	_en_err
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w9, w8
LBB0_14:
	mov	x0, x9
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
LBB0_15:
	str	x13, [sp]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_en_err
Lloh17:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE_8021QAZ_MAX_TCS,4,2       ; @IEEE_8021QAZ_MAX_TCS
	.comm	_MLX4_EN_NUM_UP_HIGH,8,3        ; @MLX4_EN_NUM_UP_HIGH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Bad priority in UP <=> TC mapping. TC: %d, UP: %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"TC[%d]: Not supported TSA: %d\n"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_MLX4_EN_BW_MAX,4,2             ; @MLX4_EN_BW_MAX
l_.str.2:                               ; @.str.2
	.asciz	"Bad ETS BW sum: %d. Should be exactly 100%%\n"

	.no_dead_strip	_mlx4_en_ets_validate
.subsections_via_symbols
