	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function socfpga_set_phy_mode_common
_socfpga_set_phy_mode_common:           ## @socfpga_set_phy_mode_common
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	addl	$-128, %edi
	cmpl	$5, %edi
	ja	LBB0_7
## %bb.1:
	movl	$49, %eax
	btl	%edi, %eax
	jae	LBB0_2
## %bb.5:
	movq	_SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_GMII_MII@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movl	$12, %eax
	btl	%edi, %eax
	jae	LBB0_6
## %bb.3:
	movq	_SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RGMII@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_6:
	movq	_SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RMII@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
	movl	%eax, (%rsi)
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RGMII,4,2 ## @SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RGMII
	.comm	_SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_GMII_MII,4,2 ## @SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_GMII_MII
	.comm	_SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RMII,4,2 ## @SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RMII
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_socfpga_set_phy_mode_common
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function socfpga_set_phy_mode_common
_socfpga_set_phy_mode_common:           ; @socfpga_set_phy_mode_common
	.cfi_startproc
; %bb.0:
	sub	w8, w0, #128
	cmp	w8, #5
	b.hi	LBB0_5
; %bb.1:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #49
	tst	w8, w9
	b.eq	LBB0_3
; %bb.2:
	mov	w0, #0
Lloh0:
	adrp	x8, _SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_GMII_MII@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_GMII_MII@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:
	tst	w8, #0xc
	b.eq	LBB0_6
; %bb.4:
	mov	w0, #0
Lloh2:
	adrp	x8, _SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RGMII@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RGMII@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_6:
	mov	w0, #0
Lloh7:
	adrp	x8, _SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RMII@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RMII@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	str	w8, [x1]
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RGMII,4,2 ; @SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RGMII
	.comm	_SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_GMII_MII,4,2 ; @SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_GMII_MII
	.comm	_SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RMII,4,2 ; @SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RMII
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_socfpga_set_phy_mode_common
.subsections_via_symbols
