	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function meson_axg_set_phy_mode
_meson_axg_set_phy_mode:                ## @meson_axg_set_phy_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	(%rdi), %eax
	leal	-129(%rax), %ecx
	cmpl	$4, %ecx
	jae	LBB0_1
## %bb.3:
	movq	_PRG_ETH0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PRG_ETH0_EXT_PHY_MODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_PRG_ETH0_EXT_RGMII_MODE@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_1:
	cmpl	$128, %eax
	jne	LBB0_5
## %bb.2:
	movq	_PRG_ETH0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PRG_ETH0_EXT_PHY_MODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_PRG_ETH0_EXT_RMII_MODE@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %ecx
	callq	_meson8b_dwmac_mask_bits
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_5:
	movl	4(%rdi), %ebx
	movl	%eax, %edi
	callq	_phy_modes
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_PRG_ETH0,4,2                   ## @PRG_ETH0
	.comm	_PRG_ETH0_EXT_PHY_MODE_MASK,4,2 ## @PRG_ETH0_EXT_PHY_MODE_MASK
	.comm	_PRG_ETH0_EXT_RGMII_MODE,4,2    ## @PRG_ETH0_EXT_RGMII_MODE
	.comm	_PRG_ETH0_EXT_RMII_MODE,4,2     ## @PRG_ETH0_EXT_RMII_MODE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fail to set phy-mode %s\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_meson_axg_set_phy_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function meson_axg_set_phy_mode
_meson_axg_set_phy_mode:                ; @meson_axg_set_phy_mode
	.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
	ldr	w8, [x0]
	sub	w9, w8, #129
	cmp	w9, #4
	b.hs	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _PRG_ETH0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PRG_ETH0@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _PRG_ETH0_EXT_PHY_MODE_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PRG_ETH0_EXT_PHY_MODE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _PRG_ETH0_EXT_RGMII_MODE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PRG_ETH0_EXT_RGMII_MODE@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	cmp	w8, #128
	b.ne	LBB0_6
; %bb.3:
Lloh8:
	adrp	x8, _PRG_ETH0@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PRG_ETH0@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _PRG_ETH0_EXT_PHY_MODE_MASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PRG_ETH0_EXT_PHY_MODE_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
Lloh14:
	adrp	x8, _PRG_ETH0_EXT_RMII_MODE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PRG_ETH0_EXT_RMII_MODE@GOTPAGEOFF]
LBB0_4:
	ldr	w3, [x8]
	bl	_meson8b_dwmac_mask_bits
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	w19, [x0, #4]
	mov	x0, x8
	bl	_phy_modes
	mov	x2, x0
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_PRG_ETH0,4,2                   ; @PRG_ETH0
	.comm	_PRG_ETH0_EXT_PHY_MODE_MASK,4,2 ; @PRG_ETH0_EXT_PHY_MODE_MASK
	.comm	_PRG_ETH0_EXT_RGMII_MODE,4,2    ; @PRG_ETH0_EXT_RGMII_MODE
	.comm	_PRG_ETH0_EXT_RMII_MODE,4,2     ; @PRG_ETH0_EXT_RMII_MODE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fail to set phy-mode %s\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_meson_axg_set_phy_mode
.subsections_via_symbols
