	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_phy_detach                     ## -- Begin function phy_detach
	.p2align	4, 0x90
_phy_detach:                            ## @phy_detach
	.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
	movq	%rdi, %rbx
	movq	32(%rdi), %r14
	cmpq	$0, 40(%rdi)
	movq	%r14, %rax
	je	LBB0_4
## %bb.1:
	testq	%r14, %r14
	je	LBB0_3
## %bb.2:
	leaq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_sysfs_remove_link
LBB0_3:
	leaq	8(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_sysfs_remove_link
	movq	32(%rbx), %rax
LBB0_4:
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	leaq	8(%rbx), %rdi
	movq	_dev_attr_phy_standalone@GOTPCREL(%rip), %rsi
	callq	_sysfs_remove_file
LBB0_6:
	movq	%rbx, %rdi
	callq	_phy_suspend
	testq	%r14, %r14
	je	LBB0_8
## %bb.7:
	movq	32(%rbx), %rax
	movq	$0, 16(%rax)
	movq	$0, 32(%rbx)
LBB0_8:
	movq	$0, 24(%rbx)
	movq	%rbx, %rdi
	callq	_phy_led_triggers_unregister
	movq	(%rbx), %rax
	movq	(%rax), %rdi
	callq	_module_put
	movq	%rbx, %rdi
	callq	_phy_driver_is_genphy
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	callq	_phy_driver_is_genphy_10g
	testq	%rax, %rax
	je	LBB0_11
LBB0_10:
	movq	%rbx, %rdi
	callq	_device_release_driver
LBB0_11:
	movq	16(%rbx), %r15
	movq	%rbx, %rdi
	callq	_put_device
	testq	%r14, %r14
	je	LBB0_12
## %bb.13:
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	jmp	LBB0_14
LBB0_12:
	xorl	%eax, %eax
LBB0_14:
	movq	(%r15), %rdi
	cmpq	%rdi, %rax
	je	LBB0_16
## %bb.15:
	callq	_module_put
LBB0_16:
	movq	%rbx, %rdi
	movl	$1, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_phy_device_reset               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"phydev"

L_.str.1:                               ## @.str.1
	.asciz	"attached_dev"

	.comm	_dev_attr_phy_standalone,4,2    ## @dev_attr_phy_standalone
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_phy_detach                     ; -- Begin function phy_detach
	.p2align	2
_phy_detach:                            ; @phy_detach
	.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	x19, x0
	ldp	x20, x9, [x0, #32]
	mov	x8, x20
	cbz	x9, LBB0_4
; %bb.1:
	cbz	x20, LBB0_3
; %bb.2:
	add	x0, x20, #8
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_sysfs_remove_link
LBB0_3:
	add	x0, x19, #8
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_sysfs_remove_link
	ldr	x8, [x19, #32]
LBB0_4:
	cbnz	x8, LBB0_6
; %bb.5:
	add	x0, x19, #8
Lloh4:
	adrp	x1, _dev_attr_phy_standalone@GOTPAGE
Lloh5:
	ldr	x1, [x1, _dev_attr_phy_standalone@GOTPAGEOFF]
	bl	_sysfs_remove_file
LBB0_6:
	mov	x0, x19
	bl	_phy_suspend
	cbz	x20, LBB0_8
; %bb.7:
	ldr	x8, [x19, #32]
	str	xzr, [x8, #16]
	str	xzr, [x19, #32]
LBB0_8:
	str	xzr, [x19, #24]
	mov	x0, x19
	bl	_phy_led_triggers_unregister
	ldr	x8, [x19]
	ldr	x0, [x8]
	bl	_module_put
	mov	x0, x19
	bl	_phy_driver_is_genphy
	cbnz	x0, LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_phy_driver_is_genphy_10g
	cbz	x0, LBB0_11
LBB0_10:
	mov	x0, x19
	bl	_device_release_driver
LBB0_11:
	ldr	x21, [x19, #16]
	mov	x0, x19
	bl	_put_device
	cbz	x20, LBB0_13
; %bb.12:
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	x8, [x8]
	b	LBB0_14
LBB0_13:
	mov	x8, #0
LBB0_14:
	ldr	x0, [x21]
	cmp	x8, x0
	b.eq	LBB0_16
; %bb.15:
	bl	_module_put
LBB0_16:
	mov	x0, x19
	mov	w1, #1
	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
	b	_phy_device_reset
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"phydev"

l_.str.1:                               ; @.str.1
	.asciz	"attached_dev"

	.comm	_dev_attr_phy_standalone,4,2    ; @dev_attr_phy_standalone
.subsections_via_symbols
