	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lan9303_detect_phy_setup
_lan9303_detect_phy_setup:              ## @lan9303_detect_phy_setup
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	_MII_LAN911X_SPECIAL_MODES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	$3, %esi
	callq	*(%rax)
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	setne	%al
	cmpl	$65535, %ebx                    ## imm = 0xFFFF
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %eax
	movl	%eax, (%r14)
	movl	4(%r14), %edi
	leaq	L_.str.2(%rip), %rcx
	leaq	L_.str.3(%rip), %rdx
	testb	%al, %al
	cmovneq	%rcx, %rdx
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_dbg
	xorl	%ebx, %ebx
	jmp	LBB0_3
LBB0_1:
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_err
LBB0_3:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_LAN911X_SPECIAL_MODES,4,2  ## @MII_LAN911X_SPECIAL_MODES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to detect phy config: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Phy setup '%s' detected\n"

L_.str.2:                               ## @.str.2
	.asciz	"1-2-3"

L_.str.3:                               ## @.str.3
	.asciz	"0-1-2"

	.no_dead_strip	_lan9303_detect_phy_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lan9303_detect_phy_setup
_lan9303_detect_phy_setup:              ; @lan9303_detect_phy_setup
	.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
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _MII_LAN911X_SPECIAL_MODES@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MII_LAN911X_SPECIAL_MODES@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x9]
	mov	w1, #3
	blr	x8
	mov	x20, x0
	tbnz	w0, #31, LBB0_2
; %bb.1:
	cmp	w20, #0
	cset	w8, ne
	mov	w9, #65535
	cmp	w20, w9
	cset	w9, ne
	ands	w8, w8, w9
	str	w8, [x19]
	ldr	w0, [x19, #4]
Lloh3:
	adrp	x8, l_.str.3@PAGE
Lloh4:
	add	x8, x8, l_.str.3@PAGEOFF
Lloh5:
	adrp	x9, l_.str.2@PAGE
Lloh6:
	add	x9, x9, l_.str.2@PAGEOFF
	csel	x2, x9, x8, ne
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	mov	w20, #0
	b	LBB0_3
LBB0_2:
	ldr	w0, [x19, #4]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
LBB0_3:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_LAN911X_SPECIAL_MODES,4,2  ; @MII_LAN911X_SPECIAL_MODES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to detect phy config: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Phy setup '%s' detected\n"

l_.str.2:                               ; @.str.2
	.asciz	"1-2-3"

l_.str.3:                               ; @.str.3
	.asciz	"0-1-2"

	.no_dead_strip	_lan9303_detect_phy_setup
.subsections_via_symbols
