	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl_process_ui_link_quality
_rtl_process_ui_link_quality:           ## @rtl_process_ui_link_quality
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	callq	_rtl_priv
	movq	%rax, %rcx
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_19
## %bb.1:
	movq	16(%rcx), %rdi
	leaq	1(%rdi), %rsi
	movq	%rsi, 16(%rcx)
	movq	_PHY_LINKQUALITY_SLID_WIN_MAX@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	%rdx, %rdi
	jae	LBB0_3
## %bb.2:
	movl	40(%rcx), %edi
	movq	24(%rcx), %r8
	movq	32(%rcx), %rbx
	jmp	LBB0_4
LBB0_3:
	movq	%rdx, 16(%rcx)
	movq	24(%rcx), %r8
	movq	32(%rcx), %rbx
	movl	40(%rcx), %edi
	subl	(%r8,%rbx,4), %edi
	movq	%rdx, %rsi
LBB0_4:
	addl	%eax, %edi
	movl	%edi, 40(%rcx)
	leaq	1(%rbx), %rdi
	movq	%rdi, 32(%rcx)
	movl	%eax, (%r8,%rbx,4)
	cmpq	%rdx, %rdi
	jb	LBB0_6
## %bb.5:
	movq	$0, 32(%rcx)
LBB0_6:
	movslq	40(%rcx), %rax
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_7
## %bb.8:
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_9
LBB0_7:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $eax killed $eax def $rax
LBB0_9:
	movl	%eax, (%rcx)
	movl	%eax, 4(%rcx)
	movq	8(%r14), %rsi
	movl	(%rsi), %edx
	cmpl	$-1, %edx
	je	LBB0_14
## %bb.10:
	movq	8(%rcx), %rdi
	movl	(%rdi), %eax
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%edx, %r8d
	movl	%eax, %edx
	jmp	LBB0_13
LBB0_12:
	movl	%edx, (%rdi)
	movl	(%rsi), %r8d
LBB0_13:
	movq	_RX_SMOOTH_FACTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leal	-1(%rbx), %eax
	imull	%edx, %eax
	addl	%r8d, %eax
	cltd
	idivl	%ebx
	movl	%eax, (%rdi)
LBB0_14:
	movl	4(%rsi), %edx
	cmpl	$-1, %edx
	je	LBB0_19
## %bb.15:
	movq	8(%rcx), %rcx
	movl	4(%rcx), %eax
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%edx, %esi
	movl	%eax, %edx
	jmp	LBB0_18
LBB0_17:
	movl	%edx, 4(%rcx)
	movl	4(%rsi), %esi
LBB0_18:
	movq	_RX_SMOOTH_FACTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leal	-1(%rdi), %eax
	imull	%edx, %eax
	addl	%esi, %eax
	cltd
	idivl	%edi
	movl	%eax, 4(%rcx)
LBB0_19:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_LINKQUALITY_SLID_WIN_MAX,8,3 ## @PHY_LINKQUALITY_SLID_WIN_MAX
	.comm	_RX_SMOOTH_FACTOR,4,2           ## @RX_SMOOTH_FACTOR
	.no_dead_strip	_rtl_process_ui_link_quality
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl_process_ui_link_quality
_rtl_process_ui_link_quality:           ; @rtl_process_ui_link_quality
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	bl	_rtl_priv
	ldr	x8, [x19]
	cbz	x8, LBB0_16
; %bb.1:
	ldr	x11, [x0, #16]
	add	x10, x11, #1
	str	x10, [x0, #16]
Lloh0:
	adrp	x9, _PHY_LINKQUALITY_SLID_WIN_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PHY_LINKQUALITY_SLID_WIN_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x11, x9
	b.hs	LBB0_3
; %bb.2:
	ldr	w13, [x0, #40]
	ldp	x11, x12, [x0, #24]
	b	LBB0_4
LBB0_3:
	str	x9, [x0, #16]
	ldp	x11, x12, [x0, #24]
	ldr	w10, [x11, x12, lsl #2]
	ldr	w13, [x0, #40]
	sub	w13, w13, w10
	mov	x10, x9
LBB0_4:
	add	w13, w13, w8
	str	w13, [x0, #40]
	add	x13, x12, #1
	str	x13, [x0, #32]
	str	w8, [x11, x12, lsl #2]
	cmp	x13, x9
	b.lo	LBB0_6
; %bb.5:
	str	xzr, [x0, #32]
LBB0_6:
	ldrsw	x8, [x0, #40]
	udiv	x8, x8, x10
	stp	w8, w8, [x0]
	ldr	x9, [x19, #8]
	ldr	w10, [x9]
Lloh3:
	adrp	x8, _RX_SMOOTH_FACTOR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RX_SMOOTH_FACTOR@GOTPAGEOFF]
	cmn	w10, #1
	b.eq	LBB0_11
; %bb.7:
	ldr	x11, [x0, #8]
	ldr	w13, [x11]
	cbz	w13, LBB0_9
; %bb.8:
	mov	x12, x10
	mov	x10, x13
	b	LBB0_10
LBB0_9:
	str	w10, [x11]
	ldr	w12, [x9]
LBB0_10:
	ldr	w13, [x8]
	sub	w14, w13, #1
	madd	w10, w14, w10, w12
	sdiv	w10, w10, w13
	str	w10, [x11]
LBB0_11:
	ldr	w10, [x9, #4]
	cmn	w10, #1
	b.eq	LBB0_16
; %bb.12:
	ldr	x11, [x0, #8]
	ldr	w12, [x11, #4]
	cbz	w12, LBB0_14
; %bb.13:
	mov	x9, x10
	mov	x10, x12
	b	LBB0_15
LBB0_14:
	str	w10, [x11, #4]
	ldr	w9, [x9, #4]
LBB0_15:
	ldr	w8, [x8]
	sub	w12, w8, #1
	madd	w9, w12, w10, w9
	sdiv	w8, w9, w8
	str	w8, [x11, #4]
LBB0_16:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_LINKQUALITY_SLID_WIN_MAX,8,3 ; @PHY_LINKQUALITY_SLID_WIN_MAX
	.comm	_RX_SMOOTH_FACTOR,4,2           ; @RX_SMOOTH_FACTOR
	.no_dead_strip	_rtl_process_ui_link_quality
.subsections_via_symbols
