	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atl1_write_phy_reg
_atl1_write_phy_reg:                    ## @atl1_write_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_DATA_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %edx
	movq	_MDIO_DATA_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edx
	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
	orl	%edx, %esi
	movq	_MDIO_SUP_PREAMBLE@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%rdi, %r15
	movq	_MDIO_START@GOTPCREL(%rip), %r12
	orl	(%r12), %esi
	movq	_MDIO_CLK_25_4@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_MDIO_CLK_SEL_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r14d
	orl	%esi, %r14d
	movq	_REG_MDIO_CTRL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	addq	(%rdi), %rsi
	movl	%r14d, %edi
	callq	_iowrite32
	movq	(%rbx), %rdi
	addq	(%r15), %rdi
	callq	_ioread32
	movq	_MDIO_WAIT_TIMES@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_2
## %bb.1:
	xorl	%ebx, %ebx
	movq	_MDIO_BUSY@GOTPCREL(%rip), %r14
	.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	(%r14), %ecx
	orl	(%r12), %ecx
	testl	%eax, %ecx
	sete	%cl
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	incl	%ebx
	cmpl	(%r13), %ebx
	jl	LBB0_4
	jmp	LBB0_5
LBB0_2:
	movq	_MDIO_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%r12), %eax
	testl	%r14d, %eax
	sete	%cl
LBB0_5:
	xorl	%eax, %eax
	testb	%cl, %cl
	jne	LBB0_7
## %bb.6:
	movq	_ATLX_ERR_PHY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MDIO_DATA_MASK,4,2             ## @MDIO_DATA_MASK
	.comm	_MDIO_DATA_SHIFT,4,2            ## @MDIO_DATA_SHIFT
	.comm	_MDIO_REG_ADDR_MASK,4,2         ## @MDIO_REG_ADDR_MASK
	.comm	_MDIO_REG_ADDR_SHIFT,4,2        ## @MDIO_REG_ADDR_SHIFT
	.comm	_MDIO_SUP_PREAMBLE,4,2          ## @MDIO_SUP_PREAMBLE
	.comm	_MDIO_START,4,2                 ## @MDIO_START
	.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
	.no_dead_strip	_atl1_write_phy_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atl1_write_phy_reg
_atl1_write_phy_reg:                    ; @atl1_write_phy_reg
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _MDIO_DATA_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MDIO_DATA_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w2
Lloh3:
	adrp	x9, _MDIO_DATA_SHIFT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MDIO_DATA_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	lsl	w8, w8, w9
Lloh6:
	adrp	x9, _MDIO_REG_ADDR_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MDIO_REG_ADDR_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w9, w9, w1
Lloh9:
	adrp	x10, _MDIO_REG_ADDR_SHIFT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MDIO_REG_ADDR_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w9, w8
Lloh12:
	adrp	x9, _MDIO_SUP_PREAMBLE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MDIO_SUP_PREAMBLE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh15:
	adrp	x21, _MDIO_START@GOTPAGE
Lloh16:
	ldr	x21, [x21, _MDIO_START@GOTPAGEOFF]
	ldr	w9, [x21]
Lloh17:
	adrp	x10, _MDIO_CLK_25_4@GOTPAGE
Lloh18:
	ldr	x10, [x10, _MDIO_CLK_25_4@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh19:
	ldr	w9, [x10]
Lloh20:
	adrp	x10, _MDIO_CLK_SEL_SHIFT@GOTPAGE
Lloh21:
	ldr	x10, [x10, _MDIO_CLK_SEL_SHIFT@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w20, w8, w9
	ldr	x8, [x0]
Lloh23:
	adrp	x22, _REG_MDIO_CTRL@GOTPAGE
Lloh24:
	ldr	x22, [x22, _REG_MDIO_CTRL@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x1, x9, x8
	mov	x0, x20
	bl	_iowrite32
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_ioread32
Lloh25:
	adrp	x23, _MDIO_WAIT_TIMES@GOTPAGE
Lloh26:
	ldr	x23, [x23, _MDIO_WAIT_TIMES@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w20, #0
Lloh27:
	adrp	x24, _MDIO_BUSY@GOTPAGE
Lloh28:
	ldr	x24, [x24, _MDIO_BUSY@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #2
	bl	_udelay
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_ioread32
	ldr	w8, [x21]
	ldr	w9, [x24]
	orr	w8, w9, w8
	ands	w9, w8, w0
	cset	w8, eq
	cbz	w9, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w20, w20, #1
	ldr	w9, [x23]
	cmp	w20, w9
	b.lt	LBB0_2
	b	LBB0_5
LBB0_4:
	ldr	w8, [x21]
Lloh29:
	adrp	x9, _MDIO_BUSY@GOTPAGE
Lloh30:
	ldr	x9, [x9, _MDIO_BUSY@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w20
	cset	w8, eq
LBB0_5:
Lloh32:
	adrp	x9, _ATLX_ERR_PHY@GOTPAGE
Lloh33:
	ldr	x9, [x9, _ATLX_ERR_PHY@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w0, wzr, w9, ne
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_MDIO_DATA_MASK,4,2             ; @MDIO_DATA_MASK
	.comm	_MDIO_DATA_SHIFT,4,2            ; @MDIO_DATA_SHIFT
	.comm	_MDIO_REG_ADDR_MASK,4,2         ; @MDIO_REG_ADDR_MASK
	.comm	_MDIO_REG_ADDR_SHIFT,4,2        ; @MDIO_REG_ADDR_SHIFT
	.comm	_MDIO_SUP_PREAMBLE,4,2          ; @MDIO_SUP_PREAMBLE
	.comm	_MDIO_START,4,2                 ; @MDIO_START
	.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
	.no_dead_strip	_atl1_write_phy_reg
.subsections_via_symbols
