	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_en_set_tx_maxrate
_mlx4_en_set_tx_maxrate:                ## @mlx4_en_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edx, %ebx
	movl	%esi, %r14d
	callq	_netdev_priv
	movq	(%rax), %rcx
	movq	(%rcx), %rdi
	movq	_MLX4_DEV_CAP_FLAG2_QP_RATE_LIMIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rdi)
	je	LBB0_1
## %bb.2:
	movq	8(%rax), %rax
	movq	_TX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	movslq	%r14d, %rcx
	movq	(%rax,%rcx,8), %rax
	cmpl	$4096, %ebx                     ## imm = 0x1000
	jae	LBB0_3
## %bb.4:
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.5:
	movq	_MLX4_QP_RATE_LIMIT_MBS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -24(%rbp)
	movl	%ebx, -32(%rbp)
	jmp	LBB0_7
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_3:
	movq	_MLX4_QP_RATE_LIMIT_GBS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -24(%rbp)
	movslq	%ebx, %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
	movl	%ecx, -32(%rbp)
	jmp	LBB0_7
LBB0_6:
	movq	$0, -24(%rbp)
	movl	$0, -32(%rbp)
LBB0_7:
	movl	(%rax), %esi
	movq	_MLX4_UPDATE_QP_RATE_LIMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-32(%rbp), %rcx
	callq	_mlx4_update_qp
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TX,8,3                         ## @TX
	.comm	_MLX4_DEV_CAP_FLAG2_QP_RATE_LIMIT,4,2 ## @MLX4_DEV_CAP_FLAG2_QP_RATE_LIMIT
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_MLX4_QP_RATE_LIMIT_GBS,8,3     ## @MLX4_QP_RATE_LIMIT_GBS
	.comm	_MLX4_QP_RATE_LIMIT_MBS,8,3     ## @MLX4_QP_RATE_LIMIT_MBS
	.comm	_MLX4_UPDATE_QP_RATE_LIMIT,4,2  ## @MLX4_UPDATE_QP_RATE_LIMIT
	.no_dead_strip	_mlx4_en_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 mlx4_en_set_tx_maxrate
_mlx4_en_set_tx_maxrate:                ; @mlx4_en_set_tx_maxrate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	mov	x20, x1
	bl	_netdev_priv
	mov	x8, x0
	ldr	x9, [x0]
	ldr	x0, [x9]
	ldr	w9, [x0]
Lloh0:
	adrp	x10, _MLX4_DEV_CAP_FLAG2_QP_RATE_LIMIT@GOTPAGE
Lloh1:
	ldr	x10, [x10, _MLX4_DEV_CAP_FLAG2_QP_RATE_LIMIT@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_4
; %bb.1:
	ldr	x8, [x8, #8]
Lloh3:
	adrp	x9, _TX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TX@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x8, [x8, w20, sxtw #3]
	cmp	w19, #1, lsl #12                ; =4096
	b.hs	LBB0_5
; %bb.2:
	cbz	w19, LBB0_6
; %bb.3:
Lloh6:
	adrp	x9, _MLX4_QP_RATE_LIMIT_MBS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MLX4_QP_RATE_LIMIT_MBS@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	str	x9, [sp, #8]
	str	w19, [sp]
	b	LBB0_7
LBB0_4:
Lloh9:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_5:
Lloh12:
	adrp	x9, _MLX4_QP_RATE_LIMIT_GBS@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MLX4_QP_RATE_LIMIT_GBS@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	str	x9, [sp, #8]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x9, w19, w9
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w10
	str	w9, [sp]
	b	LBB0_7
LBB0_6:
	str	xzr, [sp, #8]
	str	wzr, [sp]
LBB0_7:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _MLX4_UPDATE_QP_RATE_LIMIT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MLX4_UPDATE_QP_RATE_LIMIT@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x3, sp
	bl	_mlx4_update_qp
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_TX,8,3                         ; @TX
	.comm	_MLX4_DEV_CAP_FLAG2_QP_RATE_LIMIT,4,2 ; @MLX4_DEV_CAP_FLAG2_QP_RATE_LIMIT
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_MLX4_QP_RATE_LIMIT_GBS,8,3     ; @MLX4_QP_RATE_LIMIT_GBS
	.comm	_MLX4_QP_RATE_LIMIT_MBS,8,3     ; @MLX4_QP_RATE_LIMIT_MBS
	.comm	_MLX4_UPDATE_QP_RATE_LIMIT,4,2  ; @MLX4_UPDATE_QP_RATE_LIMIT
	.no_dead_strip	_mlx4_en_set_tx_maxrate
.subsections_via_symbols
