	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function axienet_mdio_read
_axienet_mdio_read:                     ## @axienet_mdio_read
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	(%rdi), %r12
	movq	%r12, %rdi
	callq	_axienet_mdio_wait_until_ready
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	movq	_XAE_MDIO_MCR_PHYAD_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%r15d, %eax
	shll	%cl, %eax
	movq	_XAE_MDIO_MCR_PHYAD_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_XAE_MDIO_MCR_REGAD_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%r14d, %edx
	shll	%cl, %edx
	movq	_XAE_MDIO_MCR_OFFSET@GOTPCREL(%rip), %rcx
	movq	_XAE_MDIO_MCR_REGAD_MASK@GOTPCREL(%rip), %rsi
	andl	(%rsi), %edx
	orl	%eax, %edx
	movq	_XAE_MDIO_MCR_INITIATE_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	(%rcx), %esi
	movq	_XAE_MDIO_MCR_OP_READ_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r12, %rdi
	callq	_axienet_iow
	movq	%r12, %rdi
	callq	_axienet_mdio_wait_until_ready
	testl	%eax, %eax
	js	LBB0_4
## %bb.2:
	movq	_XAE_MDIO_MRD_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_axienet_ior
	movzwl	%ax, %ebx
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	movl	%ebx, %r8d
	callq	_dev_dbg
	jmp	LBB0_5
LBB0_4:
	movl	%eax, %ebx
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XAE_MDIO_MCR_OFFSET,4,2        ## @XAE_MDIO_MCR_OFFSET
	.comm	_XAE_MDIO_MCR_PHYAD_SHIFT,4,2   ## @XAE_MDIO_MCR_PHYAD_SHIFT
	.comm	_XAE_MDIO_MCR_PHYAD_MASK,4,2    ## @XAE_MDIO_MCR_PHYAD_MASK
	.comm	_XAE_MDIO_MCR_REGAD_SHIFT,4,2   ## @XAE_MDIO_MCR_REGAD_SHIFT
	.comm	_XAE_MDIO_MCR_REGAD_MASK,4,2    ## @XAE_MDIO_MCR_REGAD_MASK
	.comm	_XAE_MDIO_MCR_INITIATE_MASK,4,2 ## @XAE_MDIO_MCR_INITIATE_MASK
	.comm	_XAE_MDIO_MCR_OP_READ_MASK,4,2  ## @XAE_MDIO_MCR_OP_READ_MASK
	.comm	_XAE_MDIO_MRD_OFFSET,4,2        ## @XAE_MDIO_MRD_OFFSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"axienet_mdio_read(phy_id=%i, reg=%x) == %x\n"

	.no_dead_strip	_axienet_mdio_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function axienet_mdio_read
_axienet_mdio_read:                     ; @axienet_mdio_read
	.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, x2
	mov	x20, x1
	ldr	x21, [x0]
	mov	x0, x21
	bl	_axienet_mdio_wait_until_ready
	tbnz	w0, #31, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _XAE_MDIO_MCR_OFFSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XAE_MDIO_MCR_OFFSET@GOTPAGEOFF]
Lloh2:
	adrp	x9, _XAE_MDIO_MCR_PHYAD_SHIFT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _XAE_MDIO_MCR_PHYAD_SHIFT@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	ldr	w8, [x9]
	lsl	w8, w20, w8
Lloh6:
	adrp	x9, _XAE_MDIO_MCR_PHYAD_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _XAE_MDIO_MCR_PHYAD_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w8, w8, w9
Lloh9:
	adrp	x9, _XAE_MDIO_MCR_REGAD_SHIFT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _XAE_MDIO_MCR_REGAD_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _XAE_MDIO_MCR_REGAD_MASK@GOTPAGE
Lloh13:
	ldr	x10, [x10, _XAE_MDIO_MCR_REGAD_MASK@GOTPAGEOFF]
	lsl	w9, w19, w9
Lloh14:
	ldr	w10, [x10]
	and	w9, w9, w10
	orr	w8, w9, w8
Lloh15:
	adrp	x9, _XAE_MDIO_MCR_INITIATE_MASK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _XAE_MDIO_MCR_INITIATE_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh18:
	adrp	x9, _XAE_MDIO_MCR_OP_READ_MASK@GOTPAGE
Lloh19:
	ldr	x9, [x9, _XAE_MDIO_MCR_OP_READ_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x21
	bl	_axienet_iow
	mov	x0, x21
	bl	_axienet_mdio_wait_until_ready
	tbnz	w0, #31, LBB0_3
; %bb.2:
Lloh21:
	adrp	x8, _XAE_MDIO_MRD_OFFSET@GOTPAGE
Lloh22:
	ldr	x8, [x8, _XAE_MDIO_MRD_OFFSET@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_axienet_ior
	and	w22, w0, #0xffff
	ldr	w0, [x21]
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x19
	mov	x4, x22
	bl	_dev_dbg
	b	LBB0_4
LBB0_3:
	mov	x22, x0
LBB0_4:
	mov	x0, x22
	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
	ret
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_XAE_MDIO_MCR_OFFSET,4,2        ; @XAE_MDIO_MCR_OFFSET
	.comm	_XAE_MDIO_MCR_PHYAD_SHIFT,4,2   ; @XAE_MDIO_MCR_PHYAD_SHIFT
	.comm	_XAE_MDIO_MCR_PHYAD_MASK,4,2    ; @XAE_MDIO_MCR_PHYAD_MASK
	.comm	_XAE_MDIO_MCR_REGAD_SHIFT,4,2   ; @XAE_MDIO_MCR_REGAD_SHIFT
	.comm	_XAE_MDIO_MCR_REGAD_MASK,4,2    ; @XAE_MDIO_MCR_REGAD_MASK
	.comm	_XAE_MDIO_MCR_INITIATE_MASK,4,2 ; @XAE_MDIO_MCR_INITIATE_MASK
	.comm	_XAE_MDIO_MCR_OP_READ_MASK,4,2  ; @XAE_MDIO_MCR_OP_READ_MASK
	.comm	_XAE_MDIO_MRD_OFFSET,4,2        ; @XAE_MDIO_MRD_OFFSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"axienet_mdio_read(phy_id=%i, reg=%x) == %x\n"

	.no_dead_strip	_axienet_mdio_read
.subsections_via_symbols
