	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function emac_miibus_statchg
_emac_miibus_statchg:                   ## @emac_miibus_statchg
	.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
	callq	_device_get_softc
	movq	%rax, %r14
	movl	16(%rax), %edi
	callq	_device_get_softc
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %rbx
	movq	8(%r14), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.2:
	movq	_IFF_DRV_RUNNING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_10
## %bb.3:
	movl	$0, (%r14)
	movl	(%rbx), %eax
	movq	_IFM_ACTIVE@GOTPCREL(%rip), %rcx
	movq	_IFM_AVALID@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	notl	%eax
	testl	%eax, %edx
	jne	LBB0_8
## %bb.4:
	movl	4(%rbx), %edi
	callq	_IFM_SUBTYPE
	andl	$-2, %eax
	cmpl	$128, %eax
	jne	LBB0_6
## %bb.5:
	movl	$1, (%r14)
	jmp	LBB0_7
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpl	$0, (%r14)
	je	LBB0_8
LBB0_7:
	movq	_EMAC_MAC_IPGT@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_EMAC_READ_REG
	movl	%eax, %r15d
	movl	4(%rbx), %edi
	callq	_IFM_OPTIONS
	movq	_IFM_FDX@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_EMAC_MAC_IPGT_FD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_EMAC_MAC_IPGT_HD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %edx
	cmovel	%eax, %edx
	cmovel	%ecx, %eax
	notl	%edx
	andl	%r15d, %edx
	orl	%eax, %edx
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_EMAC_WRITE_REG
	movq	_EMAC_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_EMAC_READ_REG
	movl	%eax, %edx
	movq	_EMAC_CTL_RST@GOTPCREL(%rip), %rax
	movq	_EMAC_CTL_TX_EN@GOTPCREL(%rip), %rcx
	movq	_EMAC_CTL_RX_EN@GOTPCREL(%rip), %rsi
	orl	(%rax), %edx
	orl	(%rcx), %edx
	orl	(%rsi), %edx
	jmp	LBB0_9
LBB0_8:
	movq	_EMAC_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_EMAC_READ_REG
	movq	_EMAC_CTL_RST@GOTPCREL(%rip), %rcx
	movq	_EMAC_CTL_TX_EN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_EMAC_CTL_RX_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
LBB0_9:
	movq	_EMAC_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_EMAC_WRITE_REG                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IFF_DRV_RUNNING,4,2            ## @IFF_DRV_RUNNING
	.comm	_IFM_ACTIVE,4,2                 ## @IFM_ACTIVE
	.comm	_IFM_AVALID,4,2                 ## @IFM_AVALID
	.comm	_EMAC_MAC_IPGT,4,2              ## @EMAC_MAC_IPGT
	.comm	_IFM_FDX,4,2                    ## @IFM_FDX
	.comm	_EMAC_MAC_IPGT_HD,4,2           ## @EMAC_MAC_IPGT_HD
	.comm	_EMAC_MAC_IPGT_FD,4,2           ## @EMAC_MAC_IPGT_FD
	.comm	_EMAC_CTL,4,2                   ## @EMAC_CTL
	.comm	_EMAC_CTL_RST,4,2               ## @EMAC_CTL_RST
	.comm	_EMAC_CTL_TX_EN,4,2             ## @EMAC_CTL_TX_EN
	.comm	_EMAC_CTL_RX_EN,4,2             ## @EMAC_CTL_RX_EN
	.no_dead_strip	_emac_miibus_statchg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function emac_miibus_statchg
_emac_miibus_statchg:                   ; @emac_miibus_statchg
	.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
	bl	_device_get_softc
	mov	x19, x0
	ldr	w0, [x0, #16]
	bl	_device_get_softc
	ldr	x8, [x19, #8]
	cmp	x0, #0
	ccmp	x8, #0, #4, ne
	b.eq	LBB0_5
; %bb.1:
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _IFF_DRV_RUNNING@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IFF_DRV_RUNNING@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.2:
	mov	x20, x0
	str	wzr, [x19]
	ldr	w8, [x0]
Lloh3:
	adrp	x9, _IFM_ACTIVE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IFM_ACTIVE@GOTPAGEOFF]
Lloh5:
	adrp	x10, _IFM_AVALID@GOTPAGE
Lloh6:
	ldr	x10, [x10, _IFM_AVALID@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh9:
	adrp	x22, _EMAC_CTL@GOTPAGE
Lloh10:
	ldr	x22, [x22, _EMAC_CTL@GOTPAGEOFF]
	bics	wzr, w9, w8
	b.ne	LBB0_8
; %bb.3:
	ldr	w0, [x20, #4]
	bl	_IFM_SUBTYPE
	and	w8, w0, #0xfffffffe
	cmp	w8, #128
	b.ne	LBB0_6
; %bb.4:
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_7
LBB0_5:
	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_6:
	ldr	w8, [x19]
	cbz	w8, LBB0_8
LBB0_7:
Lloh11:
	adrp	x23, _EMAC_MAC_IPGT@GOTPAGE
Lloh12:
	ldr	x23, [x23, _EMAC_MAC_IPGT@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_EMAC_READ_REG
	mov	x21, x0
	ldr	w0, [x20, #4]
	bl	_IFM_OPTIONS
Lloh13:
	adrp	x8, _IFM_FDX@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IFM_FDX@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _EMAC_MAC_IPGT_FD@GOTPAGE
Lloh17:
	ldr	x9, [x9, _EMAC_MAC_IPGT_FD@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	adrp	x10, _EMAC_MAC_IPGT_HD@GOTPAGE
Lloh20:
	ldr	x10, [x10, _EMAC_MAC_IPGT_HD@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	tst	w8, w0
	csel	w8, w9, w10, eq
	bic	w8, w21, w8
	csel	w9, w10, w9, eq
	orr	w2, w8, w9
	ldr	w1, [x23]
	mov	x0, x19
	bl	_EMAC_WRITE_REG
	ldr	w1, [x22]
	mov	x0, x19
	bl	_EMAC_READ_REG
Lloh22:
	adrp	x8, _EMAC_CTL_RST@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EMAC_CTL_RST@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	adrp	x9, _EMAC_CTL_TX_EN@GOTPAGE
Lloh26:
	ldr	x9, [x9, _EMAC_CTL_TX_EN@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
Lloh28:
	adrp	x10, _EMAC_CTL_RX_EN@GOTPAGE
Lloh29:
	ldr	x10, [x10, _EMAC_CTL_RX_EN@GOTPAGEOFF]
Lloh30:
	ldr	w10, [x10]
	orr	w8, w8, w0
	orr	w8, w8, w9
	orr	w2, w8, w10
	b	LBB0_9
LBB0_8:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_EMAC_READ_REG
Lloh31:
	adrp	x8, _EMAC_CTL_RST@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EMAC_CTL_RST@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
Lloh34:
	adrp	x9, _EMAC_CTL_TX_EN@GOTPAGE
Lloh35:
	ldr	x9, [x9, _EMAC_CTL_TX_EN@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh37:
	adrp	x9, _EMAC_CTL_RX_EN@GOTPAGE
Lloh38:
	ldr	x9, [x9, _EMAC_CTL_RX_EN@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	orr	w8, w8, w9
	bic	w2, w0, w8
LBB0_9:
	ldr	w1, [x22]
	mov	x0, x19
	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	_EMAC_WRITE_REG
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_IFF_DRV_RUNNING,4,2            ; @IFF_DRV_RUNNING
	.comm	_IFM_ACTIVE,4,2                 ; @IFM_ACTIVE
	.comm	_IFM_AVALID,4,2                 ; @IFM_AVALID
	.comm	_EMAC_MAC_IPGT,4,2              ; @EMAC_MAC_IPGT
	.comm	_IFM_FDX,4,2                    ; @IFM_FDX
	.comm	_EMAC_MAC_IPGT_HD,4,2           ; @EMAC_MAC_IPGT_HD
	.comm	_EMAC_MAC_IPGT_FD,4,2           ; @EMAC_MAC_IPGT_FD
	.comm	_EMAC_CTL,4,2                   ; @EMAC_CTL
	.comm	_EMAC_CTL_RST,4,2               ; @EMAC_CTL_RST
	.comm	_EMAC_CTL_TX_EN,4,2             ; @EMAC_CTL_TX_EN
	.comm	_EMAC_CTL_RX_EN,4,2             ; @EMAC_CTL_RX_EN
	.no_dead_strip	_emac_miibus_statchg
.subsections_via_symbols
