	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function altera_tse_phy_get_addr_mdio_create
_altera_tse_phy_get_addr_mdio_create:   ## @altera_tse_phy_get_addr_mdio_create
	.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
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	8(%rax), %rax
	movq	(%rax), %rdi
	callq	_of_get_phy_mode
	movl	%eax, 16(%rbx)
	xorl	%r15d, %r15d
	testl	%eax, %eax
	je	LBB0_10
## %bb.1:
	movq	8(%rbx), %rax
	movq	(%rax), %rdi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	callq	_of_property_read_u32
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	_POLL_PHY@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%rdx, (%rbx)
	jmp	LBB0_4
LBB0_2:
	movq	(%rbx), %rdx
LBB0_4:
	movq	_POLL_PHY@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_8
## %bb.5:
	testq	%rdx, %rdx
	js	LBB0_7
## %bb.6:
	movq	_PHY_MAX_ADDR@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jge	LBB0_7
LBB0_8:
	movq	_instance_count@GOTPCREL(%rip), %rsi
	movl	$1, %edi
	callq	_atomic_add_return
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_altera_tse_mdio_create
	testl	%eax, %eax
	jne	LBB0_9
	jmp	LBB0_10
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_netdev_err
LBB0_9:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"phy-addr"

	.comm	_POLL_PHY,8,3                   ## @POLL_PHY
	.comm	_PHY_MAX_ADDR,8,3               ## @PHY_MAX_ADDR
L_.str.1:                               ## @.str.1
	.asciz	"invalid phy-addr specified %d\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_instance_count,4,2             ## @instance_count
	.no_dead_strip	_altera_tse_phy_get_addr_mdio_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function altera_tse_phy_get_addr_mdio_create
_altera_tse_phy_get_addr_mdio_create:   ; @altera_tse_phy_get_addr_mdio_create
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	x0, [x8]
	bl	_of_get_phy_mode
	str	w0, [x20, #16]
	cbz	w0, LBB0_10
; %bb.1:
	ldr	x8, [x20, #8]
	ldr	x0, [x8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_of_property_read_u32
Lloh2:
	adrp	x8, _POLL_PHY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _POLL_PHY@GOTPAGEOFF]
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x2, [x8]
	str	x2, [x20]
	b	LBB0_4
LBB0_3:
	ldr	x2, [x20]
LBB0_4:
	ldr	x8, [x8]
	cmp	x2, x8
	b.eq	LBB0_7
; %bb.5:
	tbnz	x2, #63, LBB0_8
; %bb.6:
Lloh4:
	adrp	x8, _PHY_MAX_ADDR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PHY_MAX_ADDR@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cmp	x2, x8
	b.ge	LBB0_8
LBB0_7:
Lloh7:
	adrp	x1, _instance_count@GOTPAGE
Lloh8:
	ldr	x1, [x1, _instance_count@GOTPAGEOFF]
	mov	w0, #1
	bl	_atomic_add_return
	mov	x1, x0
	mov	x0, x19
	bl	_altera_tse_mdio_create
	cbnz	w0, LBB0_9
	b	LBB0_10
LBB0_8:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
LBB0_9:
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"phy-addr"

	.comm	_POLL_PHY,8,3                   ; @POLL_PHY
	.comm	_PHY_MAX_ADDR,8,3               ; @PHY_MAX_ADDR
l_.str.1:                               ; @.str.1
	.asciz	"invalid phy-addr specified %d\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_instance_count,4,2             ; @instance_count
	.no_dead_strip	_altera_tse_phy_get_addr_mdio_create
.subsections_via_symbols
