	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bcmgenet_mii_setup             ## -- Begin function bcmgenet_mii_setup
	.p2align	4, 0x90
_bcmgenet_mii_setup:                    ## @bcmgenet_mii_setup
	.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, %rbx
	callq	_netdev_priv
	movq	%rax, %r12
	movq	(%rbx), %r14
	movq	(%rax), %rax
	movq	(%r14), %rcx
	cmpq	%rcx, %rax
	jne	LBB0_3
## %bb.1:
	xorl	%esi, %esi
	testq	%rax, %rax
	jne	LBB0_4
	jmp	LBB0_2
LBB0_3:
	movq	%rcx, (%r12)
	movl	$1, %esi
	testq	%rcx, %rcx
	je	LBB0_19
LBB0_4:
	movq	8(%r14), %rcx
	cmpq	%rcx, 8(%r12)
	je	LBB0_6
## %bb.5:
	movq	%rcx, 8(%r12)
	movl	$1, %esi
LBB0_6:
	movq	16(%r14), %rdx
	cmpq	%rdx, 16(%r12)
	jne	LBB0_9
## %bb.7:
	movq	24(%r14), %rax
	cmpq	%rax, 24(%r12)
	jne	LBB0_10
## %bb.8:
	testl	%esi, %esi
	jne	LBB0_11
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%rdx, 16(%r12)
	movq	24(%r14), %rax
	cmpq	%rax, 24(%r12)
	je	LBB0_11
LBB0_10:
	movq	%r12, %rsi
	addq	$24, %rsi
	movq	%rax, (%rsi)
LBB0_11:
	movq	_SPEED_1000@GOTPCREL(%rip), %rdi
	movq	_SPEED_100@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	jne	LBB0_12
## %bb.13:
	movq	_UMAC_SPEED_100@GOTPCREL(%rip), %rsi
	cmpq	(%rdi), %rcx
	je	LBB0_15
	jmp	LBB0_16
LBB0_12:
	movq	_UMAC_SPEED_10@GOTPCREL(%rip), %rsi
	cmpq	(%rdi), %rcx
	jne	LBB0_16
LBB0_15:
	movq	_UMAC_SPEED_1000@GOTPCREL(%rip), %rsi
LBB0_16:
	movl	(%rsi), %r15d
	movq	_CMD_SPEED_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r15d
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rsi
	xorl	%ebx, %ebx
	movq	_CMD_HD_EN@GOTPCREL(%rip), %rdi
	movl	$0, %ecx
	cmpq	(%rsi), %rdx
	je	LBB0_18
## %bb.17:
	movl	(%rdi), %ecx
LBB0_18:
	movq	_CMD_RX_PAUSE_IGNORE@GOTPCREL(%rip), %rsi
	movq	_CMD_TX_PAUSE_IGNORE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rsi), %edx
	testq	%rax, %rax
	cmovel	%edx, %ebx
	orl	%ecx, %ebx
	movq	_EXT_RGMII_OOB_CTRL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_bcmgenet_ext_readl
	movq	_OOB_DISABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movq	_RGMII_LINK@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	(%r13), %edx
	movq	%r12, %rdi
	callq	_bcmgenet_ext_writel
	movq	_UMAC_CMD@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_bcmgenet_umac_readl
	movq	_CMD_SPEED_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_CMD_SPEED_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movq	_CMD_HD_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_CMD_RX_PAUSE_IGNORE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_CMD_TX_PAUSE_IGNORE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	orl	%ebx, %edx
	orl	%edx, %r15d
	movl	(%r13), %edx
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_bcmgenet_umac_writel
	jmp	LBB0_20
LBB0_19:
	movq	%rbx, %rdi
	callq	_netif_carrier_off
LBB0_20:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_phy_print_status               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SPEED_1000,8,3                 ## @SPEED_1000
	.comm	_UMAC_SPEED_1000,4,2            ## @UMAC_SPEED_1000
	.comm	_SPEED_100,8,3                  ## @SPEED_100
	.comm	_UMAC_SPEED_100,4,2             ## @UMAC_SPEED_100
	.comm	_UMAC_SPEED_10,4,2              ## @UMAC_SPEED_10
	.comm	_CMD_SPEED_SHIFT,4,2            ## @CMD_SPEED_SHIFT
	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
	.comm	_CMD_HD_EN,4,2                  ## @CMD_HD_EN
	.comm	_CMD_RX_PAUSE_IGNORE,4,2        ## @CMD_RX_PAUSE_IGNORE
	.comm	_CMD_TX_PAUSE_IGNORE,4,2        ## @CMD_TX_PAUSE_IGNORE
	.comm	_EXT_RGMII_OOB_CTRL,4,2         ## @EXT_RGMII_OOB_CTRL
	.comm	_OOB_DISABLE,4,2                ## @OOB_DISABLE
	.comm	_RGMII_LINK,4,2                 ## @RGMII_LINK
	.comm	_UMAC_CMD,4,2                   ## @UMAC_CMD
	.comm	_CMD_SPEED_MASK,4,2             ## @CMD_SPEED_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bcmgenet_mii_setup             ; -- Begin function bcmgenet_mii_setup
	.p2align	2
_bcmgenet_mii_setup:                    ; @bcmgenet_mii_setup
	.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	x21, x0
	bl	_netdev_priv
	mov	x20, x0
	ldr	x19, [x21]
	ldr	x8, [x0]
	ldr	x9, [x19]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	cbz	x8, LBB0_10
; %bb.2:
	mov	w11, #0
	b	LBB0_5
LBB0_3:
	str	x9, [x20]
	cbz	x9, LBB0_14
; %bb.4:
	mov	w11, #1
LBB0_5:
	ldr	x9, [x20, #8]
	ldr	x8, [x19, #8]
	cmp	x9, x8
	b.eq	LBB0_7
; %bb.6:
	str	x8, [x20, #8]
	mov	w11, #1
LBB0_7:
	ldr	x10, [x20, #16]
	ldr	x9, [x19, #16]
	mov	x12, x20
	cmp	x10, x9
	b.ne	LBB0_11
; %bb.8:
	ldr	x13, [x12, #24]!
	ldr	x10, [x19, #24]
	cmp	x13, x10
	b.ne	LBB0_12
; %bb.9:
	cbnz	w11, LBB0_13
LBB0_10:
	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
LBB0_11:
	ldr	x11, [x12, #24]!
	stur	x9, [x12, #-8]
	ldr	x10, [x19, #24]
	cmp	x11, x10
	b.eq	LBB0_13
LBB0_12:
	str	x10, [x12]
LBB0_13:
Lloh0:
	adrp	x11, _SPEED_1000@GOTPAGE
Lloh1:
	ldr	x11, [x11, _SPEED_1000@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x11]
Lloh3:
	adrp	x12, _SPEED_100@GOTPAGE
Lloh4:
	ldr	x12, [x12, _SPEED_100@GOTPAGEOFF]
Lloh5:
	adrp	x13, _UMAC_SPEED_1000@GOTPAGE
Lloh6:
	ldr	x13, [x13, _UMAC_SPEED_1000@GOTPAGEOFF]
Lloh7:
	ldr	x12, [x12]
Lloh8:
	adrp	x14, _UMAC_SPEED_100@GOTPAGE
Lloh9:
	ldr	x14, [x14, _UMAC_SPEED_100@GOTPAGEOFF]
Lloh10:
	adrp	x15, _UMAC_SPEED_10@GOTPAGE
Lloh11:
	ldr	x15, [x15, _UMAC_SPEED_10@GOTPAGEOFF]
	cmp	x8, x12
	csel	x12, x14, x15, eq
	cmp	x8, x11
	csel	x8, x13, x12, eq
	ldr	w8, [x8]
Lloh12:
	adrp	x21, _CMD_SPEED_SHIFT@GOTPAGE
Lloh13:
	ldr	x21, [x21, _CMD_SPEED_SHIFT@GOTPAGEOFF]
	ldr	w11, [x21]
	lsl	w8, w8, w11
Lloh14:
	adrp	x11, _DUPLEX_FULL@GOTPAGE
Lloh15:
	ldr	x11, [x11, _DUPLEX_FULL@GOTPAGEOFF]
Lloh16:
	adrp	x22, _CMD_HD_EN@GOTPAGE
Lloh17:
	ldr	x22, [x22, _CMD_HD_EN@GOTPAGEOFF]
Lloh18:
	ldr	x11, [x11]
	ldr	w12, [x22]
	cmp	x9, x11
	csel	w9, wzr, w12, eq
Lloh19:
	adrp	x23, _CMD_RX_PAUSE_IGNORE@GOTPAGE
Lloh20:
	ldr	x23, [x23, _CMD_RX_PAUSE_IGNORE@GOTPAGEOFF]
	orr	w8, w9, w8
	ldr	w9, [x23]
Lloh21:
	adrp	x24, _CMD_TX_PAUSE_IGNORE@GOTPAGE
Lloh22:
	ldr	x24, [x24, _CMD_TX_PAUSE_IGNORE@GOTPAGEOFF]
	ldr	w11, [x24]
	orr	w9, w11, w9
	cmp	x10, #0
	csel	w9, w9, wzr, eq
	orr	w25, w8, w9
Lloh23:
	adrp	x26, _EXT_RGMII_OOB_CTRL@GOTPAGE
Lloh24:
	ldr	x26, [x26, _EXT_RGMII_OOB_CTRL@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x20
	bl	_bcmgenet_ext_readl
Lloh25:
	adrp	x8, _OOB_DISABLE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _OOB_DISABLE@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh28:
	adrp	x9, _RGMII_LINK@GOTPAGE
Lloh29:
	ldr	x9, [x9, _RGMII_LINK@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	orr	w1, w8, w9
	ldr	w2, [x26]
	mov	x0, x20
	bl	_bcmgenet_ext_writel
Lloh31:
	adrp	x26, _UMAC_CMD@GOTPAGE
Lloh32:
	ldr	x26, [x26, _UMAC_CMD@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x20
	bl	_bcmgenet_umac_readl
Lloh33:
	adrp	x8, _CMD_SPEED_MASK@GOTPAGE
Lloh34:
	ldr	x8, [x8, _CMD_SPEED_MASK@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	ldr	w9, [x21]
	lsl	w8, w8, w9
	ldr	w9, [x22]
	orr	w8, w8, w9
	ldr	w9, [x23]
	orr	w8, w8, w9
	ldr	w9, [x24]
	orr	w8, w8, w9
	bic	w8, w0, w8
	orr	w1, w25, w8
	ldr	w2, [x26]
	mov	x0, x20
	bl	_bcmgenet_umac_writel
	b	LBB0_15
LBB0_14:
	mov	x0, x21
	bl	_netif_carrier_off
LBB0_15:
	mov	x0, x19
	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
	b	_phy_print_status
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh18
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SPEED_1000,8,3                 ; @SPEED_1000
	.comm	_UMAC_SPEED_1000,4,2            ; @UMAC_SPEED_1000
	.comm	_SPEED_100,8,3                  ; @SPEED_100
	.comm	_UMAC_SPEED_100,4,2             ; @UMAC_SPEED_100
	.comm	_UMAC_SPEED_10,4,2              ; @UMAC_SPEED_10
	.comm	_CMD_SPEED_SHIFT,4,2            ; @CMD_SPEED_SHIFT
	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
	.comm	_CMD_HD_EN,4,2                  ; @CMD_HD_EN
	.comm	_CMD_RX_PAUSE_IGNORE,4,2        ; @CMD_RX_PAUSE_IGNORE
	.comm	_CMD_TX_PAUSE_IGNORE,4,2        ; @CMD_TX_PAUSE_IGNORE
	.comm	_EXT_RGMII_OOB_CTRL,4,2         ; @EXT_RGMII_OOB_CTRL
	.comm	_OOB_DISABLE,4,2                ; @OOB_DISABLE
	.comm	_RGMII_LINK,4,2                 ; @RGMII_LINK
	.comm	_UMAC_CMD,4,2                   ; @UMAC_CMD
	.comm	_CMD_SPEED_MASK,4,2             ; @CMD_SPEED_MASK
.subsections_via_symbols
