	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_eswitch_set_vport_rate    ## -- Begin function mlx5_eswitch_set_vport_rate
	.p2align	4, 0x90
_mlx5_eswitch_set_vport_rate:           ## @mlx5_eswitch_set_vport_rate
	.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	%rcx, %r12
	movq	%rdx, %rbx
	movq	%rdi, %r13
	callq	_mlx5_eswitch_get_vport
	movq	%rax, %r15
	movq	%r13, %rdi
	callq	_ESW_ALLOWED
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	%r15, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.17:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	4(%r13), %edi
	movq	_max_tsar_bw_share@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MLX5_CAP_QOS
	movq	%rax, %rbx
	movl	4(%r13), %edi
	movq	_esw_bw_share@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MLX5_CAP_QOS
	testq	%rax, %rax
	setne	%r14b
	movq	_MLX5_MIN_BW_SHARE@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	setle	%bl
	movl	4(%r13), %edi
	movq	_esw_rate_limit@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MLX5_CAP_QOS
	testq	%r12, %r12
	je	LBB0_6
## %bb.5:
	andb	%bl, %r14b
	je	LBB0_8
LBB0_6:
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_9
## %bb.7:
	testl	%eax, %eax
	jne	LBB0_9
LBB0_8:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	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_9:
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	(%r15), %r14
	cmpq	%r12, %r14
	je	LBB0_12
## %bb.10:
	movq	%r12, (%r15)
	movq	%r13, %rdi
	callq	_calculate_vports_min_rate_divider
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_normalize_vports_min_rate
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %ebx
	movq	%r14, (%r15)
	jmp	LBB0_15
LBB0_12:
	xorl	%ebx, %ebx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	cmpq	%r14, 8(%r15)
	je	LBB0_15
## %bb.13:
	movl	16(%r15), %ecx
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_esw_vport_qos_config
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.14:
	movq	%r14, 8(%r15)
	xorl	%ebx, %ebx
LBB0_15:
	movq	%r13, %rdi
	callq	_mutex_unlock
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_max_tsar_bw_share,4,2          ## @max_tsar_bw_share
	.comm	_esw_bw_share,4,2               ## @esw_bw_share
	.comm	_MLX5_MIN_BW_SHARE,8,3          ## @MLX5_MIN_BW_SHARE
	.comm	_esw_rate_limit,4,2             ## @esw_rate_limit
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_eswitch_set_vport_rate    ; -- Begin function mlx5_eswitch_set_vport_rate
	.p2align	2
_mlx5_eswitch_set_vport_rate:           ; @mlx5_eswitch_set_vport_rate
	.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	x22, x3
	mov	x20, x2
	mov	x19, x0
	bl	_mlx5_eswitch_get_vport
	mov	x21, x0
	mov	x0, x19
	bl	_ESW_ALLOWED
	cbz	w0, LBB0_3
; %bb.1:
	mov	x0, x21
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x21
	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
	b	_PTR_ERR
LBB0_3:
Lloh0:
	adrp	x8, _EPERM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_9
LBB0_4:
	ldr	w0, [x19, #4]
Lloh2:
	adrp	x8, _max_tsar_bw_share@GOTPAGE
Lloh3:
	ldr	x8, [x8, _max_tsar_bw_share@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_MLX5_CAP_QOS
	mov	x23, x0
	ldr	w0, [x19, #4]
Lloh5:
	adrp	x8, _esw_bw_share@GOTPAGE
Lloh6:
	ldr	x8, [x8, _esw_bw_share@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_MLX5_CAP_QOS
	cmp	x0, #0
Lloh8:
	adrp	x8, _MLX5_MIN_BW_SHARE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MLX5_MIN_BW_SHARE@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	ccmp	x8, x23, #0, ne
	cset	w23, le
	ldr	w0, [x19, #4]
Lloh11:
	adrp	x8, _esw_rate_limit@GOTPAGE
Lloh12:
	ldr	x8, [x8, _esw_rate_limit@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_MLX5_CAP_QOS
	cbz	x22, LBB0_6
; %bb.5:
	cbz	w23, LBB0_8
LBB0_6:
	cbz	x20, LBB0_11
; %bb.7:
	cbnz	w0, LBB0_11
LBB0_8:
Lloh14:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_10:
	mov	x0, x22
	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
LBB0_11:
	mov	x0, x19
	bl	_mutex_lock
	ldr	x23, [x21]
	cmp	x23, x22
	b.eq	LBB0_14
; %bb.12:
	str	x22, [x21]
	mov	x0, x19
	bl	_calculate_vports_min_rate_divider
	mov	x1, x0
	mov	x0, x19
	bl	_normalize_vports_min_rate
	cbz	w0, LBB0_14
; %bb.13:
	mov	x22, x0
	str	x23, [x21]
	b	LBB0_18
LBB0_14:
	ldr	x8, [x21, #8]
	cmp	x8, x20
	b.ne	LBB0_16
; %bb.15:
	mov	w22, #0
	b	LBB0_18
LBB0_16:
	ldr	w3, [x21, #16]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_esw_vport_qos_config
	mov	x22, x0
	cbnz	w0, LBB0_18
; %bb.17:
	str	x20, [x21, #8]
LBB0_18:
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_max_tsar_bw_share,4,2          ; @max_tsar_bw_share
	.comm	_esw_bw_share,4,2               ; @esw_bw_share
	.comm	_MLX5_MIN_BW_SHARE,8,3          ; @MLX5_MIN_BW_SHARE
	.comm	_esw_rate_limit,4,2             ; @esw_rate_limit
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
.subsections_via_symbols
