	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bgmac_phy_connect_direct       ## -- Begin function bgmac_phy_connect_direct
	.p2align	4, 0x90
_bgmac_phy_connect_direct:              ## @bgmac_phy_connect_direct
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	$1, -40(%rbp)
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movq	_SPEED_1000@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movq	_PHY_POLL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%r15d, %r15d
	leaq	-40(%rbp), %rsi
	xorl	%edx, %edx
	callq	_fixed_phy_register
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_6:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	4(%r14), %edi
	movq	_bgmac_adjust_link@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_PHY_INTERFACE_MODE_MII@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rsi
	callq	_phy_connect_direct
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	%eax, %r15d
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_6
LBB0_4:
	xorl	%r15d, %r15d
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_DUPLEX_FULL,4,2                ## @DUPLEX_FULL
	.comm	_SPEED_1000,4,2                 ## @SPEED_1000
	.comm	_PHY_POLL,4,2                   ## @PHY_POLL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to register fixed PHY device\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_bgmac_adjust_link,4,2          ## @bgmac_adjust_link
	.comm	_PHY_INTERFACE_MODE_MII,4,2     ## @PHY_INTERFACE_MODE_MII
L_.str.1:                               ## @.str.1
	.asciz	"Connecting PHY failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bgmac_phy_connect_direct       ; -- Begin function bgmac_phy_connect_direct
	.p2align	2
_bgmac_phy_connect_direct:              ; @bgmac_phy_connect_direct
	.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
	mov	x19, x0
	mov	w8, #1
Lloh0:
	adrp	x9, _DUPLEX_FULL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DUPLEX_FULL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _SPEED_1000@GOTPAGE
Lloh4:
	ldr	x10, [x10, _SPEED_1000@GOTPAGEOFF]
	stp	w8, w9, [sp]
Lloh5:
	ldr	w8, [x10]
	str	w8, [sp, #8]
Lloh6:
	adrp	x8, _PHY_POLL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PHY_POLL@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, sp
	mov	x2, #0
	bl	_fixed_phy_register
	cbz	x0, LBB0_2
; %bb.1:
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
LBB0_2:
	ldr	w0, [x19]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_3:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_4:
	ldr	w0, [x19, #4]
Lloh14:
	adrp	x8, _bgmac_adjust_link@GOTPAGE
Lloh15:
	ldr	x8, [x8, _bgmac_adjust_link@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
Lloh17:
	adrp	x8, _PHY_INTERFACE_MODE_MII@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_MII@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
	mov	x1, x20
	bl	_phy_connect_direct
	mov	x20, x0
	cbz	w0, LBB0_3
; %bb.5:
	ldr	w0, [x19]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_DUPLEX_FULL,4,2                ; @DUPLEX_FULL
	.comm	_SPEED_1000,4,2                 ; @SPEED_1000
	.comm	_PHY_POLL,4,2                   ; @PHY_POLL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to register fixed PHY device\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_bgmac_adjust_link,4,2          ; @bgmac_adjust_link
	.comm	_PHY_INTERFACE_MODE_MII,4,2     ; @PHY_INTERFACE_MODE_MII
l_.str.1:                               ; @.str.1
	.asciz	"Connecting PHY failed\n"

.subsections_via_symbols
