	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gswip_mdio_rd
_gswip_mdio_rd:                         ## @gswip_mdio_rd
	.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
	movl	%edx, %r13d
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	movq	%r15, %rdi
	callq	_gswip_mdio_poll
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_GSWIP_MDIO_CTRL_BUSY@GOTPCREL(%rip), %rax
	movq	_GSWIP_MDIO_CTRL_RD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_GSWIP_MDIO_CTRL_PHYAD_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
	movq	_GSWIP_MDIO_CTRL_PHYAD_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r12d
	movq	_GSWIP_MDIO_CTRL_REGAD_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r13d
	orl	%edx, %r13d
	orl	%r12d, %r13d
	movq	_GSWIP_MDIO_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_gswip_mdio_w
	movq	%r15, %rdi
	callq	_gswip_mdio_poll
	testl	%eax, %eax
	je	LBB0_3
LBB0_2:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_GSWIP_MDIO_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gswip_mdio_r                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"waiting for MDIO bus busy timed out\n"

	.comm	_GSWIP_MDIO_CTRL_BUSY,4,2       ## @GSWIP_MDIO_CTRL_BUSY
	.comm	_GSWIP_MDIO_CTRL_RD,4,2         ## @GSWIP_MDIO_CTRL_RD
	.comm	_GSWIP_MDIO_CTRL_PHYAD_MASK,4,2 ## @GSWIP_MDIO_CTRL_PHYAD_MASK
	.comm	_GSWIP_MDIO_CTRL_PHYAD_SHIFT,4,2 ## @GSWIP_MDIO_CTRL_PHYAD_SHIFT
	.comm	_GSWIP_MDIO_CTRL_REGAD_MASK,4,2 ## @GSWIP_MDIO_CTRL_REGAD_MASK
	.comm	_GSWIP_MDIO_CTRL,4,2            ## @GSWIP_MDIO_CTRL
	.comm	_GSWIP_MDIO_READ,4,2            ## @GSWIP_MDIO_READ
	.no_dead_strip	_gswip_mdio_rd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gswip_mdio_rd
_gswip_mdio_rd:                         ; @gswip_mdio_rd
	.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	x21, x2
	mov	x23, x1
	mov	x19, x0
	ldr	x20, [x0, #8]
	mov	x0, x20
	bl	_gswip_mdio_poll
	cbnz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _GSWIP_MDIO_CTRL_BUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GSWIP_MDIO_CTRL_BUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _GSWIP_MDIO_CTRL_RD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GSWIP_MDIO_CTRL_RD@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _GSWIP_MDIO_CTRL_PHYAD_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _GSWIP_MDIO_CTRL_PHYAD_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _GSWIP_MDIO_CTRL_PHYAD_SHIFT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _GSWIP_MDIO_CTRL_PHYAD_SHIFT@GOTPAGEOFF]
	and	w9, w9, w23
Lloh11:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _GSWIP_MDIO_CTRL_REGAD_MASK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _GSWIP_MDIO_CTRL_REGAD_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	and	w9, w9, w21
	orr	w1, w8, w9
Lloh15:
	adrp	x8, _GSWIP_MDIO_CTRL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GSWIP_MDIO_CTRL@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_gswip_mdio_w
	mov	x0, x20
	bl	_gswip_mdio_poll
	cbz	w0, LBB0_3
LBB0_2:
	mov	x22, x0
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x0, x22
	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
LBB0_3:
Lloh20:
	adrp	x8, _GSWIP_MDIO_READ@GOTPAGE
Lloh21:
	ldr	x8, [x8, _GSWIP_MDIO_READ@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x20
	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
	b	_gswip_mdio_r
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.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 AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"waiting for MDIO bus busy timed out\n"

	.comm	_GSWIP_MDIO_CTRL_BUSY,4,2       ; @GSWIP_MDIO_CTRL_BUSY
	.comm	_GSWIP_MDIO_CTRL_RD,4,2         ; @GSWIP_MDIO_CTRL_RD
	.comm	_GSWIP_MDIO_CTRL_PHYAD_MASK,4,2 ; @GSWIP_MDIO_CTRL_PHYAD_MASK
	.comm	_GSWIP_MDIO_CTRL_PHYAD_SHIFT,4,2 ; @GSWIP_MDIO_CTRL_PHYAD_SHIFT
	.comm	_GSWIP_MDIO_CTRL_REGAD_MASK,4,2 ; @GSWIP_MDIO_CTRL_REGAD_MASK
	.comm	_GSWIP_MDIO_CTRL,4,2            ; @GSWIP_MDIO_CTRL
	.comm	_GSWIP_MDIO_READ,4,2            ; @GSWIP_MDIO_READ
	.no_dead_strip	_gswip_mdio_rd
.subsections_via_symbols
