	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cas_mif_poll
_cas_mif_poll:                          ## @cas_mif_poll
	.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	%esi, %r14d
	movq	%rdi, %r15
	movq	_REG_MIF_CFG@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	addq	8(%r15), %rdi
	callq	_readl
	movq	_MIF_CFG_MDIO_0@GOTPCREL(%rip), %rdx
	movq	_MIF_CFG_MDIO_1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	andl	%eax, %ecx
	movq	_CAS_PHY_MII_MDIO1@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	(%r15), %ebx
	je	LBB0_2
## %bb.1:
	movq	_MIF_CFG_PHY_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_2:
	orl	%ecx, %ebx
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.3:
	movq	_MIF_CFG_POLL_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_MIF_CFG_POLL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MII_BMSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_CAS_BASE
	movl	%eax, %r12d
	movq	_MIF_CFG_POLL_PHY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%r15), %esi
	callq	_CAS_BASE
	orl	%r12d, %eax
	orl	%eax, %ebx
LBB0_4:
	movq	_BMSR_LSTATUS@GOTPCREL(%rip), %rax
	movq	_BMSR_ANEGCOMPLETE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%r14d, %r14d
	notl	%ecx
	movl	$65535, %edi                    ## imm = 0xFFFF
	cmovnel	%ecx, %edi
	movq	_REG_MIF_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r15), %rsi
	callq	_writel
	movq	(%r13), %rsi
	addq	8(%r15), %rsi
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_MIF_CFG,8,3                ## @REG_MIF_CFG
	.comm	_MIF_CFG_MDIO_0,4,2             ## @MIF_CFG_MDIO_0
	.comm	_MIF_CFG_MDIO_1,4,2             ## @MIF_CFG_MDIO_1
	.comm	_CAS_PHY_MII_MDIO1,4,2          ## @CAS_PHY_MII_MDIO1
	.comm	_MIF_CFG_PHY_SELECT,4,2         ## @MIF_CFG_PHY_SELECT
	.comm	_MIF_CFG_POLL_EN,4,2            ## @MIF_CFG_POLL_EN
	.comm	_MIF_CFG_POLL_REG,4,2           ## @MIF_CFG_POLL_REG
	.comm	_MII_BMSR,4,2                   ## @MII_BMSR
	.comm	_MIF_CFG_POLL_PHY,4,2           ## @MIF_CFG_POLL_PHY
	.comm	_BMSR_LSTATUS,4,2               ## @BMSR_LSTATUS
	.comm	_BMSR_ANEGCOMPLETE,4,2          ## @BMSR_ANEGCOMPLETE
	.comm	_REG_MIF_MASK,8,3               ## @REG_MIF_MASK
	.no_dead_strip	_cas_mif_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cas_mif_poll
_cas_mif_poll:                          ; @cas_mif_poll
	.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	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x22, _REG_MIF_CFG@GOTPAGE
Lloh1:
	ldr	x22, [x22, _REG_MIF_CFG@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
Lloh2:
	adrp	x8, _MIF_CFG_MDIO_0@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MIF_CFG_MDIO_0@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _MIF_CFG_MDIO_1@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MIF_CFG_MDIO_1@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
	and	w8, w8, w0
	ldr	w9, [x19]
Lloh8:
	adrp	x10, _CAS_PHY_MII_MDIO1@GOTPAGE
Lloh9:
	ldr	x10, [x10, _CAS_PHY_MII_MDIO1@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
Lloh11:
	adrp	x11, _MIF_CFG_PHY_SELECT@GOTPAGE
Lloh12:
	ldr	x11, [x11, _MIF_CFG_PHY_SELECT@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
	tst	w10, w9
	csel	w9, wzr, w11, eq
	orr	w21, w9, w8
	cbz	w20, LBB0_2
; %bb.1:
Lloh14:
	adrp	x8, _MIF_CFG_POLL_EN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MIF_CFG_POLL_EN@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	orr	w21, w8, w21
Lloh17:
	adrp	x8, _MIF_CFG_POLL_REG@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MIF_CFG_POLL_REG@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x8, _MII_BMSR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MII_BMSR@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	bl	_CAS_BASE
	orr	w21, w21, w0
Lloh23:
	adrp	x8, _MIF_CFG_POLL_PHY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MIF_CFG_POLL_PHY@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	ldr	w1, [x19, #16]
	bl	_CAS_BASE
	orr	w21, w21, w0
LBB0_2:
Lloh26:
	adrp	x8, _BMSR_LSTATUS@GOTPAGE
Lloh27:
	ldr	x8, [x8, _BMSR_LSTATUS@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
Lloh29:
	adrp	x9, _BMSR_ANEGCOMPLETE@GOTPAGE
Lloh30:
	ldr	x9, [x9, _BMSR_ANEGCOMPLETE@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w8, w9, w8
	cmp	w20, #0
	mov	w9, #65535
	csinv	w0, w9, w8, eq
	ldr	x8, [x19, #8]
Lloh32:
	adrp	x9, _REG_MIF_MASK@GOTPAGE
Lloh33:
	ldr	x9, [x9, _REG_MIF_MASK@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	add	x1, x9, x8
	mov	x0, x21
	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
	b	_writel
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_MIF_CFG,8,3                ; @REG_MIF_CFG
	.comm	_MIF_CFG_MDIO_0,4,2             ; @MIF_CFG_MDIO_0
	.comm	_MIF_CFG_MDIO_1,4,2             ; @MIF_CFG_MDIO_1
	.comm	_CAS_PHY_MII_MDIO1,4,2          ; @CAS_PHY_MII_MDIO1
	.comm	_MIF_CFG_PHY_SELECT,4,2         ; @MIF_CFG_PHY_SELECT
	.comm	_MIF_CFG_POLL_EN,4,2            ; @MIF_CFG_POLL_EN
	.comm	_MIF_CFG_POLL_REG,4,2           ; @MIF_CFG_POLL_REG
	.comm	_MII_BMSR,4,2                   ; @MII_BMSR
	.comm	_MIF_CFG_POLL_PHY,4,2           ; @MIF_CFG_POLL_PHY
	.comm	_BMSR_LSTATUS,4,2               ; @BMSR_LSTATUS
	.comm	_BMSR_ANEGCOMPLETE,4,2          ; @BMSR_ANEGCOMPLETE
	.comm	_REG_MIF_MASK,8,3               ; @REG_MIF_MASK
	.no_dead_strip	_cas_mif_poll
.subsections_via_symbols
