	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ksz9477_get_interface
_ksz9477_get_interface:                 ## @ksz9477_get_interface
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	cmpl	%esi, (%rdi)
	jle	LBB0_2
## %bb.1:
	movq	_PHY_INTERFACE_MODE_NA@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_2:
	movq	%rdi, %rbx
	movq	_REG_PORT_XMII_CTRL_1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-20(%rbp), %rcx
	callq	_ksz_pread8
	movl	-20(%rbp), %esi
	movq	%rbx, %rdi
	callq	_ksz9477_get_gbit
	movl	%eax, %r14d
	movl	-20(%rbp), %esi
	movq	%rbx, %rdi
	callq	_ksz9477_get_xmii
	testl	%eax, %eax
	je	LBB0_8
## %bb.3:
	cmpl	$1, %eax
	je	LBB0_4
## %bb.5:
	cmpl	$2, %eax
	jne	LBB0_9
## %bb.6:
	testl	%r14d, %r14d
	je	LBB0_8
## %bb.7:
	movq	_PHY_INTERFACE_MODE_GMII@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	movq	_PHY_INTERFACE_MODE_MII@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_4:
	movq	_PHY_INTERFACE_MODE_RMII@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movl	-20(%rbp), %ecx
	movq	_PORT_RGMII_ID_EG_ENABLE@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	movq	_PHY_INTERFACE_MODE_RGMII_TXID@GOTPCREL(%rip), %rdx
	cmoveq	_PHY_INTERFACE_MODE_RGMII@GOTPCREL(%rip), %rdx
	movq	_PORT_RGMII_ID_IG_ENABLE@GOTPCREL(%rip), %rsi
	movq	_PHY_INTERFACE_MODE_RGMII_ID@GOTPCREL(%rip), %rax
	cmoveq	_PHY_INTERFACE_MODE_RGMII_RXID@GOTPCREL(%rip), %rax
	testl	%ecx, (%rsi)
	cmoveq	%rdx, %rax
LBB0_10:
	movl	(%rax), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_INTERFACE_MODE_NA,4,2      ## @PHY_INTERFACE_MODE_NA
	.comm	_REG_PORT_XMII_CTRL_1,4,2       ## @REG_PORT_XMII_CTRL_1
	.comm	_PHY_INTERFACE_MODE_GMII,4,2    ## @PHY_INTERFACE_MODE_GMII
	.comm	_PHY_INTERFACE_MODE_MII,4,2     ## @PHY_INTERFACE_MODE_MII
	.comm	_PHY_INTERFACE_MODE_RMII,4,2    ## @PHY_INTERFACE_MODE_RMII
	.comm	_PHY_INTERFACE_MODE_RGMII,4,2   ## @PHY_INTERFACE_MODE_RGMII
	.comm	_PORT_RGMII_ID_EG_ENABLE,4,2    ## @PORT_RGMII_ID_EG_ENABLE
	.comm	_PHY_INTERFACE_MODE_RGMII_TXID,4,2 ## @PHY_INTERFACE_MODE_RGMII_TXID
	.comm	_PORT_RGMII_ID_IG_ENABLE,4,2    ## @PORT_RGMII_ID_IG_ENABLE
	.comm	_PHY_INTERFACE_MODE_RGMII_RXID,4,2 ## @PHY_INTERFACE_MODE_RGMII_RXID
	.comm	_PHY_INTERFACE_MODE_RGMII_ID,4,2 ## @PHY_INTERFACE_MODE_RGMII_ID
	.no_dead_strip	_ksz9477_get_interface
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ksz9477_get_interface
_ksz9477_get_interface:                 ; @ksz9477_get_interface
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	ldr	w8, [x0]
	cmp	w8, w1
	b.le	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _PHY_INTERFACE_MODE_NA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_NA@GOTPAGEOFF]
	b	LBB0_10
LBB0_2:
	mov	x19, x0
Lloh2:
	adrp	x8, _REG_PORT_XMII_CTRL_1@GOTPAGE
Lloh3:
	ldr	x8, [x8, _REG_PORT_XMII_CTRL_1@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	add	x3, sp, #12
	bl	_ksz_pread8
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_ksz9477_get_gbit
	mov	x20, x0
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_ksz9477_get_xmii
	cbz	w0, LBB0_7
; %bb.3:
	cmp	w0, #1
	b.eq	LBB0_8
; %bb.4:
	cmp	w0, #2
	b.ne	LBB0_9
; %bb.5:
	cbz	w20, LBB0_7
; %bb.6:
Lloh5:
	adrp	x8, _PHY_INTERFACE_MODE_GMII@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_GMII@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
Lloh7:
	adrp	x8, _PHY_INTERFACE_MODE_MII@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_MII@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
Lloh9:
	adrp	x8, _PHY_INTERFACE_MODE_RMII@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_RMII@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh11:
	adrp	x8, _PORT_RGMII_ID_EG_ENABLE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PORT_RGMII_ID_EG_ENABLE@GOTPAGEOFF]
	ldr	w9, [sp, #12]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x10, _PHY_INTERFACE_MODE_RGMII_TXID@GOTPAGE
Lloh15:
	ldr	x10, [x10, _PHY_INTERFACE_MODE_RGMII_TXID@GOTPAGEOFF]
Lloh16:
	adrp	x11, _PHY_INTERFACE_MODE_RGMII@GOTPAGE
Lloh17:
	ldr	x11, [x11, _PHY_INTERFACE_MODE_RGMII@GOTPAGEOFF]
	tst	w8, w9
	csel	x8, x11, x10, eq
Lloh18:
	adrp	x10, _PORT_RGMII_ID_IG_ENABLE@GOTPAGE
Lloh19:
	ldr	x10, [x10, _PORT_RGMII_ID_IG_ENABLE@GOTPAGEOFF]
Lloh20:
	adrp	x11, _PHY_INTERFACE_MODE_RGMII_ID@GOTPAGE
Lloh21:
	ldr	x11, [x11, _PHY_INTERFACE_MODE_RGMII_ID@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
Lloh23:
	adrp	x12, _PHY_INTERFACE_MODE_RGMII_RXID@GOTPAGE
Lloh24:
	ldr	x12, [x12, _PHY_INTERFACE_MODE_RGMII_RXID@GOTPAGEOFF]
	csel	x11, x12, x11, eq
	tst	w10, w9
	csel	x8, x8, x11, eq
LBB0_10:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh22
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_INTERFACE_MODE_NA,4,2      ; @PHY_INTERFACE_MODE_NA
	.comm	_REG_PORT_XMII_CTRL_1,4,2       ; @REG_PORT_XMII_CTRL_1
	.comm	_PHY_INTERFACE_MODE_GMII,4,2    ; @PHY_INTERFACE_MODE_GMII
	.comm	_PHY_INTERFACE_MODE_MII,4,2     ; @PHY_INTERFACE_MODE_MII
	.comm	_PHY_INTERFACE_MODE_RMII,4,2    ; @PHY_INTERFACE_MODE_RMII
	.comm	_PHY_INTERFACE_MODE_RGMII,4,2   ; @PHY_INTERFACE_MODE_RGMII
	.comm	_PORT_RGMII_ID_EG_ENABLE,4,2    ; @PORT_RGMII_ID_EG_ENABLE
	.comm	_PHY_INTERFACE_MODE_RGMII_TXID,4,2 ; @PHY_INTERFACE_MODE_RGMII_TXID
	.comm	_PORT_RGMII_ID_IG_ENABLE,4,2    ; @PORT_RGMII_ID_IG_ENABLE
	.comm	_PHY_INTERFACE_MODE_RGMII_RXID,4,2 ; @PHY_INTERFACE_MODE_RGMII_RXID
	.comm	_PHY_INTERFACE_MODE_RGMII_ID,4,2 ; @PHY_INTERFACE_MODE_RGMII_ID
	.no_dead_strip	_ksz9477_get_interface
.subsections_via_symbols
