	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aqr107_get_downshift
_aqr107_get_downshift:                  ## @aqr107_get_downshift
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	_MDIO_MMD_AN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MDIO_AN_VEND_PROV@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_phy_read_mmd
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movq	_MDIO_AN_VEND_PROV_DOWNSHIFT_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_FIELD_GET
	movl	%eax, %r15d
	movq	_MDIO_AN_VEND_PROV_DOWNSHIFT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_FIELD_GET
	testl	%eax, %eax
	movq	_DOWNSHIFT_DEV_DISABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmovel	%ecx, %eax
	testl	%r15d, %r15d
	cmovel	%ecx, %eax
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
LBB0_2:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MDIO_MMD_AN,4,2                ## @MDIO_MMD_AN
	.comm	_MDIO_AN_VEND_PROV,4,2          ## @MDIO_AN_VEND_PROV
	.comm	_MDIO_AN_VEND_PROV_DOWNSHIFT_EN,4,2 ## @MDIO_AN_VEND_PROV_DOWNSHIFT_EN
	.comm	_MDIO_AN_VEND_PROV_DOWNSHIFT_MASK,4,2 ## @MDIO_AN_VEND_PROV_DOWNSHIFT_MASK
	.comm	_DOWNSHIFT_DEV_DISABLE,4,2      ## @DOWNSHIFT_DEV_DISABLE
	.no_dead_strip	_aqr107_get_downshift
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aqr107_get_downshift
_aqr107_get_downshift:                  ; @aqr107_get_downshift
	.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, x1
Lloh0:
	adrp	x8, _MDIO_MMD_AN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MDIO_MMD_AN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _MDIO_AN_VEND_PROV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MDIO_AN_VEND_PROV@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_phy_read_mmd
	mov	x20, x0
	tbnz	w0, #31, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _MDIO_AN_VEND_PROV_DOWNSHIFT_EN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MDIO_AN_VEND_PROV_DOWNSHIFT_EN@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_FIELD_GET
	mov	x21, x0
Lloh9:
	adrp	x8, _MDIO_AN_VEND_PROV_DOWNSHIFT_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MDIO_AN_VEND_PROV_DOWNSHIFT_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_FIELD_GET
	mov	w20, #0
	cmp	w0, #0
	ccmp	w21, #0, #4, ne
Lloh12:
	adrp	x8, _DOWNSHIFT_DEV_DISABLE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DOWNSHIFT_DEV_DISABLE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	csel	w8, w0, w8, ne
	str	w8, [x19]
LBB0_2:
	mov	x0, x20
	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
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MDIO_MMD_AN,4,2                ; @MDIO_MMD_AN
	.comm	_MDIO_AN_VEND_PROV,4,2          ; @MDIO_AN_VEND_PROV
	.comm	_MDIO_AN_VEND_PROV_DOWNSHIFT_EN,4,2 ; @MDIO_AN_VEND_PROV_DOWNSHIFT_EN
	.comm	_MDIO_AN_VEND_PROV_DOWNSHIFT_MASK,4,2 ; @MDIO_AN_VEND_PROV_DOWNSHIFT_MASK
	.comm	_DOWNSHIFT_DEV_DISABLE,4,2      ; @DOWNSHIFT_DEV_DISABLE
	.no_dead_strip	_aqr107_get_downshift
.subsections_via_symbols
