	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sfp_sm_probe_phy
_sfp_sm_probe_phy:                      ## @sfp_sm_probe_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
	movq	%rdi, %r14
	movq	_T_PHY_RESET_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msleep
	movl	16(%r14), %edi
	movq	_SFP_PHY_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mdiobus_scan
	movq	%rax, %rbx
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	callq	_ERR_PTR
	cmpq	%rax, %rbx
	je	LBB0_7
## %bb.1:
	movq	%rbx, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	8(%r14), %r14d
	movq	%rbx, %rdi
	callq	_PTR_ERR
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	jmp	LBB0_3
LBB0_7:
	movl	8(%r14), %edi
	leaq	L_.str(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_info                       ## TAILCALL
LBB0_4:
	movl	12(%r14), %edi
	movq	%rbx, %rsi
	callq	_sfp_add_phy
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_phy_device_remove
	movq	%rbx, %rdi
	callq	_phy_device_free
	movl	8(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edx
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_6:
	movq	%rbx, (%r14)
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_phy_start                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_T_PHY_RESET_MS,4,2             ## @T_PHY_RESET_MS
	.comm	_SFP_PHY_ADDR,4,2               ## @SFP_PHY_ADDR
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no PHY detected\n"

L_.str.1:                               ## @.str.1
	.asciz	"mdiobus scan returned %ld\n"

L_.str.2:                               ## @.str.2
	.asciz	"sfp_add_phy failed: %d\n"

	.no_dead_strip	_sfp_sm_probe_phy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sfp_sm_probe_phy
_sfp_sm_probe_phy:                      ; @sfp_sm_probe_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	x19, x0
Lloh0:
	adrp	x8, _T_PHY_RESET_MS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _T_PHY_RESET_MS@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_msleep
	ldr	w0, [x19, #16]
Lloh3:
	adrp	x8, _SFP_PHY_ADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SFP_PHY_ADDR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_mdiobus_scan
	mov	x20, x0
Lloh6:
	adrp	x8, _ENODEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	cmp	x20, x0
	b.eq	LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w19, [x19, #8]
	mov	x0, x20
	bl	_PTR_ERR
	mov	x2, x0
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	b	LBB0_6
LBB0_3:
	ldr	w0, [x19, #8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	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	_dev_info
LBB0_4:
	ldr	w0, [x19, #12]
	mov	x1, x20
	bl	_sfp_add_phy
	cbz	w0, LBB0_7
; %bb.5:
	mov	x21, x0
	mov	x0, x20
	bl	_phy_device_remove
	mov	x0, x20
	bl	_phy_device_free
	ldr	w0, [x19, #8]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x21
LBB0_6:
	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	_dev_err
LBB0_7:
	str	x20, [x19]
	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
	b	_phy_start
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_T_PHY_RESET_MS,4,2             ; @T_PHY_RESET_MS
	.comm	_SFP_PHY_ADDR,4,2               ; @SFP_PHY_ADDR
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no PHY detected\n"

l_.str.1:                               ; @.str.1
	.asciz	"mdiobus scan returned %ld\n"

l_.str.2:                               ; @.str.2
	.asciz	"sfp_add_phy failed: %d\n"

	.no_dead_strip	_sfp_sm_probe_phy
.subsections_via_symbols
