	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aqr107_get_stat
_aqr107_get_stat:                       ## @aqr107_get_stat
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	_aqr107_hw_stats@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movslq	%esi, %r15
	shlq	$4, %r15
	movl	(%r14,%r15), %edi
	movl	$16, %esi
	callq	_min
	movl	%eax, %r12d
	movl	(%r14,%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_MDIO_MMD_C22EXT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r14,%r15), %rdx
	movq	%r13, %rdi
	callq	_phy_read_mmd
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	leal	-1(%r12), %edi
	xorl	%esi, %esi
	callq	_GENMASK
	movl	%eax, %r13d
	andl	%ebx, %r13d
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	cmpl	%r12d, %ebx
	je	LBB0_5
## %bb.3:
	leaq	(%r14,%r15), %rax
	addq	$8, %rax
	movq	_MDIO_MMD_C22EXT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	(%rax), %rdx
	incq	%rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_phy_read_mmd
	testl	%eax, %eax
	js	LBB0_1
## %bb.4:
	movl	%eax, %r15d
	notl	%r12d
	addl	%r12d, %ebx
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_GENMASK
	andl	%r15d, %eax
	shll	$16, %eax
	addl	%eax, %r13d
	jmp	LBB0_5
LBB0_1:
	movq	_U64_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_5:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_aqr107_hw_stats,8,3            ## @aqr107_hw_stats
	.comm	_MDIO_MMD_C22EXT,4,2            ## @MDIO_MMD_C22EXT
	.comm	_U64_MAX,4,2                    ## @U64_MAX
	.no_dead_strip	_aqr107_get_stat
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aqr107_get_stat
_aqr107_get_stat:                       ; @aqr107_get_stat
	.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
                                        ; kill: def $w1 killed $w1 def $x1
	mov	x19, x0
Lloh0:
	adrp	x8, _aqr107_hw_stats@GOTPAGE
Lloh1:
	ldr	x8, [x8, _aqr107_hw_stats@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	sbfiz	x22, x1, #4, #32
	add	x23, x21, x22
	ldr	w0, [x23]
	mov	w1, #16
	bl	_min
	mov	x20, x0
	ldr	w22, [x21, x22]
Lloh3:
	adrp	x24, _MDIO_MMD_C22EXT@GOTPAGE
Lloh4:
	ldr	x24, [x24, _MDIO_MMD_C22EXT@GOTPAGEOFF]
	ldr	w1, [x24]
	ldr	x2, [x23, #8]!
	mov	x0, x19
	bl	_phy_read_mmd
	tbnz	w0, #31, LBB0_4
; %bb.1:
	mov	x21, x0
	sub	w0, w20, #1
	mov	w1, #0
	bl	_GENMASK
	and	w21, w0, w21
	cmp	w22, w20
	b.eq	LBB0_5
; %bb.2:
	ldr	w1, [x24]
	ldr	x8, [x23]
	add	x2, x8, #1
	mov	x0, x19
	bl	_phy_read_mmd
	tbnz	w0, #31, LBB0_4
; %bb.3:
	mov	x19, x0
	mvn	w8, w20
	add	w0, w22, w8
	mov	w1, #0
	bl	_GENMASK
	and	w8, w0, w19
	add	w21, w21, w8, lsl #16
	b	LBB0_5
LBB0_4:
Lloh5:
	adrp	x8, _U64_MAX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _U64_MAX@GOTPAGEOFF]
Lloh7:
	ldr	w21, [x8]
LBB0_5:
	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
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_aqr107_hw_stats,8,3            ; @aqr107_hw_stats
	.comm	_MDIO_MMD_C22EXT,4,2            ; @MDIO_MMD_C22EXT
	.comm	_U64_MAX,4,2                    ; @U64_MAX
	.no_dead_strip	_aqr107_get_stat
.subsections_via_symbols
