	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mvpp2_txp_max_tx_size_set
_mvpp2_txp_max_tx_size_set:             ## @mvpp2_txp_max_tx_size_set
	.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	%rdi, %r14
	movl	(%rdi), %eax
	shll	$3, %eax
	movq	_MVPP2_TXP_MTU_MAX@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	cmpl	%ecx, %eax
	cmovgel	%ecx, %eax
	leal	(%rax,%rax,2), %r13d
	callq	_mvpp2_egress_port
	movl	8(%r14), %edi
	movq	_MVPP2_TXP_SCHED_PORT_INDEX_REG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edx
	callq	_mvpp2_write
	movl	8(%r14), %edi
	movq	_MVPP2_TXP_SCHED_MTU_REG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_mvpp2_read
	movl	(%r15), %edx
	notl	%edx
	andl	%eax, %edx
	orl	%r13d, %edx
	movl	8(%r14), %edi
	movl	(%rbx), %esi
	callq	_mvpp2_write
	movl	8(%r14), %edi
	movq	_MVPP2_TXP_SCHED_TOKEN_SIZE_REG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_mvpp2_read
	movq	_MVPP2_TXP_TOKEN_SIZE_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %edx
	andl	%eax, %edx
	cmpl	%r13d, %edx
	jge	LBB0_2
## %bb.1:
	notl	%ecx
	andl	%ecx, %eax
	orl	%r13d, %eax
	movl	8(%r14), %edi
	movl	(%rbx), %esi
	movl	%eax, %edx
	callq	_mvpp2_write
LBB0_2:
	cmpl	$0, 4(%r14)
	jle	LBB0_7
## %bb.3:
	xorl	%ebx, %ebx
	movq	_MVPP2_TXQ_TOKEN_SIZE_MAX@GOTPCREL(%rip), %r12
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	incl	%ebx
	cmpl	4(%r14), %ebx
	jge	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%r14), %r15d
	movl	%ebx, %edi
	callq	_MVPP2_TXQ_SCHED_TOKEN_SIZE_REG
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_mvpp2_read
	movl	%eax, %r15d
	movl	(%r12), %eax
	movl	%eax, %ecx
	andl	%r15d, %ecx
	cmpl	%r13d, %ecx
	jge	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	notl	%eax
	andl	%eax, %r15d
	orl	%r13d, %r15d
	movq	%r12, %r13
	movl	8(%r14), %r12d
	movl	%ebx, %edi
	callq	_MVPP2_TXQ_SCHED_TOKEN_SIZE_REG
	movl	%r12d, %edi
	movq	%r13, %r12
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movl	%eax, %esi
	movl	%r15d, %edx
	callq	_mvpp2_write
	jmp	LBB0_6
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MVPP2_TXP_MTU_MAX,4,2          ## @MVPP2_TXP_MTU_MAX
	.comm	_MVPP2_TXP_SCHED_PORT_INDEX_REG,4,2 ## @MVPP2_TXP_SCHED_PORT_INDEX_REG
	.comm	_MVPP2_TXP_SCHED_MTU_REG,4,2    ## @MVPP2_TXP_SCHED_MTU_REG
	.comm	_MVPP2_TXP_SCHED_TOKEN_SIZE_REG,4,2 ## @MVPP2_TXP_SCHED_TOKEN_SIZE_REG
	.comm	_MVPP2_TXP_TOKEN_SIZE_MAX,4,2   ## @MVPP2_TXP_TOKEN_SIZE_MAX
	.comm	_MVPP2_TXQ_TOKEN_SIZE_MAX,4,2   ## @MVPP2_TXQ_TOKEN_SIZE_MAX
	.no_dead_strip	_mvpp2_txp_max_tx_size_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mvpp2_txp_max_tx_size_set
_mvpp2_txp_max_tx_size_set:             ; @mvpp2_txp_max_tx_size_set
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	w8, [x0]
	lsl	w8, w8, #3
Lloh0:
	adrp	x20, _MVPP2_TXP_MTU_MAX@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MVPP2_TXP_MTU_MAX@GOTPAGEOFF]
	ldr	w9, [x20]
	cmp	w8, w9
	csel	w8, w8, w9, lt
	add	w23, w8, w8, lsl #1
	bl	_mvpp2_egress_port
	mov	x2, x0
	ldr	w0, [x19, #8]
Lloh2:
	adrp	x8, _MVPP2_TXP_SCHED_PORT_INDEX_REG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MVPP2_TXP_SCHED_PORT_INDEX_REG@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_mvpp2_write
	ldr	w0, [x19, #8]
Lloh5:
	adrp	x21, _MVPP2_TXP_SCHED_MTU_REG@GOTPAGE
Lloh6:
	ldr	x21, [x21, _MVPP2_TXP_SCHED_MTU_REG@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_mvpp2_read
	ldr	w8, [x20]
	bic	w8, w0, w8
	orr	w2, w8, w23
	ldr	w0, [x19, #8]
	ldr	w1, [x21]
	bl	_mvpp2_write
	ldr	w0, [x19, #8]
Lloh7:
	adrp	x20, _MVPP2_TXP_SCHED_TOKEN_SIZE_REG@GOTPAGE
Lloh8:
	ldr	x20, [x20, _MVPP2_TXP_SCHED_TOKEN_SIZE_REG@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_mvpp2_read
Lloh9:
	adrp	x8, _MVPP2_TXP_TOKEN_SIZE_MAX@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MVPP2_TXP_TOKEN_SIZE_MAX@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	and	w9, w8, w0
	cmp	w9, w23
	b.ge	LBB0_2
; %bb.1:
	bic	w8, w0, w8
	orr	w2, w8, w23
	ldr	w0, [x19, #8]
	ldr	w1, [x20]
	bl	_mvpp2_write
LBB0_2:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.3:
	mov	w20, #0
Lloh12:
	adrp	x24, _MVPP2_TXQ_TOKEN_SIZE_MAX@GOTPAGE
Lloh13:
	ldr	x24, [x24, _MVPP2_TXQ_TOKEN_SIZE_MAX@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w20, w20, #1
	ldr	w8, [x19, #4]
	cmp	w20, w8
	b.ge	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w21, [x19, #8]
	mov	x0, x20
	bl	_MVPP2_TXQ_SCHED_TOKEN_SIZE_REG
	mov	x1, x0
	mov	x0, x21
	bl	_mvpp2_read
	ldr	w8, [x24]
	and	w9, w8, w0
	cmp	w9, w23
	b.ge	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	bic	w8, w0, w8
	orr	w21, w8, w23
	ldr	w22, [x19, #8]
	mov	x0, x20
	bl	_MVPP2_TXQ_SCHED_TOKEN_SIZE_REG
	mov	x1, x0
	mov	x0, x22
	mov	x2, x21
	bl	_mvpp2_write
	b	LBB0_4
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MVPP2_TXP_MTU_MAX,4,2          ; @MVPP2_TXP_MTU_MAX
	.comm	_MVPP2_TXP_SCHED_PORT_INDEX_REG,4,2 ; @MVPP2_TXP_SCHED_PORT_INDEX_REG
	.comm	_MVPP2_TXP_SCHED_MTU_REG,4,2    ; @MVPP2_TXP_SCHED_MTU_REG
	.comm	_MVPP2_TXP_SCHED_TOKEN_SIZE_REG,4,2 ; @MVPP2_TXP_SCHED_TOKEN_SIZE_REG
	.comm	_MVPP2_TXP_TOKEN_SIZE_MAX,4,2   ; @MVPP2_TXP_TOKEN_SIZE_MAX
	.comm	_MVPP2_TXQ_TOKEN_SIZE_MAX,4,2   ; @MVPP2_TXQ_TOKEN_SIZE_MAX
	.no_dead_strip	_mvpp2_txp_max_tx_size_set
.subsections_via_symbols
