	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xcvr_init_1g_rgmii
_xcvr_init_1g_rgmii:                    ## @xcvr_init_1g_rgmii
	.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	%rdi, %r12
	movq	_MIF_CONFIG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_nr64
	movq	_MIF_CONFIG_INDIRECT_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%rbx), %edi
	callq	_nw64
	movq	%r12, %rdi
	callq	_mii_reset
	testl	%eax, %eax
	je	LBB0_1
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	(%r12), %esi
	movq	_MII_BMSR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r12, %rdi
	callq	_mii_read
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	_BMSR_ESTATEN@GOTPCREL(%rip), %r13
	testl	%r14d, (%r13)
	je	LBB0_4
## %bb.5:
	movl	(%r12), %esi
	movq	_MII_ESTATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_mii_read
	movl	%eax, %r15d
	testl	%eax, %eax
	jns	LBB0_6
	jmp	LBB0_14
LBB0_2:
	movl	%r14d, %eax
	jmp	LBB0_14
LBB0_4:
	xorl	%r15d, %r15d
LBB0_6:
	movl	(%r12), %esi
	movq	_MII_BMCR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	callq	_mii_write
	testl	%eax, %eax
	jne	LBB0_14
## %bb.7:
	testl	%r14d, (%r13)
	je	LBB0_11
## %bb.8:
	movq	_ESTATUS_1000_TFULL@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	je	LBB0_10
## %bb.9:
	movq	_ADVERTISE_1000FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_10:
	movl	(%r12), %esi
	movq	_MII_CTRL1000@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%r15d, %ecx
	callq	_mii_write
	testl	%eax, %eax
	jne	LBB0_14
LBB0_11:
	movq	_BMCR_SPEED1000@GOTPCREL(%rip), %rax
	movq	_BMCR_FULLDPLX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	(%r12), %esi
	movq	_MII_BMCR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_mii_write
	testl	%eax, %eax
	jne	LBB0_14
## %bb.12:
	movl	(%r12), %esi
	movq	_MII_BMCR@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%r12, %rdi
	callq	_mii_read
	testl	%eax, %eax
	js	LBB0_14
## %bb.13:
	movl	(%r12), %esi
	movl	(%r14), %edx
	movq	%r12, %rdi
	callq	_mii_read
	movl	(%r12), %esi
	movl	(%rbx), %edx
	movq	%r12, %rdi
	callq	_mii_read
	movl	%eax, %ecx
	sarl	$31, %ecx
	andl	%ecx, %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_MIF_CONFIG,4,2                 ## @MIF_CONFIG
	.comm	_MIF_CONFIG_INDIRECT_MODE,4,2   ## @MIF_CONFIG_INDIRECT_MODE
	.comm	_MII_BMSR,4,2                   ## @MII_BMSR
	.comm	_BMSR_ESTATEN,4,2               ## @BMSR_ESTATEN
	.comm	_MII_ESTATUS,4,2                ## @MII_ESTATUS
	.comm	_MII_BMCR,4,2                   ## @MII_BMCR
	.comm	_ESTATUS_1000_TFULL,4,2         ## @ESTATUS_1000_TFULL
	.comm	_ADVERTISE_1000FULL,4,2         ## @ADVERTISE_1000FULL
	.comm	_MII_CTRL1000,4,2               ## @MII_CTRL1000
	.comm	_BMCR_SPEED1000,4,2             ## @BMCR_SPEED1000
	.comm	_BMCR_FULLDPLX,4,2              ## @BMCR_FULLDPLX
	.no_dead_strip	_xcvr_init_1g_rgmii
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xcvr_init_1g_rgmii
_xcvr_init_1g_rgmii:                    ; @xcvr_init_1g_rgmii
	.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	x20, _MIF_CONFIG@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MIF_CONFIG@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_nr64
Lloh2:
	adrp	x8, _MIF_CONFIG_INDIRECT_MODE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MIF_CONFIG_INDIRECT_MODE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w1, w0, w8
	ldr	w0, [x20]
	bl	_nw64
	mov	x0, x19
	bl	_mii_reset
	cbz	w0, LBB0_2
LBB0_1:
	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_2:
	ldr	w1, [x19]
Lloh5:
	adrp	x22, _MII_BMSR@GOTPAGE
Lloh6:
	ldr	x22, [x22, _MII_BMSR@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_mii_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_5
; %bb.3:
Lloh7:
	adrp	x24, _BMSR_ESTATEN@GOTPAGE
Lloh8:
	ldr	x24, [x24, _BMSR_ESTATEN@GOTPAGEOFF]
	ldr	w8, [x24]
	tst	w8, w20
	b.eq	LBB0_6
; %bb.4:
	ldr	w1, [x19]
Lloh9:
	adrp	x8, _MII_ESTATUS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MII_ESTATUS@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mii_read
	mov	x21, x0
	tbz	w0, #31, LBB0_7
	b	LBB0_1
LBB0_5:
	mov	x0, x20
	b	LBB0_1
LBB0_6:
	mov	w21, #0
LBB0_7:
	ldr	w1, [x19]
Lloh12:
	adrp	x23, _MII_BMCR@GOTPAGE
Lloh13:
	ldr	x23, [x23, _MII_BMCR@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x19
	mov	w3, #0
	bl	_mii_write
	cbnz	w0, LBB0_1
; %bb.8:
	ldr	w8, [x24]
	tst	w8, w20
	b.eq	LBB0_10
; %bb.9:
Lloh14:
	adrp	x8, _ESTATUS_1000_TFULL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ESTATUS_1000_TFULL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _ADVERTISE_1000FULL@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ADVERTISE_1000FULL@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w8, w21
	csel	w3, wzr, w9, eq
	ldr	w1, [x19]
Lloh20:
	adrp	x8, _MII_CTRL1000@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MII_CTRL1000@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mii_write
	cbnz	w0, LBB0_1
LBB0_10:
Lloh23:
	adrp	x8, _BMCR_SPEED1000@GOTPAGE
Lloh24:
	ldr	x8, [x8, _BMCR_SPEED1000@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _BMCR_FULLDPLX@GOTPAGE
Lloh27:
	ldr	x9, [x9, _BMCR_FULLDPLX@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w3, w9, w8
	ldr	w1, [x19]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_mii_write
	cbnz	w0, LBB0_1
; %bb.11:
	ldr	w1, [x19]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_mii_read
	tbnz	w0, #31, LBB0_1
; %bb.12:
	ldr	w1, [x19]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_mii_read
	ldr	w1, [x19]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_mii_read
	cmp	w0, #0
	csel	w0, w0, wzr, lt
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_MIF_CONFIG,4,2                 ; @MIF_CONFIG
	.comm	_MIF_CONFIG_INDIRECT_MODE,4,2   ; @MIF_CONFIG_INDIRECT_MODE
	.comm	_MII_BMSR,4,2                   ; @MII_BMSR
	.comm	_BMSR_ESTATEN,4,2               ; @BMSR_ESTATEN
	.comm	_MII_ESTATUS,4,2                ; @MII_ESTATUS
	.comm	_MII_BMCR,4,2                   ; @MII_BMCR
	.comm	_ESTATUS_1000_TFULL,4,2         ; @ESTATUS_1000_TFULL
	.comm	_ADVERTISE_1000FULL,4,2         ; @ADVERTISE_1000FULL
	.comm	_MII_CTRL1000,4,2               ; @MII_CTRL1000
	.comm	_BMCR_SPEED1000,4,2             ; @BMCR_SPEED1000
	.comm	_BMCR_FULLDPLX,4,2              ; @BMCR_FULLDPLX
	.no_dead_strip	_xcvr_init_1g_rgmii
.subsections_via_symbols
