	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt2712_set_interface
_mt2712_set_interface:                  ## @mt2712_set_interface
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	4(%rdi), %eax
	leal	-129(%rax), %ecx
	cmpl	$4, %ecx
	jae	LBB0_1
## %bb.8:
	movq	_PHY_INTF_RGMII@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %edx
LBB0_10:
	movl	8(%rdi), %edi
	movq	_PERI_ETH_PHY_INTF_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_regmap_write
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_1:
	cmpl	$128, %eax
	je	LBB0_4
## %bb.2:
	cmpl	$133, %eax
	jne	LBB0_7
## %bb.3:
	movq	_PHY_INTF_MII@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_4:
	movl	(%rdi), %edx
	testl	%edx, %edx
	je	LBB0_6
## %bb.5:
	movq	_RMII_CLK_SRC_RXC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_6:
	movq	_PHY_INTF_RMII@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	jmp	LBB0_10
LBB0_7:
	movl	12(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RMII_CLK_SRC_RXC,4,2           ## @RMII_CLK_SRC_RXC
	.comm	_PHY_INTF_MII,4,2               ## @PHY_INTF_MII
	.comm	_PHY_INTF_RMII,4,2              ## @PHY_INTF_RMII
	.comm	_PHY_INTF_RGMII,4,2             ## @PHY_INTF_RGMII
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"phy interface not supported\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PERI_ETH_PHY_INTF_SEL,4,2      ## @PERI_ETH_PHY_INTF_SEL
	.no_dead_strip	_mt2712_set_interface
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt2712_set_interface
_mt2712_set_interface:                  ; @mt2712_set_interface
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	w8, [x0, #4]
	sub	w9, w8, #129
	cmp	w9, #4
	b.hs	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _PHY_INTF_RGMII@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PHY_INTF_RGMII@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	b	LBB0_6
LBB0_2:
	cmp	w8, #128
	b.eq	LBB0_5
; %bb.3:
	cmp	w8, #133
	b.ne	LBB0_7
; %bb.4:
Lloh3:
	adrp	x8, _PHY_INTF_MII@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PHY_INTF_MII@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	b	LBB0_6
LBB0_5:
	ldr	w8, [x0]
Lloh6:
	adrp	x9, _RMII_CLK_SRC_RXC@GOTPAGE
Lloh7:
	ldr	x9, [x9, _RMII_CLK_SRC_RXC@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w8, wzr, w9, eq
Lloh9:
	adrp	x9, _PHY_INTF_RMII@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PHY_INTF_RMII@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w2, w9, w8
LBB0_6:
	ldr	w0, [x0, #8]
Lloh12:
	adrp	x8, _PERI_ETH_PHY_INTF_SEL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PERI_ETH_PHY_INTF_SEL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_regmap_write
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	w0, [x0, #12]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_RMII_CLK_SRC_RXC,4,2           ; @RMII_CLK_SRC_RXC
	.comm	_PHY_INTF_MII,4,2               ; @PHY_INTF_MII
	.comm	_PHY_INTF_RMII,4,2              ; @PHY_INTF_RMII
	.comm	_PHY_INTF_RGMII,4,2             ; @PHY_INTF_RGMII
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"phy interface not supported\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PERI_ETH_PHY_INTF_SEL,4,2      ; @PERI_ETH_PHY_INTF_SEL
	.no_dead_strip	_mt2712_set_interface
.subsections_via_symbols
