	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_atl1_read_phy_reg              ## -- Begin function atl1_read_phy_reg
	.p2align	4, 0x90
_atl1_read_phy_reg:                     ## @atl1_read_phy_reg
	.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	_MDIO_REG_ADDR_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %esi
	movq	_MDIO_REG_ADDR_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %esi
	movq	_MDIO_START@GOTPCREL(%rip), %r13
	orl	(%r13), %esi
	movq	_MDIO_SUP_PREAMBLE@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%rdx, %r12
	movq	%rdi, %r15
	movq	_MDIO_RW@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_MDIO_CLK_25_4@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_MDIO_CLK_SEL_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	orl	%esi, %ebx
	movq	_REG_MDIO_CTRL@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	addq	(%rdi), %rsi
	movl	%ebx, %edi
	callq	_iowrite32
	movq	(%r14), %rdi
	addq	(%r15), %rdi
	callq	_ioread32
	movq	_MDIO_WAIT_TIMES@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	jle	LBB0_2
## %bb.1:
	xorl	%r12d, %r12d
	movq	_MDIO_BUSY@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$2, %edi
	callq	_udelay
	movq	_REG_MDIO_CTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r15), %rdi
	callq	_ioread32
	movl	%eax, %ebx
	movl	(%r13), %eax
	movq	_MDIO_START@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	testl	%ebx, %eax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	incl	%r12d
	cmpl	(%r14), %r12d
	jl	LBB0_4
LBB0_5:
	testl	%ebx, %eax
	je	LBB0_6
LBB0_7:
	movq	_ATLX_ERR_PHY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_8
LBB0_2:
	movq	_MDIO_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%r13), %eax
	testl	%ebx, %eax
	jne	LBB0_7
LBB0_6:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, (%rax)
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MDIO_REG_ADDR_MASK,4,2         ## @MDIO_REG_ADDR_MASK
	.comm	_MDIO_REG_ADDR_SHIFT,4,2        ## @MDIO_REG_ADDR_SHIFT
	.comm	_MDIO_START,4,2                 ## @MDIO_START
	.comm	_MDIO_SUP_PREAMBLE,4,2          ## @MDIO_SUP_PREAMBLE
	.comm	_MDIO_RW,4,2                    ## @MDIO_RW
	.comm	_MDIO_CLK_25_4,4,2              ## @MDIO_CLK_25_4
	.comm	_MDIO_CLK_SEL_SHIFT,4,2         ## @MDIO_CLK_SEL_SHIFT
	.comm	_REG_MDIO_CTRL,8,3              ## @REG_MDIO_CTRL
	.comm	_MDIO_WAIT_TIMES,4,2            ## @MDIO_WAIT_TIMES
	.comm	_MDIO_BUSY,4,2                  ## @MDIO_BUSY
	.comm	_ATLX_ERR_PHY,4,2               ## @ATLX_ERR_PHY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_atl1_read_phy_reg              ; -- Begin function atl1_read_phy_reg
	.p2align	2
_atl1_read_phy_reg:                     ; @atl1_read_phy_reg
	.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	x19, x2
	mov	x20, x0
Lloh0:
	adrp	x8, _MDIO_REG_ADDR_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MDIO_REG_ADDR_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w1
Lloh3:
	adrp	x9, _MDIO_REG_ADDR_SHIFT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MDIO_REG_ADDR_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x22, _MDIO_START@GOTPAGE
Lloh7:
	ldr	x22, [x22, _MDIO_START@GOTPAGEOFF]
	lsl	w8, w8, w9
	ldr	w9, [x22]
	orr	w8, w8, w9
Lloh8:
	adrp	x9, _MDIO_SUP_PREAMBLE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MDIO_SUP_PREAMBLE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh11:
	adrp	x9, _MDIO_RW@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MDIO_RW@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
Lloh14:
	adrp	x10, _MDIO_CLK_25_4@GOTPAGE
Lloh15:
	ldr	x10, [x10, _MDIO_CLK_25_4@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh16:
	ldr	w9, [x10]
Lloh17:
	adrp	x10, _MDIO_CLK_SEL_SHIFT@GOTPAGE
Lloh18:
	ldr	x10, [x10, _MDIO_CLK_SEL_SHIFT@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w21, w8, w9
	ldr	x8, [x0]
Lloh20:
	adrp	x23, _REG_MDIO_CTRL@GOTPAGE
Lloh21:
	ldr	x23, [x23, _REG_MDIO_CTRL@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x1, x9, x8
	mov	x0, x21
	bl	_iowrite32
	ldr	x8, [x20]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_ioread32
Lloh22:
	adrp	x24, _MDIO_WAIT_TIMES@GOTPAGE
Lloh23:
	ldr	x24, [x24, _MDIO_WAIT_TIMES@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	w25, #0
Lloh24:
	adrp	x26, _MDIO_BUSY@GOTPAGE
Lloh25:
	ldr	x26, [x26, _MDIO_BUSY@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #2
	bl	_udelay
	ldr	x8, [x20]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_ioread32
	mov	x21, x0
	ldr	w8, [x22]
	ldr	w9, [x26]
	orr	w8, w9, w8
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w25, w25, #1
	ldr	w9, [x24]
	cmp	w25, w9
	b.lt	LBB0_2
LBB0_4:
	tst	w8, w21
	b.eq	LBB0_7
LBB0_5:
Lloh26:
	adrp	x8, _ATLX_ERR_PHY@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ATLX_ERR_PHY@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	b	LBB0_8
LBB0_6:
	ldr	w8, [x22]
Lloh29:
	adrp	x9, _MDIO_BUSY@GOTPAGE
Lloh30:
	ldr	x9, [x9, _MDIO_BUSY@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w21
	b.ne	LBB0_5
LBB0_7:
	mov	w0, #0
	str	w21, [x19]
LBB0_8:
	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	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_MDIO_REG_ADDR_MASK,4,2         ; @MDIO_REG_ADDR_MASK
	.comm	_MDIO_REG_ADDR_SHIFT,4,2        ; @MDIO_REG_ADDR_SHIFT
	.comm	_MDIO_START,4,2                 ; @MDIO_START
	.comm	_MDIO_SUP_PREAMBLE,4,2          ; @MDIO_SUP_PREAMBLE
	.comm	_MDIO_RW,4,2                    ; @MDIO_RW
	.comm	_MDIO_CLK_25_4,4,2              ; @MDIO_CLK_25_4
	.comm	_MDIO_CLK_SEL_SHIFT,4,2         ; @MDIO_CLK_SEL_SHIFT
	.comm	_REG_MDIO_CTRL,8,3              ; @REG_MDIO_CTRL
	.comm	_MDIO_WAIT_TIMES,4,2            ; @MDIO_WAIT_TIMES
	.comm	_MDIO_BUSY,4,2                  ; @MDIO_BUSY
	.comm	_ATLX_ERR_PHY,4,2               ; @ATLX_ERR_PHY
.subsections_via_symbols
