	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function txq_set_rate
_txq_set_rate:                          ## @txq_set_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
	movl	%edx, %r12d
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_txq_to_mp
	movq	%rax, %r14
	movslq	%ebx, %rax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	shrq	$38, %rax
	addl	%ecx, %eax
	shll	$6, %eax
	movslq	(%r14), %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
                                        ## kill: def $eax killed $eax killed $rax
	cltd
	idivl	%ecx
	cmpl	$1023, %eax                     ## imm = 0x3FF
	movl	$1023, %r13d                    ## imm = 0x3FF
	cmovll	%eax, %r13d
	addl	$255, %r12d
	sarl	$8, %r12d
	cmpl	$65535, %r12d                   ## imm = 0xFFFF
	movl	$65535, %ebx                    ## imm = 0xFFFF
	cmovll	%r12d, %ebx
	movl	(%r15), %edi
	callq	_TXQ_BW_TOKENS
	movl	%r13d, %edx
	shll	$14, %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_wrlp
	movl	(%r15), %edi
	callq	_TXQ_BW_CONF
	shll	$10, %ebx
	orl	%r13d, %ebx
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wrlp                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_txq_set_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function txq_set_rate
_txq_set_rate:                          ; @txq_set_rate
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_txq_to_mp
	mov	x22, x0
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	smull	x9, w20, w8
	lsr	x10, x9, #63
	lsr	x9, x9, #38
	add	w9, w9, w10
	lsl	w9, w9, #6
	ldrsw	x10, [x0]
	mul	x8, x10, x8
	lsr	x10, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w10
	sdiv	w8, w9, w8
	mov	w9, #1023
	cmp	w8, #1023
	csel	w20, w8, w9, lt
	add	w8, w19, #255
	asr	w8, w8, #8
	mov	w9, #65535
	cmp	w8, w9
	csel	w19, w8, w9, lt
	ldr	w0, [x21]
	bl	_TXQ_BW_TOKENS
	mov	x1, x0
	lsl	w2, w20, #14
	mov	x0, x22
	bl	_wrlp
	ldr	w0, [x21]
	bl	_TXQ_BW_CONF
	mov	x1, x0
	orr	w2, w20, w19, lsl #10
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_wrlp
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_txq_set_rate
.subsections_via_symbols
