	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __phylink_connect_phy
___phylink_connect_phy:                 ## @__phylink_connect_phy
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_MLO_AN_FIXED@GOTPCREL(%rip), %rcx
	movl	$1, %edi
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.1:
	movq	_MLO_AN_INBAND@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movl	%r15d, %edi
	callq	_phy_interface_mode_is_8023z
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
LBB0_3:
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_6:
	cmpq	$0, 16(%rbx)
	je	LBB0_8
## %bb.7:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	8(%rbx), %edi
	movq	%r14, %rsi
	xorl	%edx, %edx
	movl	%r15d, %ecx
	callq	_phy_attach_direct
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_phylink_bringup_phy
	movl	%eax, %ebx
	movl	$0, %eax
	testl	%ebx, %ebx
	je	LBB0_11
## %bb.10:
	movq	%r14, %rdi
	callq	_phy_detach
	movl	%ebx, %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_MLO_AN_FIXED,8,3               ## @MLO_AN_FIXED
	.comm	_MLO_AN_INBAND,8,3              ## @MLO_AN_INBAND
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	___phylink_connect_phy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __phylink_connect_phy
___phylink_connect_phy:                 ; @__phylink_connect_phy
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _MLO_AN_FIXED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLO_AN_FIXED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #1
	bl	_WARN_ON
	cbnz	x0, LBB0_4
	b	LBB0_6
LBB0_2:
Lloh3:
	adrp	x9, _MLO_AN_INBAND@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MLO_AN_INBAND@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
	mov	x0, x21
	bl	_phy_interface_mode_is_8023z
	cmp	x0, #0
	cset	w0, ne
	bl	_WARN_ON
	cbz	x0, LBB0_6
LBB0_4:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
	mov	w0, #0
	bl	_WARN_ON
	cbnz	x0, LBB0_4
LBB0_6:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_10
; %bb.7:
Lloh8:
	adrp	x8, _EBUSY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_10:
	ldr	w0, [x20, #8]
	mov	x1, x19
	mov	w2, #0
	mov	x3, x21
	bl	_phy_attach_direct
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.11:
	mov	x0, x20
	mov	x1, x19
	bl	_phylink_bringup_phy
	mov	x21, x0
	cbz	w0, LBB0_9
; %bb.12:
	mov	x0, x19
	bl	_phy_detach
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MLO_AN_FIXED,8,3               ; @MLO_AN_FIXED
	.comm	_MLO_AN_INBAND,8,3              ; @MLO_AN_INBAND
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	___phylink_connect_phy
.subsections_via_symbols
