	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __tg3_readphy
___tg3_readphy:                         ## @__tg3_readphy
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, %ebx
	movl	%esi, %r12d
	movq	%rdi, %r15
	movl	(%rdi), %esi
	movq	_MAC_MI_MODE_AUTO_POLL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%esi, %eax
	je	LBB0_2
## %bb.1:
	movq	_MAC_MI_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	notl	%eax
	andl	%eax, %esi
	callq	_tw32_f
	movl	$80, %edi
	callq	_udelay
LBB0_2:
	movl	4(%r15), %esi
	movq	%r15, %rdi
	callq	_tg3_ape_lock
	movl	$0, (%r14)
	movq	_MI_COM_PHY_ADDR_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r12d
	movq	_MI_COM_PHY_ADDR_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
	movq	_MI_COM_REG_ADDR_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	movq	_MI_COM_REG_ADDR_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	orl	%r12d, %ebx
	movq	_MI_COM_CMD_READ@GOTPCREL(%rip), %rax
	movq	_MI_COM_START@GOTPCREL(%rip), %rcx
	orl	(%rax), %ebx
	orl	(%rcx), %ebx
	movq	_MAC_MI_COM@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movl	%ebx, %esi
	callq	_tw32_f
	movq	_PHY_BUSY_LOOPS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.3:
	movq	_MI_COM_BUSY@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$10, %edi
	callq	_udelay
	movl	(%r12), %edi
	callq	_tr32
	testl	%eax, (%r13)
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	decl	%ebx
	jne	LBB0_4
LBB0_6:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_7:
	movl	$5, %edi
	callq	_udelay
	movl	(%r12), %edi
	callq	_tr32
	movq	_MI_COM_DATA_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
LBB0_8:
	movl	(%r15), %esi
	movq	_MAC_MI_MODE_AUTO_POLL@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_10
## %bb.9:
	movq	_MAC_MI_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_tw32_f
	movl	$80, %edi
	callq	_udelay
LBB0_10:
	movl	4(%r15), %esi
	movq	%r15, %rdi
	callq	_tg3_ape_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAC_MI_MODE_AUTO_POLL,4,2      ## @MAC_MI_MODE_AUTO_POLL
	.comm	_MAC_MI_MODE,4,2                ## @MAC_MI_MODE
	.comm	_MI_COM_PHY_ADDR_SHIFT,4,2      ## @MI_COM_PHY_ADDR_SHIFT
	.comm	_MI_COM_PHY_ADDR_MASK,4,2       ## @MI_COM_PHY_ADDR_MASK
	.comm	_MI_COM_REG_ADDR_SHIFT,4,2      ## @MI_COM_REG_ADDR_SHIFT
	.comm	_MI_COM_REG_ADDR_MASK,4,2       ## @MI_COM_REG_ADDR_MASK
	.comm	_MI_COM_CMD_READ,4,2            ## @MI_COM_CMD_READ
	.comm	_MI_COM_START,4,2               ## @MI_COM_START
	.comm	_MAC_MI_COM,4,2                 ## @MAC_MI_COM
	.comm	_PHY_BUSY_LOOPS,4,2             ## @PHY_BUSY_LOOPS
	.comm	_MI_COM_BUSY,4,2                ## @MI_COM_BUSY
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_MI_COM_DATA_MASK,4,2           ## @MI_COM_DATA_MASK
	.no_dead_strip	___tg3_readphy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __tg3_readphy
___tg3_readphy:                         ; @__tg3_readphy
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x24, _MAC_MI_MODE_AUTO_POLL@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MAC_MI_MODE_AUTO_POLL@GOTPAGEOFF]
	ldr	w9, [x24]
Lloh2:
	adrp	x23, _MAC_MI_MODE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _MAC_MI_MODE@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	w0, [x23]
	bic	w1, w8, w9
	bl	_tw32_f
	mov	w0, #80
	bl	_udelay
LBB0_2:
	ldr	w1, [x19, #4]
	mov	x0, x19
	bl	_tg3_ape_lock
	str	wzr, [x20]
Lloh4:
	adrp	x8, _MI_COM_PHY_ADDR_SHIFT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MI_COM_PHY_ADDR_SHIFT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	lsl	w8, w22, w8
Lloh7:
	adrp	x9, _MI_COM_PHY_ADDR_MASK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MI_COM_PHY_ADDR_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	and	w8, w8, w9
Lloh10:
	adrp	x9, _MI_COM_REG_ADDR_SHIFT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _MI_COM_REG_ADDR_SHIFT@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	lsl	w9, w21, w9
Lloh13:
	adrp	x10, _MI_COM_REG_ADDR_MASK@GOTPAGE
Lloh14:
	ldr	x10, [x10, _MI_COM_REG_ADDR_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	and	w9, w9, w10
Lloh16:
	adrp	x10, _MI_COM_CMD_READ@GOTPAGE
Lloh17:
	ldr	x10, [x10, _MI_COM_CMD_READ@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
Lloh19:
	adrp	x11, _MI_COM_START@GOTPAGE
Lloh20:
	ldr	x11, [x11, _MI_COM_START@GOTPAGEOFF]
Lloh21:
	ldr	w11, [x11]
	orr	w8, w9, w8
	orr	w8, w8, w10
	orr	w1, w8, w11
Lloh22:
	adrp	x21, _MAC_MI_COM@GOTPAGE
Lloh23:
	ldr	x21, [x21, _MAC_MI_COM@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_tw32_f
Lloh24:
	adrp	x8, _PHY_BUSY_LOOPS@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PHY_BUSY_LOOPS@GOTPAGEOFF]
Lloh26:
	ldr	w22, [x8]
	cbz	w22, LBB0_6
; %bb.3:
Lloh27:
	adrp	x25, _MI_COM_BUSY@GOTPAGE
Lloh28:
	ldr	x25, [x25, _MI_COM_BUSY@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_udelay
	ldr	w0, [x21]
	bl	_tr32
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	subs	w22, w22, #1
	b.ne	LBB0_4
LBB0_6:
Lloh29:
	adrp	x8, _EBUSY@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_7:
	mov	w0, #5
	bl	_udelay
	ldr	w0, [x21]
	bl	_tr32
	mov	w21, #0
Lloh32:
	adrp	x8, _MI_COM_DATA_MASK@GOTPAGE
Lloh33:
	ldr	x8, [x8, _MI_COM_DATA_MASK@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	and	w8, w8, w0
	str	w8, [x20]
LBB0_8:
	ldr	w1, [x19]
	ldr	w8, [x24]
	tst	w8, w1
	b.eq	LBB0_10
; %bb.9:
	ldr	w0, [x23]
	bl	_tw32_f
	mov	w0, #80
	bl	_udelay
LBB0_10:
	ldr	w1, [x19, #4]
	mov	x0, x19
	bl	_tg3_ape_unlock
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_MAC_MI_MODE_AUTO_POLL,4,2      ; @MAC_MI_MODE_AUTO_POLL
	.comm	_MAC_MI_MODE,4,2                ; @MAC_MI_MODE
	.comm	_MI_COM_PHY_ADDR_SHIFT,4,2      ; @MI_COM_PHY_ADDR_SHIFT
	.comm	_MI_COM_PHY_ADDR_MASK,4,2       ; @MI_COM_PHY_ADDR_MASK
	.comm	_MI_COM_REG_ADDR_SHIFT,4,2      ; @MI_COM_REG_ADDR_SHIFT
	.comm	_MI_COM_REG_ADDR_MASK,4,2       ; @MI_COM_REG_ADDR_MASK
	.comm	_MI_COM_CMD_READ,4,2            ; @MI_COM_CMD_READ
	.comm	_MI_COM_START,4,2               ; @MI_COM_START
	.comm	_MAC_MI_COM,4,2                 ; @MAC_MI_COM
	.comm	_PHY_BUSY_LOOPS,4,2             ; @PHY_BUSY_LOOPS
	.comm	_MI_COM_BUSY,4,2                ; @MI_COM_BUSY
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_MI_COM_DATA_MASK,4,2           ; @MI_COM_DATA_MASK
	.no_dead_strip	___tg3_readphy
.subsections_via_symbols
