	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_set_vf_rate               ## -- Begin function mlx4_set_vf_rate
	.p2align	4, 0x90
_mlx4_set_vf_rate:                      ## @mlx4_set_vf_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r12d
	movl	%ecx, %r14d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_mlx4_priv
	movq	%rax, %r13
	movq	%r15, %rdi
	callq	_mlx4_is_master
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movq	_MLX4_DEV_CAP_FLAG2_QOS_VPP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_4
## %bb.2:
	testl	%r14d, %r14d
	je	LBB0_8
## %bb.3:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_mlx4_info
	movq	_EPROTONOSUPPORT@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_EPROTONOSUPPORT@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%ebx, %ebx
LBB0_6:
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_mlx4_get_slave_indx
	testl	%eax, %eax
	js	LBB0_11
## %bb.9:
	movq	%r15, %rdi
	movl	%eax, %r14d
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_mlx4_slaves_closest_port
	movl	%eax, %edx
	movq	%r13, %rdi
	movq	8(%r13), %rax
	movl	%r14d, %ecx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	(%rax,%rcx,8), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	%r14d, %esi
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movl	%r12d, %ecx
	callq	_mlx4_set_vport_qos
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_mlx4_info
	jmp	LBB0_7
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_12:
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	movslq	%ebx, %rax
	leaq	(%rax,%rax,2), %rax
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	leaq	(%r14,%rax,8), %rdx
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%r12d, (%r14,%rax,8)
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_mlx4_is_vf_vst_and_prio_qos
	testl	%eax, %eax
	movq	%r14, %rcx
	je	LBB0_18
## %bb.13:
	movl	%ebx, %edx
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%esi, %eax
	testl	%r12d, %r12d
	jne	LBB0_15
## %bb.14:
	movq	_MLX4_VPP_DEFAULT_VPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_15:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, 16(%rcx,%rdi,8)
	movq	(%r13), %rax
	xorl	%ebx, %ebx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_7
## %bb.16:
	movq	_MLX4_DEV_CAP_FLAG2_UPDATE_QP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_7
## %bb.17:
	movq	%r13, %rdi
	callq	_mlx4_master_immediate_activate_vlan_qos
	jmp	LBB0_7
LBB0_18:
	leaq	L_.str.2(%rip), %rsi
	movl	%r12d, %r14d
	movq	%rcx, %r12
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_mlx4_info
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	8(%r12,%rax,8), %rax
	movq	_MLX4_VGT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	leaq	L_.str.4(%rip), %rax
	leaq	L_.str.3(%rip), %rsi
	cmoveq	%rax, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_mlx4_info
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_mlx4_info
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_DEV_CAP_FLAG2_QOS_VPP,4,2 ## @MLX4_DEV_CAP_FLAG2_QOS_VPP
	.comm	_EPROTONOSUPPORT,4,2            ## @EPROTONOSUPPORT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Minimum BW share not supported\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"vf %d failed to set rate %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"rate set for VF %d when not in valid state\n"

	.comm	_MLX4_VGT,8,3                   ## @MLX4_VGT
L_.str.3:                               ## @.str.3
	.asciz	"VST priority not supported by QoS\n"

L_.str.4:                               ## @.str.4
	.asciz	"VF in VGT mode (needed VST)\n"

L_.str.5:                               ## @.str.5
	.asciz	"rate %d take affect when VF moves to valid state\n"

	.comm	_MLX4_VPP_DEFAULT_VPORT,4,2     ## @MLX4_VPP_DEFAULT_VPORT
	.comm	_MLX4_DEV_CAP_FLAG2_UPDATE_QP,4,2 ## @MLX4_DEV_CAP_FLAG2_UPDATE_QP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_set_vf_rate               ; -- Begin function mlx4_set_vf_rate
	.p2align	2
_mlx4_set_vf_rate:                      ; @mlx4_set_vf_rate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x4
	mov	x23, x3
	mov	x22, x2
	mov	x24, x1
	mov	x19, x0
	bl	_mlx4_priv
	mov	x21, x0
	mov	x0, x19
	bl	_mlx4_is_master
	cbz	w0, LBB0_4
; %bb.1:
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _MLX4_DEV_CAP_FLAG2_QOS_VPP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLX4_DEV_CAP_FLAG2_QOS_VPP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	cbz	w23, LBB0_7
; %bb.3:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_mlx4_info
LBB0_4:
Lloh5:
	adrp	x8, _EPROTONOSUPPORT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EPROTONOSUPPORT@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_6:
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_7:
	mov	x0, x19
	mov	x1, x22
	bl	_mlx4_get_slave_indx
	tbnz	w0, #31, LBB0_10
; %bb.8:
	mov	x23, x0
	mov	x0, x19
	mov	x1, x23
	mov	x2, x24
	bl	_mlx4_slaves_closest_port
	mov	x25, x0
	ldr	x8, [x21, #8]
	ldr	x26, [x8, w23, uxtw #3]
	mov	x0, x21
	mov	x1, x23
	mov	x2, x25
	mov	x3, x20
	bl	_mlx4_set_vport_qos
	cbz	w0, LBB0_11
; %bb.9:
	mov	x24, x0
	stp	x22, x20, [sp]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_mlx4_info
	b	LBB0_6
LBB0_10:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_11:
	sxtw	x24, w25
	mov	w8, #24
	madd	x2, x24, x8, x26
	str	w20, [x2]
	mov	x0, x19
	mov	x1, x24
	bl	_mlx4_is_vf_vst_and_prio_qos
	cbz	w0, LBB0_15
; %bb.12:
	mov	w8, w23
Lloh11:
	adrp	x9, _MLX4_VPP_DEFAULT_VPORT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MLX4_VPP_DEFAULT_VPORT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w20, #0
	csel	w9, w9, w23, eq
	mov	w10, #24
	madd	x10, x24, x10, x26
	str	w9, [x10, #16]
	ldr	x9, [x21]
	ldr	x8, [x9, x8, lsl #3]
	cbz	x8, LBB0_16
; %bb.13:
	ldr	w8, [x19]
Lloh14:
	adrp	x9, _MLX4_DEV_CAP_FLAG2_UPDATE_QP@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MLX4_DEV_CAP_FLAG2_UPDATE_QP@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.14:
	mov	x0, x21
	mov	x1, x23
	mov	x2, x24
	bl	_mlx4_master_immediate_activate_vlan_qos
	b	LBB0_16
LBB0_15:
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	str	x22, [sp]
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_mlx4_info
	mov	w8, #24
	madd	x8, x24, x8, x26
	ldr	x8, [x8, #8]
Lloh19:
	adrp	x9, _MLX4_VGT@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MLX4_VGT@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
Lloh22:
	adrp	x10, l_.str.3@PAGE
Lloh23:
	add	x10, x10, l_.str.3@PAGEOFF
Lloh24:
	adrp	x11, l_.str.4@PAGE
Lloh25:
	add	x11, x11, l_.str.4@PAGEOFF
	cmp	x8, x9
	csel	x1, x11, x10, eq
	mov	x0, x19
	bl	_mlx4_info
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	str	x20, [sp]
Lloh26:
	adrp	x1, l_.str.5@PAGE
Lloh27:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_mlx4_info
LBB0_16:
	mov	w24, #0
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_DEV_CAP_FLAG2_QOS_VPP,4,2 ; @MLX4_DEV_CAP_FLAG2_QOS_VPP
	.comm	_EPROTONOSUPPORT,4,2            ; @EPROTONOSUPPORT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Minimum BW share not supported\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"vf %d failed to set rate %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"rate set for VF %d when not in valid state\n"

	.comm	_MLX4_VGT,8,3                   ; @MLX4_VGT
l_.str.3:                               ; @.str.3
	.asciz	"VST priority not supported by QoS\n"

l_.str.4:                               ; @.str.4
	.asciz	"VF in VGT mode (needed VST)\n"

l_.str.5:                               ; @.str.5
	.asciz	"rate %d take affect when VF moves to valid state\n"

	.comm	_MLX4_VPP_DEFAULT_VPORT,4,2     ; @MLX4_VPP_DEFAULT_VPORT
	.comm	_MLX4_DEV_CAP_FLAG2_UPDATE_QP,4,2 ; @MLX4_DEV_CAP_FLAG2_UPDATE_QP
.subsections_via_symbols
