	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cxgb_set_tx_maxrate
_cxgb_set_tx_maxrate:                   ## @cxgb_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
	subq	$184, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	movl	%esi, %r14d
	movq	%rdi, %r15
	callq	_netdev_priv
	movq	%rax, %r12
	movq	16(%rax), %rbx
	movq	%r15, %rdi
	callq	_can_sched
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	testl	%r14d, %r14d
	js	LBB0_6
## %bb.2:
	cmpl	%r14d, (%r12)
	jle	LBB0_6
## %bb.3:
	movq	_CXGB4_FULL_INIT_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_11
## %bb.4:
	imull	$1000, %r13d, %ecx              ## imm = 0x3E8
	movq	_SCHED_MAX_RATE_KBPS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	jle	LBB0_12
## %bb.5:
	movl	4(%rbx), %edi
	cltq
	imulq	$274877907, %rax, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rax
	shrq	$63, %rax
	sarq	$38, %rcx
	addl	%eax, %ecx
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%r13d, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ERANGE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_7:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%ebx, %ebx
LBB0_9:
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$184, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_12:
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	leaq	-216(%rbp), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$80, %edx
	callq	_memset
	movl	%r14d, -216(%rbp)
	movq	_SCHED_CLS_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -208(%rbp)
	movq	_SCHED_QUEUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	leaq	-216(%rbp), %rsi
	callq	_cxgb4_sched_class_unbind
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movl	%eax, %r8d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	movl	8(%r12), %ecx
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edx
	movl	%r8d, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_10
LBB0_14:
	testl	%r13d, %r13d
	je	LBB0_10
## %bb.15:
	leaq	-136(%rbp), %r13
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$80, %edx
	callq	_memset
	movq	_SCHED_CLASS_TYPE_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	_SCHED_CLASS_LEVEL_CL_RL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	movq	_SCHED_CLASS_MODE_CLASS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)
	movq	_SCHED_CLASS_RATEUNIT_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	movq	_SCHED_CLASS_RATEMODE_ABS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -84(%rbp)
	movl	4(%r12), %eax
	movl	%eax, -88(%rbp)
	movq	_SCHED_CLS_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -96(%rbp)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -120(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -112(%rbp)
	movl	(%r15), %eax
	movl	%eax, -116(%rbp)
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_cxgb4_sched_class_alloc
	testq	%rax, %rax
	je	LBB0_18
## %bb.16:
	movq	%rax, %r12
	leaq	-216(%rbp), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$80, %edx
	callq	_memset
	movl	%r14d, -216(%rbp)
	movq	(%r12), %rax
	movq	%rax, -208(%rbp)
	movq	_SCHED_QUEUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_cxgb4_sched_class_bind
	testl	%eax, %eax
	je	LBB0_10
## %bb.17:
	movl	%eax, %r14d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movl	%r14d, %ebx
	jmp	LBB0_10
LBB0_18:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CXGB4_FULL_INIT_DONE,4,2       ## @CXGB4_FULL_INIT_DONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to rate limit on queue %d. Link Down?\n"

	.comm	_SCHED_MAX_RATE_KBPS,4,2        ## @SCHED_MAX_RATE_KBPS
L_.str.1:                               ## @.str.1
	.asciz	"Invalid rate %u Mbps, Max rate is %u Mbps\n"

	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_SCHED_CLS_NONE,8,3             ## @SCHED_CLS_NONE
	.comm	_SCHED_QUEUE,4,2                ## @SCHED_QUEUE
L_.str.2:                               ## @.str.2
	.asciz	"Unbinding Queue %d on port %d fail. Err: %d\n"

	.comm	_SCHED_CLASS_TYPE_PACKET,4,2    ## @SCHED_CLASS_TYPE_PACKET
	.comm	_SCHED_CLASS_LEVEL_CL_RL,4,2    ## @SCHED_CLASS_LEVEL_CL_RL
	.comm	_SCHED_CLASS_MODE_CLASS,4,2     ## @SCHED_CLASS_MODE_CLASS
	.comm	_SCHED_CLASS_RATEUNIT_BITS,4,2  ## @SCHED_CLASS_RATEUNIT_BITS
	.comm	_SCHED_CLASS_RATEMODE_ABS,4,2   ## @SCHED_CLASS_RATEMODE_ABS
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.3:                               ## @.str.3
	.asciz	"Queue rate limiting failed. Err: %d\n"

	.no_dead_strip	_cxgb_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 cxgb_set_tx_maxrate
_cxgb_set_tx_maxrate:                   ; @cxgb_set_tx_maxrate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #272
	.cfi_def_cfa_offset 272
	stp	x28, x27, [sp, #176]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #192]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #208]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #224]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #240]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #256]            ; 16-byte Folded Spill
	add	x29, sp, #256
	.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	x22, x2
	mov	x19, x1
	mov	x20, x0
	bl	_netdev_priv
	mov	x21, x0
	ldr	x24, [x0, #16]
	mov	x0, x20
	bl	_can_sched
	cbz	w0, LBB0_6
; %bb.1:
	tbnz	w19, #31, LBB0_8
; %bb.2:
	ldr	w8, [x21]
	cmp	w8, w19
	b.le	LBB0_8
; %bb.3:
	ldr	w8, [x24]
Lloh0:
	adrp	x9, _CXGB4_FULL_INIT_DONE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CXGB4_FULL_INIT_DONE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.4:
	mov	w8, #1000
	mul	w26, w22, w8
Lloh3:
	adrp	x8, _SCHED_MAX_RATE_KBPS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SCHED_MAX_RATE_KBPS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w26, w8
	b.le	LBB0_11
; %bb.5:
	ldr	w0, [x24, #4]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	str	x8, [sp]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x22
	bl	_dev_err
Lloh8:
	adrp	x8, _ERANGE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
Lloh10:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
	ldr	w0, [x24, #4]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_err
LBB0_8:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_10:
	mov	x0, x23
	ldp	x29, x30, [sp, #256]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #240]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #224]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #208]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #192]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #176]            ; 16-byte Folded Reload
	add	sp, sp, #272
	ret
LBB0_11:
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #80
	bl	_memset
Lloh16:
	adrp	x27, _SCHED_CLS_NONE@GOTPAGE
Lloh17:
	ldr	x27, [x27, _SCHED_CLS_NONE@GOTPAGEOFF]
	str	w19, [sp, #16]
	ldr	x8, [x27]
	str	x8, [sp, #24]
Lloh18:
	adrp	x25, _SCHED_QUEUE@GOTPAGE
Lloh19:
	ldr	x25, [x25, _SCHED_QUEUE@GOTPAGEOFF]
	ldr	w2, [x25]
	add	x1, sp, #16
	mov	x0, x20
	bl	_cxgb4_sched_class_unbind
	cbz	w0, LBB0_14
; %bb.12:
	mov	x23, x0
	ldr	w0, [x24, #4]
	ldr	w8, [x21, #8]
	stp	x8, x23, [sp]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
LBB0_13:
	bl	_dev_err
	b	LBB0_10
LBB0_14:
	cbz	w22, LBB0_18
; %bb.15:
	add	x0, sp, #96
	mov	w1, #0
	mov	w2, #80
	bl	_memset
Lloh22:
	adrp	x8, _SCHED_CLASS_TYPE_PACKET@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SCHED_CLASS_TYPE_PACKET@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	adrp	x9, _SCHED_CLASS_LEVEL_CL_RL@GOTPAGE
Lloh26:
	ldr	x9, [x9, _SCHED_CLASS_LEVEL_CL_RL@GOTPAGEOFF]
	str	w8, [sp, #168]
Lloh27:
	ldr	w8, [x9]
Lloh28:
	adrp	x9, _SCHED_CLASS_MODE_CLASS@GOTPAGE
Lloh29:
	ldr	x9, [x9, _SCHED_CLASS_MODE_CLASS@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #156]
Lloh31:
	adrp	x8, _SCHED_CLASS_RATEUNIT_BITS@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SCHED_CLASS_RATEUNIT_BITS@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
Lloh34:
	adrp	x9, _SCHED_CLASS_RATEMODE_ABS@GOTPAGE
Lloh35:
	ldr	x9, [x9, _SCHED_CLASS_RATEMODE_ABS@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #148]
	ldr	w8, [x21, #4]
	str	w8, [sp, #144]
	ldr	x8, [x27]
	stp	xzr, x8, [sp, #128]
	str	xzr, [sp, #120]
	ldr	w8, [x20]
	stp	w26, w8, [sp, #112]
	add	x1, sp, #96
	mov	x0, x20
	bl	_cxgb4_sched_class_alloc
	cbz	x0, LBB0_19
; %bb.16:
	mov	x21, x0
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #80
	bl	_memset
	str	w19, [sp, #16]
	ldr	x8, [x21]
	str	x8, [sp, #24]
	ldr	w2, [x25]
	add	x1, sp, #16
	mov	x0, x20
	bl	_cxgb4_sched_class_bind
	mov	x23, x0
	cbz	w0, LBB0_10
; %bb.17:
	ldr	w0, [x24, #4]
Lloh37:
	adrp	x1, l_.str.3@PAGE
Lloh38:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x23
	b	LBB0_13
LBB0_18:
	mov	w23, #0
	b	LBB0_10
LBB0_19:
Lloh39:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh40:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CXGB4_FULL_INIT_DONE,4,2       ; @CXGB4_FULL_INIT_DONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to rate limit on queue %d. Link Down?\n"

	.comm	_SCHED_MAX_RATE_KBPS,4,2        ; @SCHED_MAX_RATE_KBPS
l_.str.1:                               ; @.str.1
	.asciz	"Invalid rate %u Mbps, Max rate is %u Mbps\n"

	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_SCHED_CLS_NONE,8,3             ; @SCHED_CLS_NONE
	.comm	_SCHED_QUEUE,4,2                ; @SCHED_QUEUE
l_.str.2:                               ; @.str.2
	.asciz	"Unbinding Queue %d on port %d fail. Err: %d\n"

	.comm	_SCHED_CLASS_TYPE_PACKET,4,2    ; @SCHED_CLASS_TYPE_PACKET
	.comm	_SCHED_CLASS_LEVEL_CL_RL,4,2    ; @SCHED_CLASS_LEVEL_CL_RL
	.comm	_SCHED_CLASS_MODE_CLASS,4,2     ; @SCHED_CLASS_MODE_CLASS
	.comm	_SCHED_CLASS_RATEUNIT_BITS,4,2  ; @SCHED_CLASS_RATEUNIT_BITS
	.comm	_SCHED_CLASS_RATEMODE_ABS,4,2   ; @SCHED_CLASS_RATEMODE_ABS
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.3:                               ; @.str.3
	.asciz	"Queue rate limiting failed. Err: %d\n"

	.no_dead_strip	_cxgb_set_tx_maxrate
.subsections_via_symbols
