	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smsc911x_phy_enable_energy_detect
_smsc911x_phy_enable_energy_detect:     ## @smsc911x_phy_enable_energy_detect
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	(%rax), %rbx
	xorl	%r14d, %r14d
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.1:
	movq	%rdi, %r15
	movq	_MII_LAN83C185_CTRL_STATUS@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_phy_read
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	_MII_LAN83C185_EDPWRDOWN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	testl	%eax, %edx
	jne	LBB0_7
## %bb.4:
	movl	(%r12), %esi
	orl	%eax, %edx
	movq	%rbx, %rdi
	callq	_phy_write
	testl	%eax, %eax
	jns	LBB0_7
## %bb.5:
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_6
LBB0_2:
	leaq	L_.str(%rip), %rdx
LBB0_6:
	movl	%eax, %r14d
	movq	_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_SMSC_WARN
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_LAN83C185_CTRL_STATUS,4,2  ## @MII_LAN83C185_CTRL_STATUS
	.comm	_drv,4,2                        ## @drv
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed reading PHY control reg"

	.comm	_MII_LAN83C185_EDPWRDOWN,4,2    ## @MII_LAN83C185_EDPWRDOWN
L_.str.1:                               ## @.str.1
	.asciz	"Failed writing PHY control reg"

	.no_dead_strip	_smsc911x_phy_enable_energy_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smsc911x_phy_enable_energy_detect
_smsc911x_phy_enable_energy_detect:     ; @smsc911x_phy_enable_energy_detect
	.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
	ldr	x8, [x0]
	ldr	x21, [x8]
	cbz	x21, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x22, _MII_LAN83C185_CTRL_STATUS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MII_LAN83C185_CTRL_STATUS@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x21
	bl	_phy_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_5
; %bb.2:
Lloh2:
	adrp	x8, _MII_LAN83C185_EDPWRDOWN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MII_LAN83C185_EDPWRDOWN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w20
	b.ne	LBB0_4
; %bb.3:
	ldr	w1, [x22]
	orr	w2, w8, w20
	mov	x0, x21
	bl	_phy_write
	tbnz	w0, #31, LBB0_6
LBB0_4:
	mov	w20, #0
	b	LBB0_8
LBB0_5:
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_7
LBB0_6:
	mov	x20, x0
Lloh7:
	adrp	x2, l_.str.1@PAGE
Lloh8:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_7:
Lloh9:
	adrp	x8, _drv@GOTPAGE
Lloh10:
	ldr	x8, [x8, _drv@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_SMSC_WARN
LBB0_8:
	mov	x0, x20
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_LAN83C185_CTRL_STATUS,4,2  ; @MII_LAN83C185_CTRL_STATUS
	.comm	_drv,4,2                        ; @drv
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed reading PHY control reg"

	.comm	_MII_LAN83C185_EDPWRDOWN,4,2    ; @MII_LAN83C185_EDPWRDOWN
l_.str.1:                               ; @.str.1
	.asciz	"Failed writing PHY control reg"

	.no_dead_strip	_smsc911x_phy_enable_energy_detect
.subsections_via_symbols
