	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpsw_ndo_set_tx_maxrate
_cpsw_ndo_set_tx_maxrate:               ## @cpsw_ndo_set_tx_maxrate
	.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
	movl	%edx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_netdev_priv
	movq	%rax, %r13
	movq	8(%rax), %r15
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_netdev_get_tx_queue
	xorl	%ebx, %ebx
	cmpl	%r12d, (%rax)
	je	LBB0_16
## %bb.1:
	imull	$1000, %r12d, %ebx              ## imm = 0x3E8
	movl	32(%r15), %edi
	callq	_cpdma_chan_get_min_rate
	testl	%r12d, %r12d
	je	LBB0_4
## %bb.2:
	cmpl	%eax, %ebx
	jge	LBB0_4
## %bb.3:
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_6
LBB0_4:
	cmpl	%r12d, (%r15)
	jge	LBB0_7
## %bb.5:
	movl	(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	%ebx, %r13d
	movl	20(%r15), %edi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	movq	24(%r15), %rax
	movslq	%r14d, %rcx
	movl	(%rax,%rcx,4), %edi
	movl	%r13d, %esi
	callq	_cpdma_chan_set_rate
	movl	%eax, %ebx
	movl	20(%r15), %edi
	callq	_pm_runtime_put
	testl	%ebx, %ebx
	jne	LBB0_16
## %bb.10:
	movl	16(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_15
## %bb.11:
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_15
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rcx
	movq	(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	%r14d, %esi
	callq	_netdev_get_tx_queue
	movl	%r12d, (%rax)
	movl	16(%r15), %eax
	jmp	LBB0_14
LBB0_8:
	movl	%eax, %ebx
	movl	20(%r15), %edi
	callq	_pm_runtime_put_noidle
	jmp	LBB0_16
LBB0_15:
	movq	%r15, %rdi
	callq	_cpsw_split_res
	xorl	%ebx, %ebx
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"The channel rate cannot be less than %dMbps"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"The channel rate cannot be more than 2Gbps"

	.no_dead_strip	_cpsw_ndo_set_tx_maxrate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpsw_ndo_set_tx_maxrate
_cpsw_ndo_set_tx_maxrate:               ; @cpsw_ndo_set_tx_maxrate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x2
	mov	x20, x1
	mov	x23, x0
	bl	_netdev_priv
	mov	x22, x0
	ldr	x21, [x0, #8]
	mov	x0, x23
	mov	x1, x20
	bl	_netdev_get_tx_queue
	ldr	w8, [x0]
	cmp	w8, w19
	b.ne	LBB0_2
LBB0_1:
	mov	w22, #0
	b	LBB0_8
LBB0_2:
	mov	w8, #1000
	mul	w23, w19, w8
	ldr	w0, [x21, #32]
	bl	_cpdma_chan_get_min_rate
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w19, LBB0_5
; %bb.3:
	cmp	w23, w0
	b.ge	LBB0_5
; %bb.4:
	ldr	w8, [x22]
	str	x0, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	b	LBB0_7
LBB0_5:
	ldr	w8, [x21]
	cmp	w8, w19
	b.ge	LBB0_9
; %bb.6:
	ldr	w0, [x22]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	bl	_dev_err
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_8:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_9:
	ldr	w0, [x21, #20]
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_16
; %bb.10:
	ldr	x8, [x21, #24]
	ldr	w0, [x8, w20, sxtw #2]
	mov	x1, x23
	bl	_cpdma_chan_set_rate
	mov	x22, x0
	ldr	w0, [x21, #20]
	bl	_pm_runtime_put
	cbnz	w22, LBB0_8
; %bb.11:
	ldr	w8, [x21, #16]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.12:
	mov	x22, #0
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x22, x22, #1
	cmp	x22, w8, sxtw
	b.ge	LBB0_17
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x21, #8]
	ldr	x0, [x9, x22, lsl #3]
	cbz	x0, LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x1, x20
	bl	_netdev_get_tx_queue
	str	w19, [x0]
	ldr	w8, [x21, #16]
	b	LBB0_13
LBB0_16:
	mov	x22, x0
	ldr	w0, [x21, #20]
	bl	_pm_runtime_put_noidle
	b	LBB0_8
LBB0_17:
	mov	x0, x21
	bl	_cpsw_split_res
	b	LBB0_1
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"The channel rate cannot be less than %dMbps"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"The channel rate cannot be more than 2Gbps"

	.no_dead_strip	_cpsw_ndo_set_tx_maxrate
.subsections_via_symbols
